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.
- package/README.md +7 -7
- package/book-assets/cli-observation-loop.svg +1 -1
- package/book-assets/example-landscape.svg +1 -1
- package/book-assets/laboratory-progression.svg +1 -1
- package/book-assets/part-4-craft.svg +1 -1
- package/book-assets/rdf-adapter-pipeline.svg +3 -3
- package/book-assets/reference-navigation.svg +1 -1
- package/book-assets/review-lenses.svg +1 -1
- package/book-assets/title-page.svg +2 -2
- package/conformance-report.md +1 -1
- package/examples/book/README.md +4 -4
- package/examples/book/chapter-01/01-parent.pl +1 -1
- package/examples/book/chapter-01/02-child.pl +1 -1
- package/examples/book/chapter-02/01-measurement.pl +1 -1
- package/examples/book/chapter-02/02-label.pl +1 -1
- package/examples/book/chapter-03/01-eligible.pl +1 -1
- package/examples/book/chapter-03/02-adult.pl +1 -1
- package/examples/book/chapter-03/03-can_enter.pl +1 -1
- package/examples/book/chapter-03/04-high_score.pl +1 -1
- package/examples/book/chapter-03/05-parent.pl +1 -1
- package/examples/book/chapter-03/06-ancestor.pl +1 -1
- package/examples/book/chapter-03/07-different.pl +1 -1
- package/examples/book/chapter-03/08-has_parent.pl +1 -1
- package/examples/book/chapter-03/09-program.pl +1 -1
- package/examples/book/chapter-03/10-closed.pl +1 -1
- package/examples/book/chapter-03/11-p.pl +1 -1
- package/examples/book/chapter-04/01-path.pl +1 -1
- package/examples/book/chapter-05/01-first.pl +1 -1
- package/examples/book/chapter-05/02-reverse_acc.pl +1 -1
- package/examples/book/chapter-06/01-next.pl +1 -1
- package/examples/book/chapter-06/02-safe_reading.pl +1 -1
- package/examples/book/chapter-06/03-square.pl +1 -1
- package/examples/book/chapter-06/04-factorial.pl +1 -1
- package/examples/book/chapter-07/01-allowed.pl +1 -1
- package/examples/book/chapter-07/02-all_tests_pass.pl +1 -1
- package/examples/book/chapter-08/01-findall.pl +1 -1
- package/examples/book/chapter-08/02-outgoing_costs.pl +1 -1
- package/examples/book/chapter-08/03-best_route.pl +1 -1
- package/examples/book/chapter-09/01-functor.pl +1 -1
- package/examples/book/chapter-09/02-normalized.pl +1 -1
- package/examples/book/chapter-09/03-message.pl +1 -1
- package/examples/book/chapter-10/01-plan.pl +1 -1
- package/examples/book/chapter-11/01-why.pl +1 -1
- package/examples/book/chapter-12/01-invalid_probability.pl +1 -1
- package/examples/book/chapter-12/02-invalid_assignment.pl +1 -1
- package/examples/book/chapter-14/01-heating.pl +1 -1
- package/examples/book/chapter-15/01-rdf.pl +1 -1
- package/examples/book/chapter-16/01-socket.pl +1 -1
- package/examples/book/chapter-16/02-socket-2.pl +1 -1
- package/examples/book/chapter-17/01-path.pl +1 -1
- package/examples/book/chapter-17/02-adult.pl +1 -1
- package/examples/book/chapter-17/03-bad_member.pl +1 -1
- package/examples/book/chapter-17/04-item.pl +1 -1
- package/examples/book/chapter-18/01-routeable.pl +1 -1
- package/examples/book/chapter-18/02-routeable-2.pl +1 -1
- package/examples/book/chapter-18/03-prefix.pl +1 -1
- package/examples/book/chapter-18/04-candidate_pair.pl +1 -1
- package/examples/book/chapter-18/05-compatible_pair.pl +1 -1
- package/examples/book/chapter-19/01-factorial.pl +1 -1
- package/examples/book/chapter-19/02-invalid_limits.pl +1 -1
- package/examples/book/chapter-20/01-connected.pl +1 -1
- package/examples/book/chapter-20/02-within_thermal_limits.pl +1 -1
- package/examples/book/chapter-20/03-search.pl +1 -1
- package/examples/book/chapter-21/01-grandparent.pl +1 -1
- package/examples/book/chapter-21/02-loop_edge.pl +1 -1
- package/examples/book/chapter-21/03-eligible.pl +1 -1
- package/examples/book/chapter-21/04-grows.pl +1 -1
- package/examples/book/chapter-22/01-tree.pl +1 -1
- package/examples/book/chapter-22/02-tree_member.pl +1 -1
- package/examples/book/chapter-22/03-mirror.pl +1 -1
- package/examples/book/chapter-22/04-evaluate.pl +1 -1
- package/examples/book/chapter-22/05-lookup.pl +1 -1
- package/examples/book/chapter-22/06-simplify.pl +1 -1
- package/examples/book/chapter-23/01-adult.pl +1 -1
- package/examples/book/chapter-23/02-adult-2.pl +1 -1
- package/examples/book/chapter-23/03-can_board.pl +1 -1
- package/examples/book/chapter-23/04-traveler_in_good_standing.pl +1 -1
- package/examples/book/chapter-23/05-connection.pl +1 -1
- package/examples/book/chapter-23/06-rail_connection.pl +1 -1
- package/examples/book/chapter-23/07-sum_numbers.pl +1 -1
- package/examples/book/chapter-23/08-sum_numbers_acc.pl +1 -1
- package/examples/book/chapter-24/01-simple_path.pl +1 -1
- package/examples/book/chapter-24/02-reachable.pl +1 -1
- package/examples/book/chapter-24/03-best_plan.pl +1 -1
- package/examples/book/chapter-25/01-person.pl +1 -1
- package/examples/book/chapter-25/02-active_badge.pl +1 -1
- package/examples/book/chapter-25/03-in_good_standing.pl +1 -1
- package/examples/book/chapter-25/04-incompatible_status.pl +1 -1
- package/examples/book/chapter-26/01-mortal.pl +1 -1
- package/examples/book/chapter-26/02-triple.pl +1 -1
- package/examples/book/chapter-26/03-edge.pl +1 -1
- package/examples/book/chapter-27/01-natural.pl +1 -1
- package/examples/book/chapter-27/02-list_length.pl +1 -1
- package/examples/book/chapter-27/03-reverse_acc.pl +1 -1
- package/examples/book/chapter-28/01-program.pl +1 -1
- package/examples/book/chapter-28/02-triangle.pl +1 -1
- package/examples/book/chapter-28/03-rectangle.pl +1 -1
- package/examples/book/chapter-28/04-preserves_combine.pl +1 -1
- package/examples/book/chapter-29/01-noncommuting_pair.pl +1 -1
- package/examples/book/chapter-32/01-eligible.pl +1 -1
- package/examples/book/chapter-32/02-eligible-2.pl +1 -1
- package/examples/book/chapter-33/01-assigned_badge.pl +1 -1
- package/examples/book/chapter-33/02-source_role.pl +1 -1
- package/examples/book/chapter-33/03-chosen_pair.pl +1 -1
- package/examples/book/chapter-33/04-path.pl +1 -1
- package/examples/book/chapter-33/05-unregistered.pl +1 -1
- package/examples/book/chapter-33/06-step.pl +1 -1
- package/examples/book/chapter-33/07-depends.pl +1 -1
- package/examples/book/chapter-33/08-within_limit.pl +1 -1
- package/examples/book/chapter-33/09-invalid_badge_assignment.pl +1 -1
- package/examples/book/chapter-33/10-theory_version.pl +1 -1
- package/examples/book/chapter-34/01-travel_status.pl +1 -1
- package/examples/book/chapter-34/02-require_route.pl +1 -1
- package/examples/book/chapter-34/03-regional_total.pl +1 -1
- package/examples/book/chapter-35/01-term_shape.pl +1 -1
- package/examples/book/chapter-36/01-program.pl +1 -1
- package/examples/book/chapter-36/02-program-2.pl +1 -1
- package/examples/book/chapter-36/03-program-3.pl +1 -1
- package/examples/book/chapter-37/01-write_event.pl +1 -1
- package/examples/book/chapter-38/01-city.pl +1 -1
- package/examples/cdcl-sat-solver.pl +2 -2
- package/examples/collatz-1000.pl +1 -1
- package/examples/equality-saturation.pl +1 -1
- package/examples/existential-rule.pl +1 -1
- package/examples/herbrand-semantics.pl +1 -1
- package/examples/herbrand-witnesses.pl +1 -1
- package/examples/iso-integer-arithmetic.pl +1 -1
- package/examples/knowledge-engineering-alignment-flow.pl +1 -1
- package/examples/language.pl +2 -2
- package/examples/law-of-cosines.pl +1 -1
- package/examples/linear-logic-resources.pl +1 -1
- package/examples/markov-logic-network.pl +1 -1
- package/examples/matrix-noncommutativity.pl +1 -1
- package/examples/partial-evaluator.pl +1 -1
- package/examples/peano-calculus.pl +1 -1
- package/examples/prime-range.pl +1 -1
- package/examples/register-allocation.pl +1 -1
- package/examples/route-planning.pl +1 -1
- package/examples/sat-solver-dpll.pl +1 -1
- package/examples/symbolic-derivative.pl +1 -1
- package/examples/term-tools.pl +1 -1
- package/examples/trust-flow-provenance-threshold.pl +1 -1
- package/examples/vector-similarity.pl +1 -1
- package/examples/web-names.pl +1 -1
- package/examples/workplace-compliance.pl +1 -1
- package/eyelang-logo.png +0 -0
- package/index.d.ts +68 -68
- package/index.js +1 -1
- package/package.json +2 -2
- package/playground.html +10 -10
- package/src/cli.js +4 -4
- package/src/explain.js +4 -4
- package/src/index.js +4 -4
- package/src/iso.js +1 -1
- package/src/library.js +7 -7
- package/src/parser.js +1 -1
- package/src/playground-worker.js +2 -2
- package/src/solver.js +4 -4
- package/src/term.js +1 -1
- package/test/conformance/README.md +6 -6
- package/test/conformance/THIRD_PARTY.md +4 -4
- package/test/conformance/cases/iso/logtalk_abolish.pl +1 -1
- package/test/conformance/cases/iso/logtalk_arg_unification.pl +1 -1
- package/test/conformance/cases/iso/logtalk_assert_order.pl +1 -1
- package/test/conformance/cases/iso/logtalk_atom_chars.pl +1 -1
- package/test/conformance/cases/iso/logtalk_atom_codes.pl +1 -1
- package/test/conformance/cases/iso/logtalk_atom_concat.pl +1 -1
- package/test/conformance/cases/iso/logtalk_atom_length.pl +1 -1
- package/test/conformance/cases/iso/logtalk_bagof.pl +1 -1
- package/test/conformance/cases/iso/logtalk_char_code.pl +1 -1
- package/test/conformance/cases/iso/logtalk_clause.pl +1 -1
- package/test/conformance/cases/iso/logtalk_compare_standard_order.pl +1 -1
- package/test/conformance/cases/iso/logtalk_copy_term_semantics.pl +1 -1
- package/test/conformance/cases/iso/logtalk_current_predicate.pl +1 -1
- package/test/conformance/cases/iso/logtalk_current_streams.pl +1 -1
- package/test/conformance/cases/iso/logtalk_findall.pl +1 -1
- package/test/conformance/cases/iso/logtalk_number_chars.pl +1 -1
- package/test/conformance/cases/iso/logtalk_number_codes.pl +1 -1
- package/test/conformance/cases/iso/logtalk_occurs_check.pl +1 -1
- package/test/conformance/cases/iso/logtalk_once.pl +1 -1
- package/test/conformance/cases/iso/logtalk_operators.pl +1 -1
- package/test/conformance/cases/iso/logtalk_prolog_flags.pl +1 -1
- package/test/conformance/cases/iso/logtalk_repeat.pl +1 -1
- package/test/conformance/cases/iso/logtalk_retract.pl +1 -1
- package/test/conformance/cases/iso/logtalk_setof.pl +1 -1
- package/test/conformance/cases/iso/logtalk_sub_atom.pl +1 -1
- package/test/conformance/cases/iso/logtalk_term_comparison.pl +1 -1
- package/test/conformance/cases/iso/logtalk_term_variables.pl +1 -1
- package/test/conformance/cases/iso/logtalk_univ.pl +1 -1
- package/test/conformance/cases/strings/064_reusable_string_builtins.pl +3 -3
- package/test/conformance/cases/strings/071_string_edges.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_arity_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_bad_indicator.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_name_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_negative_arity.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_abolish_unbound_arity.pl +1 -1
- package/test/conformance/errors/iso/logtalk_arg_index_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_arg_number.pl +1 -1
- package/test/conformance/errors/iso/logtalk_asserta_bad_body.pl +1 -1
- package/test/conformance/errors/iso/logtalk_asserta_noncallable.pl +1 -1
- package/test/conformance/errors/iso/logtalk_assertz_noncallable.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_chars_atom_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_chars_character_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_chars_improper.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_chars_list_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_chars_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_codes_atom_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_codes_bad_code.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_codes_integer_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_codes_list_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_codes_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_concat_left_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_concat_right_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_concat_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_concat_whole_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_length_atom_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_length_integer_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_length_negative.pl +1 -1
- package/test/conformance/errors/iso/logtalk_atom_length_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_bagof_improper.pl +1 -1
- package/test/conformance/errors/iso/logtalk_bagof_nonlist.pl +1 -1
- package/test/conformance/errors/iso/logtalk_char_code_character_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_char_code_integer_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_char_code_negative.pl +1 -1
- package/test/conformance/errors/iso/logtalk_char_code_number_character.pl +1 -1
- package/test/conformance/errors/iso/logtalk_char_code_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_clause_noncallable_body.pl +1 -1
- package/test/conformance/errors/iso/logtalk_clause_noncallable_head.pl +1 -1
- package/test/conformance/errors/iso/logtalk_compare_order_domain.pl +1 -1
- package/test/conformance/errors/iso/logtalk_compare_order_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_flag_compound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_flag_name_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_flag_unknown.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_input_bad_stream.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_op_bad_specifier.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_op_high_priority.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_output_bad_stream.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_predicate_bad_name.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_predicate_negative_arity.pl +1 -1
- package/test/conformance/errors/iso/logtalk_current_predicate_scalar.pl +1 -1
- package/test/conformance/errors/iso/logtalk_findall_improper.pl +1 -1
- package/test/conformance/errors/iso/logtalk_findall_nonlist.pl +1 -1
- package/test/conformance/errors/iso/logtalk_functor_arity_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_functor_compound_name.pl +1 -1
- package/test/conformance/errors/iso/logtalk_functor_float_name.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_character_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_list_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_number_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_partial.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_syntax.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_chars_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_bad_code.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_list_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_number_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_partial.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_syntax.pl +1 -1
- package/test/conformance/errors/iso/logtalk_number_codes_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_once_noncallable.pl +1 -1
- package/test/conformance/errors/iso/logtalk_once_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_bad_specifier.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_high_priority.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_negative_priority.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_priority_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_unbound_name.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_unbound_priority.pl +1 -1
- package/test/conformance/errors/iso/logtalk_op_unbound_specifier.pl +1 -1
- package/test/conformance/errors/iso/logtalk_retract_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_retract_unbound_head.pl +1 -1
- package/test/conformance/errors/iso/logtalk_set_flag_name_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_set_flag_unbound_name.pl +1 -1
- package/test/conformance/errors/iso/logtalk_set_flag_unbound_value.pl +1 -1
- package/test/conformance/errors/iso/logtalk_set_flag_unknown.pl +1 -1
- package/test/conformance/errors/iso/logtalk_set_flag_value.pl +1 -1
- package/test/conformance/errors/iso/logtalk_setof_nonlist.pl +1 -1
- package/test/conformance/errors/iso/logtalk_sub_atom_before_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_sub_atom_negative.pl +1 -1
- package/test/conformance/errors/iso/logtalk_sub_atom_result_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_sub_atom_source_type.pl +1 -1
- package/test/conformance/errors/iso/logtalk_sub_atom_unbound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_term_variables_improper.pl +1 -1
- package/test/conformance/errors/iso/logtalk_term_variables_nonlist.pl +1 -1
- package/test/conformance/errors/iso/logtalk_univ_head_compound.pl +1 -1
- package/test/conformance/errors/iso/logtalk_univ_head_float.pl +1 -1
- package/test/conformance/errors/iso/logtalk_univ_head_integer.pl +1 -1
- package/test/conformance/errors/iso/logtalk_univ_single_compound.pl +1 -1
- package/test/conformance/expected/strings/064_reusable_string_builtins.pl +1 -1
- package/test/run-conformance-report.mjs +4 -4
- package/test/run-conformance.mjs +3 -3
- package/test/run-playground.mjs +3 -3
- package/test/run-rdf-tools.mjs +15 -15
- package/test/run-regression.mjs +35 -35
- package/the-art-of-eyelang.md +136 -136
- package/tools/README.md +2 -2
- package/tools/extract-book-examples.mjs +4 -4
- package/tools/pl-to-rdf.mjs +2 -2
- package/tools/rdf-codec.mjs +8 -8
- package/tools/rdf-to-pl.mjs +9 -9
- package/why-eyelang.md +47 -47
package/the-art-of-eyelang.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="book-assets/title-page.svg" alt="Front page for The Art of
|
|
2
|
+
<img src="book-assets/title-page.svg" alt="Front page for The Art of Eyelang, presenting its dual foundation in ISO Prolog rules and RDF linked data." width="720">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<img src="eyelang-logo.png" alt="
|
|
6
|
+
<img src="eyelang-logo.png" alt="Eyelang logo joining ISO Prolog rules with RDF linked data." width="420">
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
**Copyright © 2021–2026 Jos De Roo, KNoWS office of IDLab, Ghent University –
|
|
@@ -14,12 +14,12 @@ appropriate credit, link to the licence, and indicate changes.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Eyelang turns facts and rules into answers and inspectable proofs. This book is an
|
|
18
18
|
original introduction to the habits of logic programming: describe a world,
|
|
19
19
|
state the relationships that hold in it, and let unification and search connect
|
|
20
20
|
the two.
|
|
21
21
|
|
|
22
|
-
This book is also the reference for the
|
|
22
|
+
This book is also the reference for the Eyelang implementation. Eyelang is a
|
|
23
23
|
standards-based reasoning system: programs use the documented and tested ISO
|
|
24
24
|
Prolog profile, while RDF 1.2 provides an interoperable data boundary.
|
|
25
25
|
Chapters 38–40 define the supported ISO Prolog profile, built-ins, and execution interface,
|
|
@@ -31,30 +31,30 @@ Its subject is not syntax alone. A logic program has two inseparable aspects:
|
|
|
31
31
|
the relation described by its clauses and the procedure induced when goals are
|
|
32
32
|
selected and clauses are tried. The first tells us what answers are justified;
|
|
33
33
|
the second tells us whether and how the machine will find them. Learning to
|
|
34
|
-
program with
|
|
34
|
+
program with Eyelang means learning to move comfortably between these views.
|
|
35
35
|
|
|
36
|
-
The name *
|
|
37
|
-
executable rules and W3C RDF for linked data.
|
|
36
|
+
The name *Eyelang* reflects the two standards at its foundation: ISO Prolog for
|
|
37
|
+
executable rules and W3C RDF for linked data. Eyelang implements a broad ISO
|
|
38
38
|
Prolog profile with facts, clauses, terms, lists,
|
|
39
39
|
control, arithmetic, dynamic predicates, operators, streams, and standard
|
|
40
40
|
built-ins. Automatic
|
|
41
41
|
tabling, explicit integrity checks, proof output, and RDF adapters are implementation
|
|
42
|
-
capabilities around that standards-based foundation.
|
|
42
|
+
capabilities around that standards-based foundation. Eyelang does not attempt to
|
|
43
43
|
claim formal certification of every ISO processor edge case.
|
|
44
44
|
|
|
45
45
|
Standards are crucial because knowledge and rules often outlive the software
|
|
46
46
|
that first processes them. Using ISO Prolog for programs and RDF 1.2 for
|
|
47
47
|
interchange keeps the representation teachable, inspectable, and portable
|
|
48
|
-
across tools.
|
|
48
|
+
across tools. Eyelang aims to provide a compact implementation of those standards
|
|
49
49
|
with explanations and practical host integration, not another proprietary rule
|
|
50
50
|
language.
|
|
51
51
|
|
|
52
|
-
This places
|
|
52
|
+
This places Eyelang in a tradition that joins automated deduction, database
|
|
53
53
|
querying, and programming. Jacques Herbrand's doctoral work made ground terms
|
|
54
54
|
and ground instances central to proof theory; Robinson's later resolution
|
|
55
55
|
principle turned unification and refutation into a general proof procedure;
|
|
56
56
|
early Prolog showed that Horn clauses could also be executable programs;
|
|
57
|
-
deductive databases emphasized finite relations and fixed points.
|
|
57
|
+
deductive databases emphasized finite relations and fixed points. Eyelang
|
|
58
58
|
borrows from all three traditions without pretending that they are identical.
|
|
59
59
|
Its clauses are logical statements, its query execution is an ordered
|
|
60
60
|
computation, and its proof terms make the connection between the two available
|
|
@@ -64,9 +64,9 @@ That history explains a recurring theme of the book. Logic programming is not
|
|
|
64
64
|
the claim that control disappears. It is the discipline of stating the
|
|
65
65
|
relation clearly enough that control can be studied and improved separately.
|
|
66
66
|
Robert Kowalski's phrase “algorithm = logic + control” names this separation;
|
|
67
|
-
|
|
67
|
+
Eyelang's focused surface makes it unusually easy to see in running examples.
|
|
68
68
|
|
|
69
|
-
Complete
|
|
69
|
+
Complete Eyelang code displays from the book are also available as files under
|
|
70
70
|
[`examples/book/`](https://github.com/eyereasoner/eyelang/tree/main/examples/book/), grouped by chapter. From a source checkout,
|
|
71
71
|
use Node.js 18 or newer, install the dependencies, and run the CLI:
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@ npm install
|
|
|
75
75
|
node bin/eyelang.js examples/socrates.pl
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
The
|
|
78
|
+
The Eyelang command should print:
|
|
79
79
|
|
|
80
80
|
```text
|
|
81
81
|
type(socrates, mortal).
|
|
@@ -92,7 +92,7 @@ Readers who do not want to install anything can begin in the
|
|
|
92
92
|
[browser playground](https://eyereasoner.github.io/eyelang/playground). Paste
|
|
93
93
|
the source of `examples/socrates.pl` into the editor and run it. The playground
|
|
94
94
|
and local CLI accept the same in-memory Prolog source and load the same portable
|
|
95
|
-
|
|
95
|
+
Eyelang library by default, so relations such as `append/3` and `member/2` need no
|
|
96
96
|
extra switch. The page starts a dedicated ES-module worker for each run. Serve a
|
|
97
97
|
local checkout over HTTP(S), rather than opening the page as a `file:` URL.
|
|
98
98
|
Filesystem predicates and `include/1` are Node-only; URL and embedding examples
|
|
@@ -107,11 +107,11 @@ Use `npm run generate` after editing the book to refresh the extracted
|
|
|
107
107
|
|
|
108
108
|
Code displays serve three different purposes:
|
|
109
109
|
|
|
110
|
-
- an `eyelang` block is Prolog source accepted by
|
|
110
|
+
- an `eyelang` block is Prolog source accepted by Eyelang; complete blocks are extracted under
|
|
111
111
|
`examples/book/`, although a short block may rely on facts introduced in the
|
|
112
112
|
surrounding chapter;
|
|
113
113
|
- a `text` block shows output, a trace, a data shape, or pseudocode and is not
|
|
114
|
-
necessarily accepted as
|
|
114
|
+
necessarily accepted as Eyelang input;
|
|
115
115
|
- a `sh` or `js` block is a host command or embedding example.
|
|
116
116
|
|
|
117
117
|
Top-level programs under [`examples/`](https://github.com/eyereasoner/eyelang/tree/main/examples/) are the complete runnable
|
|
@@ -160,7 +160,7 @@ Approach each example through the same six moves:
|
|
|
160
160
|
This rhythm deliberately joins declarative reading, operational reading, and
|
|
161
161
|
program construction. Readers new to logic programming can follow Parts I–III
|
|
162
162
|
in order. Experienced Prolog programmers can begin with Chapters 3, 13, and
|
|
163
|
-
17 to see where
|
|
163
|
+
17 to see where Eyelang's hybrid execution and proof-oriented design differ.
|
|
164
164
|
Chapter 41 gives further routes through the material.
|
|
165
165
|
|
|
166
166
|
### When a run surprises you
|
|
@@ -260,7 +260,7 @@ Chapters 11–16
|
|
|
260
260
|
- [13. Termination, tabling, and performance](#13-termination-tabling-and-performance)
|
|
261
261
|
- [14. Knowledge engineering](#14-knowledge-engineering)
|
|
262
262
|
- [15. RDF 1.2 as the interoperable data boundary](#15-rdf-12-as-the-interoperable-data-boundary)
|
|
263
|
-
- [16. Embedding
|
|
263
|
+
- [16. Embedding Eyelang](#16-embedding-eyelang)
|
|
264
264
|
|
|
265
265
|
### Part IV — The craft of logic programming
|
|
266
266
|
|
|
@@ -314,7 +314,7 @@ Chapters 38–43
|
|
|
314
314
|
|
|
315
315
|
- [38. Language and ISO profile](#38-language-and-iso-profile)
|
|
316
316
|
- [39. Built-in predicates by programming role](#39-built-in-predicates-by-programming-role)
|
|
317
|
-
- [40. Running
|
|
317
|
+
- [40. Running Eyelang: command line and corpus](#40-running-eyelang-command-line-and-corpus)
|
|
318
318
|
- [41. Study paths, review, and further examples](#41-study-paths-review-and-further-examples)
|
|
319
319
|
- [42. Standards, limits, and implementation boundaries](#42-standards-limits-and-implementation-boundaries)
|
|
320
320
|
- [43. Glossary and notes for continued study](#43-glossary-and-notes-for-continued-study)
|
|
@@ -365,7 +365,7 @@ parent(clara, diego).
|
|
|
365
365
|
Each line is a **fact**. `parent/2` is a relation: the name is `parent` and the
|
|
366
366
|
arity is two. Arity matters. `parent/2` and `parent/3` are different predicates.
|
|
367
367
|
|
|
368
|
-
A **query declaration** selects the relation whose ground answers
|
|
368
|
+
A **query declaration** selects the relation whose ground answers Eyelang prints:
|
|
369
369
|
|
|
370
370
|
```eyelang
|
|
371
371
|
child(Child, Parent) :- parent(Parent, Child).
|
|
@@ -380,7 +380,7 @@ child(clara, byron).
|
|
|
380
380
|
child(diego, clara).
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
Eyelang distinguishes solutions found by the solver from answers printed by the
|
|
384
384
|
CLI. A query such as `eyelang --goal 'parent(X, Y)' program.pl` can find the three source facts
|
|
385
385
|
internally, but the normal CLI output suppresses answers that merely repeat
|
|
386
386
|
source facts. Derived `child/2` answers are printed. Chapter 11 explains this
|
|
@@ -444,7 +444,7 @@ grandparents, then only the grandparents of `diego`.
|
|
|
444
444
|
|
|
445
445
|
## 2. Terms, variables, and substitution
|
|
446
446
|
|
|
447
|
-
Prolog programs accepted by
|
|
447
|
+
Prolog programs accepted by Eyelang are built from terms:
|
|
448
448
|
|
|
449
449
|
- atom constants: `ada`, `accepted`, `'atom with spaces'`;
|
|
450
450
|
- strings: `"sensor too hot"`;
|
|
@@ -482,7 +482,7 @@ may receive a binding; a nested pair of compounds causes the same comparison
|
|
|
482
482
|
to continue recursively. The result shown is the most general substitution:
|
|
483
483
|
it commits to exactly what structural agreement requires and nothing more.
|
|
484
484
|
|
|
485
|
-
|
|
485
|
+
Eyelang exposes unification as `=/2`:
|
|
486
486
|
|
|
487
487
|
```eyelang
|
|
488
488
|
same_shape(Pair) :- (Pair = pair(X, X)).
|
|
@@ -515,7 +515,7 @@ web_name(sensor_1, '<https://example.org/sensor/1>').
|
|
|
515
515
|
**Exercise.** Write `diagonal/1`, which succeeds for `point(X, X)`. Then write
|
|
516
516
|
`same_ends/1` for a three-element list whose first and last values agree.
|
|
517
517
|
|
|
518
|
-
**Checkpoint.** Without running
|
|
518
|
+
**Checkpoint.** Without running Eyelang, decide whether each pair unifies:
|
|
519
519
|
`point(X, X)` with `point(red, red)`, `point(X, X)` with
|
|
520
520
|
`point(red, blue)`, and `[Head | Tail]` with `[a, b, c]`. Then run a small
|
|
521
521
|
`=/2` query to check each prediction.
|
|
@@ -525,7 +525,7 @@ web_name(sensor_1, '<https://example.org/sensor/1>').
|
|
|
525
525
|
The executable-clause idea emerged from work on automated theorem proving.
|
|
526
526
|
Robinson's resolution principle supplied a general proof rule, while the
|
|
527
527
|
development of Prolog specialized proof search around clauses that could be
|
|
528
|
-
read as procedures.
|
|
528
|
+
read as procedures. Eyelang begins further downstream: it offers a compact
|
|
529
529
|
definite-clause language rather than a general first-order theorem prover. The
|
|
530
530
|
restriction buys a direct correspondence between a rule body and the
|
|
531
531
|
subquestions used to establish its head.
|
|
@@ -542,7 +542,7 @@ eligible(Person) :-
|
|
|
542
542
|
Read it declaratively: a person is eligible if the person has an age of at
|
|
543
543
|
least 18 and is registered. Read it operationally: to solve the head, solve the
|
|
544
544
|
body goals in their written dependency order, carrying bindings into later
|
|
545
|
-
goals.
|
|
545
|
+
goals. Eyelang normally selects from left to right. As a safe optimization, it
|
|
546
546
|
may run a ready deterministic built-in filter early; such a filter cannot add
|
|
547
547
|
alternative answers and already has the inputs its registered mode requires.
|
|
548
548
|
|
|
@@ -613,13 +613,13 @@ resolution calculus, nor did his thesis state the later least-model semantics
|
|
|
613
613
|
of logic programs in its modern form. Rather, his proof theory laid essential
|
|
614
614
|
groundwork. Resolution supplied a powerful subsequent inference mechanism, and
|
|
615
615
|
van Emden and Kowalski later gave definite logic programs their fixed-point and
|
|
616
|
-
least-Herbrand-model account.
|
|
616
|
+
least-Herbrand-model account. Eyelang sits downstream of this sequence:
|
|
617
617
|
|
|
618
618
|
```text
|
|
619
619
|
Herbrand: ground terms and instances as a proof-theoretic foundation
|
|
620
620
|
-> Robinson: resolution and unification as a proof procedure
|
|
621
621
|
-> logic programming: executable clauses and least-model semantics
|
|
622
|
-
->
|
|
622
|
+
-> Eyelang: a focused Prolog implementation with inspectable derivations
|
|
623
623
|
```
|
|
624
624
|
|
|
625
625
|
Herbrand completed this work while still in his early twenties and died in
|
|
@@ -630,7 +630,7 @@ book rather than appearing only as historical attribution.
|
|
|
630
630
|
### The Herbrand world
|
|
631
631
|
|
|
632
632
|
The declarative reading needs a precise answer to a deceptively simple
|
|
633
|
-
question: what can a term denote?
|
|
633
|
+
question: what can a term denote? Eyelang uses **Herbrand semantics**. Its
|
|
634
634
|
universe contains exactly the ground terms that can be constructed from the
|
|
635
635
|
program's atom constants, strings, numbers, list constructors, and compound
|
|
636
636
|
functors. There are no unnamed elements hiding behind the notation. A ground
|
|
@@ -717,10 +717,10 @@ its normal and proof outputs make this distinction concrete.
|
|
|
717
717
|
|
|
718
718
|
Variables range over Herbrand terms, not external records, pointers, or
|
|
719
719
|
host-language objects. Variables in a selected goal are existential in the
|
|
720
|
-
logic-programming sense:
|
|
720
|
+
logic-programming sense: Eyelang searches for substitutions that make the goal
|
|
721
721
|
follow from the program.
|
|
722
722
|
|
|
723
|
-
|
|
723
|
+
Eyelang has no blank nodes or existential variables in rule heads. When a rule
|
|
724
724
|
needs to name a consequent object, construct an explicit witness:
|
|
725
725
|
|
|
726
726
|
```eyelang
|
|
@@ -739,7 +739,7 @@ rather than being an anonymous object created behind the program's back.
|
|
|
739
739
|
|
|
740
740
|
Equality in the pure Herbrand reading is syntactic identity after substitution.
|
|
741
741
|
Operationally, unification discovers a substitution that makes terms
|
|
742
|
-
identical.
|
|
742
|
+
identical. Eyelang performs an occurs check whenever unification would bind a
|
|
743
743
|
variable. It therefore uses finite-tree unification and rejects a binding when
|
|
744
744
|
the variable occurs anywhere in the proposed value. For example, this call
|
|
745
745
|
fails rather than constructing a cyclic term:
|
|
@@ -750,7 +750,7 @@ fails rather than constructing a cyclic term:
|
|
|
750
750
|
|
|
751
751
|
### Meaning is not the search strategy
|
|
752
752
|
|
|
753
|
-
|
|
753
|
+
Eyelang's evaluator is goal-directed. It resolves selected goals against facts,
|
|
754
754
|
rules, and built-ins using ordered conjunction, clause selection, indexing,
|
|
755
755
|
tabling, and deterministic host operations. Written order defines the normal
|
|
756
756
|
dataflow; a mode-ready deterministic built-in may be selected early as a pure
|
|
@@ -835,7 +835,7 @@ open recursive question before selecting an edge and may destroy the useful
|
|
|
835
835
|
mode. Meaning and control must be reviewed separately.
|
|
836
836
|
|
|
837
837
|
Real graphs contain cycles. Naive depth-first recursion can revisit a call
|
|
838
|
-
forever.
|
|
838
|
+
forever. Eyelang analyzes predicate dependencies and automatically tables
|
|
839
839
|
suitable positive recursive groups. A table records answers for a recursive
|
|
840
840
|
call, iterates cyclic calls to a fixed point, and reuses results. Authors
|
|
841
841
|
describe `path/2`; the engine chooses the recursive strategy.
|
|
@@ -905,7 +905,7 @@ reverse_go([X | Xs], Acc, Reversed) :-
|
|
|
905
905
|
reverse_go(Xs, [X | Acc], Reversed).
|
|
906
906
|
```
|
|
907
907
|
|
|
908
|
-
No mutation occurs; every call receives a new term.
|
|
908
|
+
No mutation occurs; every call receives a new term. Eyelang also includes
|
|
909
909
|
`member/2`, `append/3`, `select/3`, `nth0/3`, `reverse/2`, `length/2`,
|
|
910
910
|
`sort/2`, slicing helpers, and numeric summaries. Improper lists such as
|
|
911
911
|
`[a | Tail]` are valid terms, but operations requiring a proper finite list
|
|
@@ -1239,10 +1239,10 @@ plan(State, Goal, Seen, [Move | Moves]) :-
|
|
|
1239
1239
|
plan(Next, Goal, [Next | Seen], Moves).
|
|
1240
1240
|
```
|
|
1241
1241
|
|
|
1242
|
-
The visited list makes a finite state space explicit.
|
|
1242
|
+
The visited list makes a finite state space explicit. Eyelang is strongest when
|
|
1243
1243
|
the result is a logical consequence with a compact witness: a path, matching,
|
|
1244
1244
|
classification, schedule, proof, or bounded model. Mutable arrays and large
|
|
1245
|
-
numerical kernels generally belong in a host, with
|
|
1245
|
+
numerical kernels generally belong in a host, with Eyelang as the decision layer.
|
|
1246
1246
|
|
|
1247
1247
|
For the coloring program, the six printed answers are the permutations of
|
|
1248
1248
|
`red`, `green`, and `blue`:
|
|
@@ -1294,7 +1294,7 @@ database reading. Later work on stratification disciplined negative
|
|
|
1294
1294
|
dependencies. Aggregation continued the database lineage: a set of solutions
|
|
1295
1295
|
could itself become data, provided the nested search was finite.
|
|
1296
1296
|
|
|
1297
|
-
These distinctions explain
|
|
1297
|
+
These distinctions explain Eyelang's conservative treatment. Negation and
|
|
1298
1298
|
aggregation are powerful because they expose a bounded subcomputation. Their
|
|
1299
1299
|
safety comes not from punctuation but from a mathematical argument about scope
|
|
1300
1300
|
and termination.
|
|
@@ -1314,8 +1314,8 @@ support, integrity checks expose invalid states, and knowledge boundaries stay e
|
|
|
1314
1314
|
|
|
1315
1315
|
## 11. Queries, answers, and proofs
|
|
1316
1316
|
|
|
1317
|
-
|
|
1318
|
-
`eyelang --goal 'child(X, Y)' program.pl`.
|
|
1317
|
+
Eyelang goals are supplied by the host, for example
|
|
1318
|
+
`eyelang --goal 'child(X, Y)' program.pl`. Eyelang prints ground answers, removes
|
|
1319
1319
|
duplicates, and suppresses answers that merely repeat source facts. Answers
|
|
1320
1320
|
are not inserted back into the running program.
|
|
1321
1321
|
|
|
@@ -1350,7 +1350,7 @@ why(
|
|
|
1350
1350
|
).
|
|
1351
1351
|
```
|
|
1352
1352
|
|
|
1353
|
-
Proof output is valid
|
|
1353
|
+
Proof output is valid Eyelang input:
|
|
1354
1354
|
|
|
1355
1355
|
```sh
|
|
1356
1356
|
eyelang --proof examples/socrates.pl > socrates.why.pl
|
|
@@ -1580,7 +1580,7 @@ itself.
|
|
|
1580
1580
|
|
|
1581
1581
|
## 15. RDF 1.2 as the interoperable data boundary
|
|
1582
1582
|
|
|
1583
|
-
|
|
1583
|
+
Eyelang keeps RDF 1.2 at an explicit standards boundary. Adapter tools translate
|
|
1584
1584
|
datasets into ordinary `rdf(Subject, Predicate, Object, Graph)` facts, allowing
|
|
1585
1585
|
standard RDF data to be queried by the supported ISO Prolog profile:
|
|
1586
1586
|
|
|
@@ -1647,9 +1647,9 @@ By default, source quads support inference but are not copied to output. Pass
|
|
|
1647
1647
|
|
|
1648
1648
|
**Checkpoint.** For one RDF statement, identify its subject, predicate, object,
|
|
1649
1649
|
and graph term after conversion. Then explain why preserving a triple term as
|
|
1650
|
-
nested data does not assert that nested triple as a global
|
|
1650
|
+
nested data does not assert that nested triple as a global Eyelang fact.
|
|
1651
1651
|
|
|
1652
|
-
## 16. Embedding
|
|
1652
|
+
## 16. Embedding Eyelang
|
|
1653
1653
|
|
|
1654
1654
|
The JavaScript API exposes a convenience runner and lower-level types:
|
|
1655
1655
|
|
|
@@ -1706,7 +1706,7 @@ truncate search; it does not prove that no further answer exists.
|
|
|
1706
1706
|
|
|
1707
1707
|
The source layout mirrors the public registry boundary. `src/iso.js` contains
|
|
1708
1708
|
the isolated ISO processor predicates and registry. `src/library.js` contains
|
|
1709
|
-
the complete
|
|
1709
|
+
the complete Eyelang library predicates as native JavaScript
|
|
1710
1710
|
builtins described in Chapter 39. No bundled Prolog source is parsed or
|
|
1711
1711
|
overlaid at startup. Normal CLI, JavaScript, solver, and proof execution uses
|
|
1712
1712
|
that composed registry. The browser entry `src/playground-worker.js` constructs
|
|
@@ -1718,19 +1718,19 @@ and proof machinery.
|
|
|
1718
1718
|
|
|
1719
1719
|
### Extending the built-in registry
|
|
1720
1720
|
|
|
1721
|
-
An embedder can start from the default
|
|
1721
|
+
An embedder can start from the default Eyelang registry and add a host relation. A
|
|
1722
1722
|
handler is a generator over environments. It should clone before binding and
|
|
1723
1723
|
yield only environments in which its result unifies:
|
|
1724
1724
|
|
|
1725
1725
|
```js
|
|
1726
1726
|
import {
|
|
1727
1727
|
atom,
|
|
1728
|
-
|
|
1728
|
+
createEyelangRegistry,
|
|
1729
1729
|
run,
|
|
1730
1730
|
unify
|
|
1731
1731
|
} from 'eyelang';
|
|
1732
1732
|
|
|
1733
|
-
const registry =
|
|
1733
|
+
const registry = createEyelangRegistry();
|
|
1734
1734
|
|
|
1735
1735
|
registry.add(
|
|
1736
1736
|
'host_status',
|
|
@@ -1763,7 +1763,7 @@ define it raise `permission_error(modify, static_procedure)`. Programs expose st
|
|
|
1763
1763
|
`stratifiedNegation`, `negationStratificationErrors`, and
|
|
1764
1764
|
`assertStratifiedNegation()`.
|
|
1765
1765
|
|
|
1766
|
-
Treat remote source as executable logic. Although
|
|
1766
|
+
Treat remote source as executable logic. Although Eyelang has no arbitrary host
|
|
1767
1767
|
call primitive, search can consume CPU and memory. Embedders should impose
|
|
1768
1768
|
appropriate depth, solution, input-size, and time limits.
|
|
1769
1769
|
|
|
@@ -1775,7 +1775,7 @@ conclusion.
|
|
|
1775
1775
|
|
|
1776
1776
|
Rules often outlive the source of their facts. Today `parent/2` may be written
|
|
1777
1777
|
in the same file as `ancestor/2`; tomorrow it may come from a database adapter,
|
|
1778
|
-
a document extractor, or an agent. An **
|
|
1778
|
+
a document extractor, or an agent. An **Eyelang Socket** gives that opening a
|
|
1779
1779
|
name and a contract:
|
|
1780
1780
|
|
|
1781
1781
|
<figure>
|
|
@@ -1811,11 +1811,11 @@ know about them can check that a provider offers the promised predicate.
|
|
|
1811
1811
|
|
|
1812
1812
|
Sockets are particularly valuable at an AI boundary. A model can propose
|
|
1813
1813
|
claims, but the claims should enter the theory as visible facts or rules. The
|
|
1814
|
-
socket states what kind of knowledge may enter;
|
|
1814
|
+
socket states what kind of knowledge may enter; Eyelang checks and combines the
|
|
1815
1815
|
result; `why/2` records which supplied clauses actually supported an answer.
|
|
1816
1816
|
|
|
1817
1817
|
**Checkpoint.** Name three separate responsibilities in an embedded service:
|
|
1818
|
-
what the host validates before constructing terms, what
|
|
1818
|
+
what the host validates before constructing terms, what Eyelang derives from
|
|
1819
1819
|
those terms, and what resource limits may interrupt the run. None can safely
|
|
1820
1820
|
stand in for the other two.
|
|
1821
1821
|
|
|
@@ -1841,14 +1841,14 @@ The least-model semantics developed by van Emden and Kowalski in 1976 connected
|
|
|
1841
1841
|
definite programs to a mathematical fixed point: repeatedly add supported
|
|
1842
1842
|
ground consequences until nothing new appears. Tabled logic programming later
|
|
1843
1843
|
turned fixed-point ideas into a goal-directed technique that shares recursive
|
|
1844
|
-
calls and accumulates answers.
|
|
1844
|
+
calls and accumulates answers. Eyelang's automatic positive tabling is smaller
|
|
1845
1845
|
than the general systems in that literature, but inherits their central
|
|
1846
1846
|
insight: remembering a recursive question can change termination without
|
|
1847
1847
|
changing what the relation says.
|
|
1848
1848
|
|
|
1849
1849
|
In parallel, deductive databases and Semantic Web systems asked where facts
|
|
1850
1850
|
come from, how vocabularies align, and how derived claims retain provenance.
|
|
1851
|
-
EYE belongs to that proof-producing Semantic Web tradition.
|
|
1851
|
+
EYE belongs to that proof-producing Semantic Web tradition. Eyelang adopts the
|
|
1852
1852
|
expectation that conclusions should be inspectable while implementing a
|
|
1853
1853
|
focused ISO Prolog profile and explicit RDF 1.2 adapters.
|
|
1854
1854
|
|
|
@@ -1862,7 +1862,7 @@ when those boundaries became named rather than implicit.
|
|
|
1862
1862
|
# Part IV — The craft of logic programming
|
|
1863
1863
|
|
|
1864
1864
|
<figure>
|
|
1865
|
-
<img src="book-assets/part-4-craft.svg" alt="A logic programmer works between domain sketches, design questions, and tested
|
|
1865
|
+
<img src="book-assets/part-4-craft.svg" alt="A logic programmer works between domain sketches, design questions, and tested Eyelang clauses.">
|
|
1866
1866
|
<figcaption>Craft moves repeatedly between the real domain, the relations on paper, executable clauses, answers, and proofs.</figcaption>
|
|
1867
1867
|
</figure>
|
|
1868
1868
|
|
|
@@ -2336,7 +2336,7 @@ invariants and modes. Sterling and Shapiro made construction and improvement
|
|
|
2336
2336
|
central to *The Art of Prolog*, showing that declarative clarity and
|
|
2337
2337
|
procedural competence mature together.
|
|
2338
2338
|
|
|
2339
|
-
|
|
2339
|
+
Eyelang removes several classic Prolog control devices, especially cut. The
|
|
2340
2340
|
smaller surface changes the techniques but not the problem: authors must still
|
|
2341
2341
|
turn a true relation into a productive computation and say what was preserved.
|
|
2342
2342
|
|
|
@@ -2353,7 +2353,7 @@ a search tree, represent languages and evaluators as relations, transform a
|
|
|
2353
2353
|
correct program without losing its meaning, and organize a decision system
|
|
2354
2354
|
whose conclusions remain auditable.
|
|
2355
2355
|
|
|
2356
|
-
|
|
2356
|
+
Eyelang now supplies the Part 1 control, dynamic-database, operator, and I/O
|
|
2357
2357
|
families. It remains deliberately smaller than the wider Prolog ecosystem:
|
|
2358
2358
|
modules, predicate variables in callable position, and definite-clause grammar
|
|
2359
2359
|
notation are outside this profile. The examples still prefer explicit domain
|
|
@@ -2674,7 +2674,7 @@ simplification and permits unbounded rewriting.
|
|
|
2674
2674
|
repeatedly combined.
|
|
2675
2675
|
|
|
2676
2676
|
**Checkpoint.** For one compound term, label the object-language syntax, the
|
|
2677
|
-
|
|
2677
|
+
Eyelang relation that inspects it, and the environment or state used to interpret
|
|
2678
2678
|
it. Then identify a rewrite pair that would create a cycle if both directions
|
|
2679
2679
|
were enabled.
|
|
2680
2680
|
|
|
@@ -3100,14 +3100,14 @@ several proofs. If badge identity belongs in the answer, define
|
|
|
3100
3100
|
|
|
3101
3101
|
### Embedding and audit
|
|
3102
3102
|
|
|
3103
|
-
Authenticate source systems in the host, convert records to
|
|
3103
|
+
Authenticate source systems in the host, convert records to Eyelang facts, run
|
|
3104
3104
|
the theory, and store the answer with its proof and input version. The solver
|
|
3105
3105
|
can explain logical support; it cannot attest that a badge database was current
|
|
3106
3106
|
or a training provider trustworthy.
|
|
3107
3107
|
|
|
3108
3108
|
```text
|
|
3109
3109
|
authenticated source snapshot
|
|
3110
|
-
-> normalized
|
|
3110
|
+
-> normalized Eyelang facts
|
|
3111
3111
|
-> checked theory
|
|
3112
3112
|
-> permit and reason
|
|
3113
3113
|
-> proof referencing clauses and facts
|
|
@@ -3159,13 +3159,13 @@ relation could be specialized when part of its input was known.
|
|
|
3159
3159
|
Futamura's work in the 1970s gave partial evaluation a striking interpretation:
|
|
3160
3160
|
specializing an interpreter with respect to a source program can produce a
|
|
3161
3161
|
compiled form. Logic-program transformation developed related practices of
|
|
3162
|
-
unfolding, folding, and specialization. The inheritance for
|
|
3162
|
+
unfolding, folding, and specialization. The inheritance for Eyelang is not a
|
|
3163
3163
|
promise that every classic transformation is built in. It is the demand that a
|
|
3164
3164
|
transformation name its invariant and preserve a stated answer contract.
|
|
3165
3165
|
|
|
3166
3166
|
*The Art of Prolog* joined computation, construction, nondeterminism, grammars,
|
|
3167
3167
|
interpreters, transformation, and applications into a sustained account of
|
|
3168
|
-
craft. Part V pays tribute to that breadth through
|
|
3168
|
+
craft. Part V pays tribute to that breadth through Eyelang's explicit subset:
|
|
3169
3169
|
syntax is data, state is an argument, and audit evidence remains visible.
|
|
3170
3170
|
|
|
3171
3171
|
---
|
|
@@ -3195,13 +3195,13 @@ inherits the twentieth century's harder questions. What counts as a formal
|
|
|
3195
3195
|
proof? What is an effective procedure? Which truths follow from a finite set
|
|
3196
3196
|
of axioms? Which questions cannot be decided by any uniform mechanical method?
|
|
3197
3197
|
|
|
3198
|
-
|
|
3198
|
+
Eyelang is a very small descendant of those questions. It is not a foundation
|
|
3199
3199
|
for all mathematics, a computer algebra system, or an interactive theorem
|
|
3200
3200
|
prover. Its definite clauses cover only a disciplined fragment of logic.
|
|
3201
3201
|
Precisely because the fragment is small, however, one can see the ancient
|
|
3202
3202
|
mathematical acts inside the running machine:
|
|
3203
3203
|
|
|
3204
|
-
| Mathematical act |
|
|
3204
|
+
| Mathematical act | Eyelang form | Operational consequence |
|
|
3205
3205
|
| --- | --- | --- |
|
|
3206
3206
|
| Define a class | facts and clauses | enumerate its instances |
|
|
3207
3207
|
| Introduce an unknown | a variable | seek a substitution |
|
|
@@ -3214,7 +3214,7 @@ mathematical acts inside the running machine:
|
|
|
3214
3214
|
| Explain a conclusion | a proof term | expose the successful derivation |
|
|
3215
3215
|
|
|
3216
3216
|
The table is a correspondence, not an identity. A mathematical proof and an
|
|
3217
|
-
|
|
3217
|
+
Eyelang execution answer different questions unless the encoding between them is
|
|
3218
3218
|
itself justified. This Part develops both the power and the limit of the
|
|
3219
3219
|
correspondence.
|
|
3220
3220
|
|
|
@@ -3311,7 +3311,7 @@ should come from.
|
|
|
3311
3311
|
|
|
3312
3312
|
This is an important distinction between mathematical existence and
|
|
3313
3313
|
executable witness production. A classical proof may establish that something
|
|
3314
|
-
exists without furnishing an efficient construction. An
|
|
3314
|
+
exists without furnishing an efficient construction. An Eyelang query produces
|
|
3315
3315
|
a witness only when its clauses and control actually reach one.
|
|
3316
3316
|
|
|
3317
3317
|
### Proof objects and proof checking
|
|
@@ -3674,7 +3674,7 @@ That checklist joins abstract algebra, data modeling, and program design.
|
|
|
3674
3674
|
commutative. Explain why one witness refutes a universal law.
|
|
3675
3675
|
|
|
3676
3676
|
**Checkpoint.** Pick a domain value with two possible representations. State
|
|
3677
|
-
whether
|
|
3677
|
+
whether Eyelang regards them as structurally equal, whether the domain regards
|
|
3678
3678
|
them as equivalent, and which normalization or explicit relation connects the
|
|
3679
3679
|
two notions.
|
|
3680
3680
|
|
|
@@ -3745,7 +3745,7 @@ testing are so productive.
|
|
|
3745
3745
|
### Finite model exploration
|
|
3746
3746
|
|
|
3747
3747
|
A finite structure consists of a finite carrier and interpretations of its
|
|
3748
|
-
operations and relations.
|
|
3748
|
+
operations and relations. Eyelang can enumerate candidates, apply axioms as
|
|
3749
3749
|
filters, and return models or countermodels. The method is mathematically
|
|
3750
3750
|
serious because the scope is explicit.
|
|
3751
3751
|
|
|
@@ -3843,7 +3843,7 @@ axioms + definitions + inference rules
|
|
|
3843
3843
|
-> theorem
|
|
3844
3844
|
```
|
|
3845
3845
|
|
|
3846
|
-
Every trustworthy
|
|
3846
|
+
Every trustworthy Eyelang conclusion has the same broad shape:
|
|
3847
3847
|
|
|
3848
3848
|
```text
|
|
3849
3849
|
source facts + clauses + built-in semantics + execution assumptions
|
|
@@ -3900,7 +3900,7 @@ effective method that settles every sufficiently expressive mathematical
|
|
|
3900
3900
|
question. No amount of faster hardware turns an undecidable general problem
|
|
3901
3901
|
into a decidable one.
|
|
3902
3902
|
|
|
3903
|
-
|
|
3903
|
+
Eyelang has smaller, immediate limits:
|
|
3904
3904
|
|
|
3905
3905
|
- some relations have infinitely many answers;
|
|
3906
3906
|
- depth-first search may pursue an unproductive branch;
|
|
@@ -3939,7 +3939,7 @@ certainty whose boundary is visible.
|
|
|
3939
3939
|
|
|
3940
3940
|
### A final program-reading ritual
|
|
3941
3941
|
|
|
3942
|
-
Before trusting an
|
|
3942
|
+
Before trusting an Eyelang conclusion, ask:
|
|
3943
3943
|
|
|
3944
3944
|
1. What does the ground answer say in the domain?
|
|
3945
3945
|
2. Which facts and rules support it?
|
|
@@ -3966,7 +3966,7 @@ Preserve the proof.
|
|
|
3966
3966
|
visible in its explanation.
|
|
3967
3967
|
4. Find one claim in your own program for which tests provide evidence but not
|
|
3968
3968
|
proof. State the missing universal argument.
|
|
3969
|
-
5. Write a one-page “trust contract” for an embedded
|
|
3969
|
+
5. Write a one-page “trust contract” for an embedded Eyelang service: accepted
|
|
3970
3970
|
sources, model scope, numeric assumptions, resource bounds, proof retention,
|
|
3971
3971
|
and known limits.
|
|
3972
3972
|
|
|
@@ -4010,7 +4010,7 @@ inspected together.
|
|
|
4010
4010
|
|
|
4011
4011
|
The deeper inheritance is a style of honesty. Mathematics advanced by proving
|
|
4012
4012
|
not only more statements but also where methods fail, separating truth,
|
|
4013
|
-
provability, decidability, and computation.
|
|
4013
|
+
provability, decidability, and computation. Eyelang's finite bounds, mode
|
|
4014
4014
|
restrictions, search risks, and trust boundaries belong inside its account for
|
|
4015
4015
|
the same reason: limits are part of the result, not fine print.
|
|
4016
4016
|
|
|
@@ -4791,7 +4791,7 @@ Here `Region` deliberately remains free and produces one answer per region;
|
|
|
4791
4791
|
`Seller` is hidden from grouping. This distinction matters whenever a
|
|
4792
4792
|
collection unexpectedly arrives as several answers.
|
|
4793
4793
|
|
|
4794
|
-
Integer arithmetic has similarly precise choices. In
|
|
4794
|
+
Integer arithmetic has similarly precise choices. In Eyelang's supported
|
|
4795
4795
|
profile, `div` and `//` both truncate the quotient toward zero. With a positive
|
|
4796
4796
|
divisor, `mod` returns a nonnegative modulo while `rem` keeps the dividend's
|
|
4797
4797
|
sign. For `-7` and `3`, the quotient is `-2`, but the two remainders are `2`
|
|
@@ -4858,9 +4858,9 @@ Atomic conversion predicates expose reversible representations:
|
|
|
4858
4858
|
- `char_code/2` converts one character; and
|
|
4859
4859
|
- `number_chars/2` and `number_codes/2` parse or render ISO numbers.
|
|
4860
4860
|
|
|
4861
|
-
These are atom relations, not the
|
|
4861
|
+
These are atom relations, not the Eyelang library's string convenience
|
|
4862
4862
|
predicates. Quoted atoms such as `'λ'` remain atoms; double-quoted values remain
|
|
4863
|
-
|
|
4863
|
+
Eyelang strings.
|
|
4864
4864
|
|
|
4865
4865
|
[`iso-reflective-terms.pl`](https://github.com/eyereasoner/eyelang/blob/main/examples/iso-reflective-terms.pl)
|
|
4866
4866
|
walks through shape, rebuilding, fresh copying, variables, and order.
|
|
@@ -4994,7 +4994,7 @@ effect belongs outside the central relation that decides what the term means.
|
|
|
4994
4994
|
|
|
4995
4995
|
## Part VIII summary
|
|
4996
4996
|
|
|
4997
|
-
The supported ISO facilities make
|
|
4997
|
+
The supported ISO facilities make Eyelang suitable for more than closed rule
|
|
4998
4998
|
files:
|
|
4999
4999
|
|
|
5000
5000
|
- control predicates delimit choices and exception recovery;
|
|
@@ -5026,11 +5026,11 @@ The long catalogs are meant to be entered locally, not memorized linearly.
|
|
|
5026
5026
|
## 38. Language and ISO profile
|
|
5027
5027
|
|
|
5028
5028
|
The standards baseline is ISO/IEC 13211-1:1995, as corrected by Technical
|
|
5029
|
-
Corrigenda 1:2007, 2:2012, and 3:2017.
|
|
5029
|
+
Corrigenda 1:2007, 2:2012, and 3:2017. Eyelang implements the compatibility
|
|
5030
5030
|
profile documented here; it does not claim certification as a complete
|
|
5031
5031
|
conforming processor.
|
|
5032
5032
|
|
|
5033
|
-
Prolog source accepted by
|
|
5033
|
+
Prolog source accepted by Eyelang is UTF-8. `%` starts a line comment and
|
|
5034
5034
|
`/* ... */` delimits a block comment. Plain atoms begin with a
|
|
5035
5035
|
lowercase ASCII letter. Variables begin with uppercase or underscore. The bare
|
|
5036
5036
|
`_` is fresh each time. Single quotes delimit quoted atoms; double quotes
|
|
@@ -5056,7 +5056,7 @@ angle-bracket IRIs are not syntax; quote names containing such punctuation.
|
|
|
5056
5056
|
|
|
5057
5057
|
In the grammar below, `{ x }` means zero or more repetitions of `x`, `[ x ]`
|
|
5058
5058
|
means that `x` is optional, and parentheses group alternatives. These marks
|
|
5059
|
-
describe the grammar; they are not characters written in
|
|
5059
|
+
describe the grammar; they are not characters written in Eyelang source.
|
|
5060
5060
|
|
|
5061
5061
|
```text
|
|
5062
5062
|
program ::= { clause }
|
|
@@ -5120,7 +5120,7 @@ depth-first resolution, while eligible positive recursive groups are tabled
|
|
|
5120
5120
|
automatically. `\+/1` is stratified negation as failure, not classical
|
|
5121
5121
|
negation.
|
|
5122
5122
|
|
|
5123
|
-
|
|
5123
|
+
Eyelang supports cut, operator declarations, dynamic database updates, grouped
|
|
5124
5124
|
solutions, exceptions, flags, initialization and inclusion directives, and
|
|
5125
5125
|
standard stream and term I/O. Modules and DCG notation remain outside this
|
|
5126
5126
|
Part 1 profile.
|
|
@@ -5140,7 +5140,7 @@ in place; repeated `ensure_loaded/1` designations are loaded once.
|
|
|
5140
5140
|
Normal output contains only ground query answers, one term and period at a
|
|
5141
5141
|
time. Source facts are not echoed as new conclusions, and duplicate answers
|
|
5142
5142
|
are suppressed. Answers are not asserted back into the running program.
|
|
5143
|
-
Supported output syntax is designed to be readable as Prolog input accepted by
|
|
5143
|
+
Supported output syntax is designed to be readable as Prolog input accepted by Eyelang.
|
|
5144
5144
|
|
|
5145
5145
|
#### Automatic hybrid reasoning
|
|
5146
5146
|
|
|
@@ -5182,8 +5182,8 @@ Queries for predicates with no group follow the known groups.
|
|
|
5182
5182
|
|
|
5183
5183
|
## 39. Built-in predicates by programming role
|
|
5184
5184
|
|
|
5185
|
-
|
|
5186
|
-
profile. Where a predicate is defined by ISO/IEC 13211-1:1995,
|
|
5185
|
+
Eyelang's default registry contains the built-ins in its ISO compatibility
|
|
5186
|
+
profile. Where a predicate is defined by ISO/IEC 13211-1:1995, Eyelang uses its
|
|
5187
5187
|
standard predicate indicator; the registry also includes a few later or common
|
|
5188
5188
|
compatibility predicates identified below. Arithmetic is expressed through
|
|
5189
5189
|
`is/2` rather than output arguments on arithmetic predicates. The registry
|
|
@@ -5221,7 +5221,7 @@ floating-point literals, unary `+` and `-`, `+`, `-`, `*`, `/`, `//`, `div`,
|
|
|
5221
5221
|
|
|
5222
5222
|
Arithmetic comparisons evaluate both operands. Standard term-order predicates
|
|
5223
5223
|
(`@<`, `@=<`, `@>`, `@>=`) compare terms without arithmetic evaluation.
|
|
5224
|
-
|
|
5224
|
+
Eyelang's documented profile order is not the complete ISO term order: strings
|
|
5225
5225
|
are a distinct scalar category, and numeric terms share one exact numeric
|
|
5226
5226
|
ordering category.
|
|
5227
5227
|
|
|
@@ -5241,9 +5241,9 @@ The JavaScript `ioOptions.input` and `ioOptions.write` hooks connect standard
|
|
|
5241
5241
|
streams to an embedder. File-backed streams use synchronous lifecycle semantics
|
|
5242
5242
|
so side effects occur in Prolog execution order.
|
|
5243
5243
|
|
|
5244
|
-
### The
|
|
5244
|
+
### The Eyelang library
|
|
5245
5245
|
|
|
5246
|
-
The runtime registry combines the supported ISO Prolog profile with the
|
|
5246
|
+
The runtime registry combines the supported ISO Prolog profile with the Eyelang library, implemented entirely in JavaScript. It is
|
|
5247
5247
|
loaded automatically by the CLI, `run()`, `Solver`, proof replay, and the browser
|
|
5248
5248
|
playground. Ordinary programs therefore use the same built-ins throughout.
|
|
5249
5249
|
All of these relations live in `src/library.js`; there is no second portable
|
|
@@ -5253,13 +5253,13 @@ ISO-only registry remains available through `createDefaultRegistry()` and
|
|
|
5253
5253
|
`getDefaultRegistry()` for conformance work and advanced embedders.
|
|
5254
5254
|
|
|
5255
5255
|
The complete registry contains **165 predicate indicators**: 115 in the isolated
|
|
5256
|
-
ISO profile and 50
|
|
5257
|
-
|
|
5256
|
+
ISO profile and 50 Eyelang library indicators implemented in `src/library.js`. Every
|
|
5257
|
+
Eyelang library definition is tagged with `eyeLangLibrary: true`, so tests and
|
|
5258
5258
|
embedders can audit the boundary directly.
|
|
5259
5259
|
|
|
5260
5260
|
<!-- eyelang-library-catalog:start -->
|
|
5261
5261
|
|
|
5262
|
-
|
|
|
5262
|
+
| Eyelang library predicates |
|
|
5263
5263
|
| --- |
|
|
5264
5264
|
| `append/3`, `member/2`, `select/3`, `last/2` |
|
|
5265
5265
|
| `nth0/3`, `nth1/3`, `set_nth0/4`, `take/3`, `drop/3`, `slice/4` |
|
|
@@ -5288,7 +5288,7 @@ the Prolog sense: each call has exactly one solution, although the generated ato
|
|
|
5288
5288
|
is intentionally different between calls. The implementation uses the Web Crypto API where available and remains
|
|
5289
5289
|
portable across Node and the browser playground.
|
|
5290
5290
|
|
|
5291
|
-
On the command line, the
|
|
5291
|
+
On the command line, the Eyelang library is already present:
|
|
5292
5292
|
|
|
5293
5293
|
```sh
|
|
5294
5294
|
eyelang program.pl
|
|
@@ -5309,7 +5309,7 @@ The mode notation below is descriptive:
|
|
|
5309
5309
|
- `-` means the predicate produces that argument;
|
|
5310
5310
|
- `?` means a bound value can be checked or an unbound value generated.
|
|
5311
5311
|
|
|
5312
|
-
Most
|
|
5312
|
+
Most Eyelang library predicates are projections or filters. When an input is
|
|
5313
5313
|
unbound, malformed, outside its domain, or incompatible with the requested
|
|
5314
5314
|
output, they normally **fail** rather than raising the ISO errors described in
|
|
5315
5315
|
the errors section above. They do not invent open-ended domains. Bind arithmetic operands, source
|
|
@@ -5339,15 +5339,15 @@ expresses them: for example, `R is A + B`, `R is abs(A)`, and
|
|
|
5339
5339
|
modulo, powers, sine, cosine, exponential, logarithm, and the ISO rounding
|
|
5340
5340
|
functions.
|
|
5341
5341
|
|
|
5342
|
-
The bundled
|
|
5342
|
+
The bundled Eyelang library layer defines `between/3` and
|
|
5343
5343
|
`smallest_divisor_from/3`. They are available in the default runtime, but remain
|
|
5344
|
-
part of the
|
|
5344
|
+
part of the Eyelang library and retain measured native accelerators. Choose the
|
|
5345
5345
|
smaller or larger of two arithmetic values directly with ISO control, for example
|
|
5346
5346
|
`(A =< B -> Min = A ; Min = B)` or `(A >= B -> Max = A ; Max = B)`.
|
|
5347
5347
|
|
|
5348
5348
|
#### List relations
|
|
5349
5349
|
|
|
5350
|
-
These relations are JavaScript implementations provided by the
|
|
5350
|
+
These relations are JavaScript implementations provided by the Eyelang library.
|
|
5351
5351
|
Their relational modes and error behavior are regression-checked against
|
|
5352
5352
|
equivalent clause definitions. Every list-consuming relation below expects a
|
|
5353
5353
|
proper list unless explicitly stated otherwise. Indexes and counts are
|
|
@@ -5371,7 +5371,7 @@ zero-based, nonnegative safe integers.
|
|
|
5371
5371
|
| `reverse(+List,-Reversed)` | Reverses a proper list. |
|
|
5372
5372
|
| `length(?List,?Length)` | Reports or checks the length of a proper list, or generates a list skeleton when `Length` is a bound nonnegative integer. |
|
|
5373
5373
|
| `sum_list(+List,-Sum)` | Sums numeric elements with ISO `is/2`. The empty sum is `0`; invalid arithmetic raises the corresponding ISO error. |
|
|
5374
|
-
| `min_list(+List,-Min)`, `max_list(+List,-Max)` | Select by
|
|
5374
|
+
| `min_list(+List,-Min)`, `max_list(+List,-Max)` | Select by Eyelang term order, not numeric coercion. Empty lists fail. |
|
|
5375
5375
|
| `list_to_set(+List,-Set)` | Removes later structural duplicates while preserving first-occurrence order. |
|
|
5376
5376
|
| `sort(+List,-Set)` | Sorts by standard term order and removes structural duplicates. |
|
|
5377
5377
|
|
|
@@ -5388,7 +5388,7 @@ eyelang --goal 'answer(Kind, Value)' program.pl
|
|
|
5388
5388
|
#### Native strings, lexical values, and regular expressions
|
|
5389
5389
|
|
|
5390
5390
|
A **lexical value** is the textual spelling of a ground atom, string, or
|
|
5391
|
-
number. Most string predicates accept any of those inputs but produce
|
|
5391
|
+
number. Most string predicates accept any of those inputs but produce Eyelang
|
|
5392
5392
|
string terms unless their name says otherwise.
|
|
5393
5393
|
|
|
5394
5394
|
| Predicate and principal mode | Behavior |
|
|
@@ -5404,7 +5404,7 @@ string terms unless their name says otherwise.
|
|
|
5404
5404
|
| `lowercase(+Text,-Lower)`, `uppercase(+Text,-Upper)`, `trim(+Text,-Trimmed)` | Apply JavaScript Unicode case conversion or surrounding-whitespace trimming. |
|
|
5405
5405
|
| `number_string(?Number,?Text)` | Converts a number to a string or parses numeric string/atom text. At least one conversion direction must be ready. |
|
|
5406
5406
|
| `atom_string(?Atom,?Text)` | Converts an atom to a string or a ground string, atom, or number to an atom. |
|
|
5407
|
-
| `term_string(+Term,-Text)` | Renders a nonvariable term using
|
|
5407
|
+
| `term_string(+Term,-Text)` | Renders a nonvariable term using Eyelang readback syntax. It does not parse text back into a term. |
|
|
5408
5408
|
|
|
5409
5409
|
`contains/2` and `matches/2` retain measured native accelerators for bound
|
|
5410
5410
|
lexical inputs. Calls outside that mode fall through to the native builtins,
|
|
@@ -5436,7 +5436,7 @@ intended to restrict its domain.
|
|
|
5436
5436
|
| `aggregate_min(+KeyTemplate,+ValueTemplate,+Goal,-BestKey,-BestValue)` | Retains the solution with the smallest resolved key under standard term order. |
|
|
5437
5437
|
| `aggregate_max(+KeyTemplate,+ValueTemplate,+Goal,-BestKey,-BestValue)` | Retains the solution with the largest resolved key. Both best-value predicates fail on an empty solution set and retain the first solution on an equal key. |
|
|
5438
5438
|
|
|
5439
|
-
ISO `findall/3` is present in both registries. The
|
|
5439
|
+
ISO `findall/3` is present in both registries. The Eyelang library aggregates follow
|
|
5440
5440
|
the same scoping principle: variables created inside the nested search do not
|
|
5441
5441
|
leak except through the declared templates and outputs.
|
|
5442
5442
|
|
|
@@ -5487,7 +5487,7 @@ The ISO profile includes `functor/3`, `arg/3`, and `=../2`. Use `=../2` for whol
|
|
|
5487
5487
|
decomposition and construction, `=/2` for unification, and `\=/2` for
|
|
5488
5488
|
non-unifiability; redundant aliases are not registered.
|
|
5489
5489
|
|
|
5490
|
-
## 40. Running
|
|
5490
|
+
## 40. Running Eyelang: command line and corpus
|
|
5491
5491
|
|
|
5492
5492
|
The command line is an observation boundary around a theory. Keep the program
|
|
5493
5493
|
fixed while selecting the evidence you need: ordinary output for answers,
|
|
@@ -5495,7 +5495,7 @@ proof output for support, warnings for portability risks, and statistics for
|
|
|
5495
5495
|
search behavior.
|
|
5496
5496
|
|
|
5497
5497
|
<figure>
|
|
5498
|
-
<img src="book-assets/cli-observation-loop.svg" alt="An
|
|
5498
|
+
<img src="book-assets/cli-observation-loop.svg" alt="An Eyelang source and query enter the CLI, which separates ground answers and proofs on standard output, warnings and statistics on standard error, and a process status for automation; comparison leads back to program revision.">
|
|
5499
5499
|
<figcaption>The CLI exposes three independent channels. Compare each with the right prediction before revising the theory: answers and proofs on stdout, diagnostics on stderr, and status for the calling process.</figcaption>
|
|
5500
5500
|
</figure>
|
|
5501
5501
|
|
|
@@ -5512,7 +5512,7 @@ selects what to solve. Supply `--goal` followed by a callable Prolog goal:
|
|
|
5512
5512
|
eyelang --goal 'ancestor(ada, Who)' examples/ancestor.pl
|
|
5513
5513
|
```
|
|
5514
5514
|
|
|
5515
|
-
Repeat `--goal` to request several result relations in one run.
|
|
5515
|
+
Repeat `--goal` to request several result relations in one run. Eyelang prints
|
|
5516
5516
|
their ground answers in the order the goals were supplied.
|
|
5517
5517
|
|
|
5518
5518
|
For a self-running example, place the host goal in an ordinary comment:
|
|
@@ -5568,7 +5568,7 @@ eyelang --stats --goal 'path(a, X)' examples/path-discovery.pl > answers.pl 2> r
|
|
|
5568
5568
|
```
|
|
5569
5569
|
|
|
5570
5570
|
Normal answers and `why/2` terms go to stdout, which makes them suitable for a
|
|
5571
|
-
golden file or another
|
|
5571
|
+
golden file or another Eyelang input. Warnings and statistics go to stderr so
|
|
5572
5572
|
they do not corrupt that logical stream. A successful run normally exits with
|
|
5573
5573
|
status zero; loading, syntax, option, and other uncaught errors use status `1`. `halt/0-1` can deliberately choose the
|
|
5574
5574
|
process status from inside a program.
|
|
@@ -5667,7 +5667,7 @@ Review questions:
|
|
|
5667
5667
|
### Further examples
|
|
5668
5668
|
|
|
5669
5669
|
<figure>
|
|
5670
|
-
<img src="book-assets/example-landscape.svg" alt="A map connects
|
|
5670
|
+
<img src="book-assets/example-landscape.svg" alt="A map connects Eyelang examples across mathematics, search, planning, policy, science, program analysis, symbolic systems, and RDF.">
|
|
5671
5671
|
<figcaption>The corpus is a connected landscape. Every path leads from a readable source program to checked answers and, for selected examples, checked proofs.</figcaption>
|
|
5672
5672
|
</figure>
|
|
5673
5673
|
|
|
@@ -5679,7 +5679,7 @@ explanation under [examples/proof](https://github.com/eyereasoner/eyelang/tree/m
|
|
|
5679
5679
|
itself rather than merely naming it.
|
|
5680
5680
|
|
|
5681
5681
|
The generated [`examples/book/`](https://github.com/eyereasoner/eyelang/tree/main/examples/book/) tree serves a different
|
|
5682
|
-
purpose: it mirrors the complete inline
|
|
5682
|
+
purpose: it mirrors the complete inline Eyelang displays chapter by chapter.
|
|
5683
5683
|
Those files are checked for syntax, and displays containing queries are
|
|
5684
5684
|
executed, but some teaching fragments deliberately depend on neighboring
|
|
5685
5685
|
facts or helpers. Use the top-level catalog below when you want a self-contained
|
|
@@ -5889,7 +5889,7 @@ the clauses.
|
|
|
5889
5889
|
| [Peano calculus](https://github.com/eyereasoner/eyelang/blob/main/examples/peano-calculus.pl) | Addition, multiplication, and factorial follow the constructors `z` and `s/1`. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/peano-calculus.pl) |
|
|
5890
5890
|
| [Peasant](https://github.com/eyereasoner/eyelang/blob/main/examples/peasant.pl) | Peasant multiplication and exponentiation cases, adapted from Eyelet. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/peasant.pl) |
|
|
5891
5891
|
| [Pell equation](https://github.com/eyereasoner/eyelang/blob/main/examples/pell-equation.pl) | Bounded generation searches for integer witnesses to a Diophantine equation. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/pell-equation.pl) |
|
|
5892
|
-
| [Pi](https://github.com/eyereasoner/eyelang/blob/main/examples/pi.pl) | The Nilakantha series is a deterministic numeric recurrence;
|
|
5892
|
+
| [Pi](https://github.com/eyereasoner/eyelang/blob/main/examples/pi.pl) | The Nilakantha series is a deterministic numeric recurrence; Eyelang recognizes its accumulator shape and executes 10,000 terms without tabling or heap growth. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/pi.pl) |
|
|
5893
5893
|
| [Prime range](https://github.com/eyereasoner/eyelang/blob/main/examples/prime-range.pl) | Bounded integer generation and divisor tests enumerate primes over an explicit finite interval. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/prime-range.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/prime-range.pl) |
|
|
5894
5894
|
| [Quadratic Formula](https://github.com/eyereasoner/eyelang/blob/main/examples/quadratic-formula.pl) | Quadratic formula over sample equations. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/quadratic-formula.pl) |
|
|
5895
5895
|
| [Riemann Hypothesis](https://github.com/eyereasoner/eyelang/blob/main/examples/riemann-hypothesis.pl) | A deliberately finite audit of catalogued non-trivial zeros, illustrating the boundary between evidence and universal proof. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/riemann-hypothesis.pl) |
|
|
@@ -5907,7 +5907,7 @@ model checking, refutation by one witness, and witness-producing number theory.
|
|
|
5907
5907
|
#### Symbolic mathematics, languages, and metaprogramming
|
|
5908
5908
|
|
|
5909
5909
|
Here terms denote syntax, formulas, expressions, or programs. The crucial
|
|
5910
|
-
discipline is to keep object language and
|
|
5910
|
+
discipline is to keep object language and Eyelang metalanguage distinct.
|
|
5911
5911
|
|
|
5912
5912
|
| Program | What the terms represent | Checked answer |
|
|
5913
5913
|
| --- | --- | --- |
|
|
@@ -5934,7 +5934,7 @@ discipline is to keep object language and EyeLang metalanguage distinct.
|
|
|
5934
5934
|
Inspect the outermost functor of every data term. In the derivative example it
|
|
5935
5935
|
names an expression constructor; in the SAT examples it names logical syntax;
|
|
5936
5936
|
in the Turing example it helps describe a machine configuration. None of those
|
|
5937
|
-
nested terms is automatically asserted as an
|
|
5937
|
+
nested terms is automatically asserted as an Eyelang goal.
|
|
5938
5938
|
|
|
5939
5939
|
#### Program analysis and verification
|
|
5940
5940
|
|
|
@@ -6030,7 +6030,7 @@ interpretable as that modeling boundary.
|
|
|
6030
6030
|
#### RDF 1.2 and knowledge boundaries
|
|
6031
6031
|
|
|
6032
6032
|
These programs are generated from RDF inputs by the repository tools. Follow
|
|
6033
|
-
the source data, generated
|
|
6033
|
+
the source data, generated Eyelang facts, rules, answers, and serialized RDF as
|
|
6034
6034
|
one adapter pipeline.
|
|
6035
6035
|
|
|
6036
6036
|
| Program | RDF feature | Checked answer |
|
|
@@ -6045,7 +6045,7 @@ one adapter pipeline.
|
|
|
6045
6045
|
| [TriG graph join](https://github.com/eyereasoner/eyelang/blob/main/examples/rdf12-trig-graph-join.pl) | Rules join facts while retaining their graph-sensitive representation. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/rdf12-trig-graph-join.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/rdf12-trig-graph-join.pl) |
|
|
6046
6046
|
| [TriG named graph](https://github.com/eyereasoner/eyelang/blob/main/examples/rdf12-trig-named-graph.pl) | The fourth `rdf/4` argument preserves graph identity. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/rdf12-trig-named-graph.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/rdf12-trig-named-graph.pl) |
|
|
6047
6047
|
| [TriG triple term](https://github.com/eyereasoner/eyelang/blob/main/examples/rdf12-trig-triple-term.pl) | RDF 1.2 triple terms and dataset graph structure appear together. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/rdf12-trig-triple-term.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/rdf12-trig-triple-term.pl) |
|
|
6048
|
-
| [Triple term](https://github.com/eyereasoner/eyelang/blob/main/examples/rdf12-triple-term.pl) | An RDF 1.2 triple term is represented as nested
|
|
6048
|
+
| [Triple term](https://github.com/eyereasoner/eyelang/blob/main/examples/rdf12-triple-term.pl) | An RDF 1.2 triple term is represented as nested Eyelang data and projected by a rule. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/rdf12-triple-term.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/rdf12-triple-term.pl) |
|
|
6049
6049
|
| [Web names](https://github.com/eyereasoner/eyelang/blob/main/examples/web-names.pl) | Quoted web identifiers remain atom constants in ordinary Prolog terms. | [answers](https://github.com/eyereasoner/eyelang/blob/main/examples/output/web-names.pl) · [proof](https://github.com/eyereasoner/eyelang/blob/main/examples/proof/web-names.pl) |
|
|
6050
6050
|
|
|
6051
6051
|
The original RDF fixtures and adapter rules are available in
|
|
@@ -6105,7 +6105,7 @@ sentence, mode, finite domain, answer, proof, and revision.
|
|
|
6105
6105
|
|
|
6106
6106
|
## 42. Standards, limits, and implementation boundaries
|
|
6107
6107
|
|
|
6108
|
-
This book is the single reference for the
|
|
6108
|
+
This book is the single reference for the Eyelang implementation. Chapters 38–40
|
|
6109
6109
|
describe its supported ISO Prolog syntax, directives, execution model,
|
|
6110
6110
|
built-in predicates, and command-line interface. The earlier chapters explain the reasoner, automatic tabling,
|
|
6111
6111
|
proof terms, warnings, answer formatting, embedding, and external data
|
|
@@ -6154,7 +6154,7 @@ npm run test:playground
|
|
|
6154
6154
|
|
|
6155
6155
|
### Supported ISO Prolog profile
|
|
6156
6156
|
|
|
6157
|
-
|
|
6157
|
+
Eyelang executes a documented and tested **ISO compatibility profile** based on
|
|
6158
6158
|
ISO/IEC 13211-1:1995 and its three technical corrigenda. The exact supported
|
|
6159
6159
|
predicate indicators—not a claim about the standard's complete processor
|
|
6160
6160
|
environment—are listed in Chapter 39. The profile includes control and
|
|
@@ -6165,15 +6165,15 @@ termination. `compare/3`, `callable/1`, `ground/1`, and `term_variables/2` are
|
|
|
6165
6165
|
additional compatibility conveniences.
|
|
6166
6166
|
|
|
6167
6167
|
This breadth is not a formal certification of every processor requirement.
|
|
6168
|
-
The executable examples are
|
|
6169
|
-
strings, explicit integrity relations, automatic tabling, and the
|
|
6168
|
+
The executable examples are Eyelang-profile programs using host-supplied goals,
|
|
6169
|
+
strings, explicit integrity relations, automatic tabling, and the Eyelang library.
|
|
6170
6170
|
The remaining qualifications are:
|
|
6171
6171
|
|
|
6172
6172
|
- zero-arity compound syntax such as `ready()` is represented by the atom
|
|
6173
6173
|
`ready`;
|
|
6174
6174
|
- modules and DCG notation are outside this Part 1 profile;
|
|
6175
6175
|
- variables cannot occupy functor or predicate position;
|
|
6176
|
-
- double-quoted text is a distinct
|
|
6176
|
+
- double-quoted text is a distinct Eyelang string scalar rather than switching
|
|
6177
6177
|
representation with the `double_quotes` flag;
|
|
6178
6178
|
- `write_term/2-3` implements `quoted/1`, `ignore_ops/1`, `numbervars/1`,
|
|
6179
6179
|
and `variable_names/1`; other write options and some option/error precedence
|
|
@@ -6184,12 +6184,12 @@ The remaining qualifications are:
|
|
|
6184
6184
|
Write terms explicitly, keep variables uppercase or underscore-prefixed, and
|
|
6185
6185
|
quote atom names that are neither lowercase plain names nor graphic tokens.
|
|
6186
6186
|
These boundaries distinguish implemented ISO functionality from certification.
|
|
6187
|
-
The
|
|
6187
|
+
The Eyelang corpus verifies this documented profile; it is not an independent
|
|
6188
6188
|
certification that every conforming Prolog text will run unchanged.
|
|
6189
6189
|
|
|
6190
6190
|
### Security and resource use
|
|
6191
6191
|
|
|
6192
|
-
|
|
6192
|
+
Eyelang has no general host-call primitive, yet an untrusted theory is still
|
|
6193
6193
|
executable input. It can request enormous finite searches or construct
|
|
6194
6194
|
unbounded terms. URL inputs also cross a network and trust boundary.
|
|
6195
6195
|
Applications should restrict accepted sources and impose suitable input-size,
|
|
@@ -6204,9 +6204,9 @@ provider and validating what it supplies.
|
|
|
6204
6204
|
|
|
6205
6205
|
### Notes and references
|
|
6206
6206
|
|
|
6207
|
-
The book is self-contained as an
|
|
6208
|
-
and technical background for the ideas that
|
|
6209
|
-
languages and theories, so they should not be read as additional
|
|
6207
|
+
The book is self-contained as an Eyelang guide. These sources provide historical
|
|
6208
|
+
and technical background for the ideas that Eyelang adapts. They describe larger
|
|
6209
|
+
languages and theories, so they should not be read as additional Eyelang
|
|
6210
6210
|
specifications.
|
|
6211
6211
|
|
|
6212
6212
|
- ISO/IEC,
|
|
@@ -6216,7 +6216,7 @@ specifications.
|
|
|
6216
6216
|
[Technical Corrigendum 2:2012](https://www.iso.org/standard/58033.html),
|
|
6217
6217
|
and
|
|
6218
6218
|
[Technical Corrigendum 3:2017](https://www.iso.org/standard/73194.html).
|
|
6219
|
-
Chapter 38 defines the precise
|
|
6219
|
+
Chapter 38 defines the precise Eyelang compatibility profile against this
|
|
6220
6220
|
standards baseline; Chapter 39 lists the implemented predicate indicators.
|
|
6221
6221
|
|
|
6222
6222
|
- Michael Genesereth,
|
|
@@ -6306,7 +6306,7 @@ specifications.
|
|
|
6306
6306
|
originally published in 1971 and republished in English translation.
|
|
6307
6307
|
Futamura showed how specializing an interpreter with respect to a source
|
|
6308
6308
|
program connects partial evaluation with compilation. Part V invokes this
|
|
6309
|
-
as historical context for specialization, not as an
|
|
6309
|
+
as historical context for specialization, not as an Eyelang implementation
|
|
6310
6310
|
claim.
|
|
6311
6311
|
|
|
6312
6312
|
- Krzysztof R. Apt, Howard A. Blair, and Adrian Walker,
|
|
@@ -6320,7 +6320,7 @@ specifications.
|
|
|
6320
6320
|
[“Tabled Evaluation with Delaying for General Logic
|
|
6321
6321
|
Programs”](https://doi.org/10.1145/227595.227597), *Journal of the ACM*
|
|
6322
6322
|
43(1), 1996, pp. 20–74. A foundational treatment of tabled logic-program
|
|
6323
|
-
evaluation.
|
|
6323
|
+
evaluation. Eyelang's automatic positive tabling is smaller in scope, but the
|
|
6324
6324
|
shared-call and fixed-point intuitions are closely related.
|
|
6325
6325
|
|
|
6326
6326
|
- W3C, [*RDF 1.2 Concepts and Abstract
|
|
@@ -6333,7 +6333,7 @@ specifications.
|
|
|
6333
6333
|
- Dörthe Arndt and Stephan Mennicke,
|
|
6334
6334
|
[“Notation3 as an Existential Rule
|
|
6335
6335
|
Language”](https://arxiv.org/abs/2308.07332), 2023. Context for Notation3 and for the relationship between Semantic Web rule
|
|
6336
|
-
languages and existential-rule reasoning.
|
|
6336
|
+
languages and existential-rule reasoning. Eyelang deliberately implements a
|
|
6337
6337
|
different, compact Horn-clause language.
|
|
6338
6338
|
|
|
6339
6339
|
- Leon Sterling and Ehud Shapiro,
|
|
@@ -6342,16 +6342,16 @@ specifications.
|
|
|
6342
6342
|
MIT Press, 1994. Its sustained treatment of computation, program
|
|
6343
6343
|
construction, nondeterminism, transformation, interpreters, grammars,
|
|
6344
6344
|
search, and applications is an important pedagogical benchmark for Part V.
|
|
6345
|
-
|
|
6346
|
-
those themes only through
|
|
6345
|
+
Eyelang differs substantially from full Prolog, so the material here develops
|
|
6346
|
+
those themes only through Eyelang's explicit, supported relations.
|
|
6347
6347
|
|
|
6348
|
-
The aim of
|
|
6348
|
+
The aim of Eyelang is not to make every difficult problem easy. It is to keep the
|
|
6349
6349
|
theory visible while the machine searches it: facts you can inspect, rules you
|
|
6350
6350
|
can discuss, answers you can test, and proofs you can carry forward as data.
|
|
6351
6351
|
|
|
6352
6352
|
### Glossary
|
|
6353
6353
|
|
|
6354
|
-
This glossary fixes the book's vocabulary. Definitions describe
|
|
6354
|
+
This glossary fixes the book's vocabulary. Definitions describe Eyelang unless a
|
|
6355
6355
|
broader mathematical meaning is explicitly stated.
|
|
6356
6356
|
|
|
6357
6357
|
**Aggregate.** A relation that evaluates a finite nested solution space and
|
|
@@ -6359,7 +6359,7 @@ combines its solutions, as `findall/3`, `countall/2`, `sumall/3`,
|
|
|
6359
6359
|
`aggregate_min/5`, or `aggregate_max/5` does.
|
|
6360
6360
|
|
|
6361
6361
|
**Answer.** A ground instance of a declared query goal produced by successful
|
|
6362
|
-
search.
|
|
6362
|
+
search. Eyelang suppresses duplicate printed answers and source facts already
|
|
6363
6363
|
identical to queried conclusions.
|
|
6364
6364
|
|
|
6365
6365
|
**Answer set.** The distinct ground answers for a query, considered without
|
|
@@ -6399,7 +6399,7 @@ decidable by structural equality.
|
|
|
6399
6399
|
**Clause.** A fact or rule terminated by a period.
|
|
6400
6400
|
|
|
6401
6401
|
**Closed-world assumption.** The decision to treat failure to derive a
|
|
6402
|
-
sufficiently scoped claim as evidence for its absence.
|
|
6402
|
+
sufficiently scoped claim as evidence for its absence. Eyelang's `\+/1` performs
|
|
6403
6403
|
negation as failure; the modeler is responsible for justifying the scope.
|
|
6404
6404
|
|
|
6405
6405
|
**Compound term.** Structured data with a functor and one or more arguments,
|
|
@@ -6412,7 +6412,7 @@ profile and implementation extensions under `test/conformance/`.
|
|
|
6412
6412
|
run left to right while carrying bindings forward.
|
|
6413
6413
|
|
|
6414
6414
|
**Constraint.** In this book, a goal that rejects candidates not satisfying a
|
|
6415
|
-
property.
|
|
6415
|
+
property. Eyelang does not provide a general persistent constraint store.
|
|
6416
6416
|
|
|
6417
6417
|
**Declarative reading.** What ground instances of clauses mean independently
|
|
6418
6418
|
of the particular order in which a solver searches.
|
|
@@ -6452,7 +6452,7 @@ finite lists, or bounded numeric ranges.
|
|
|
6452
6452
|
**Golden file.** Checked expected output stored in the repository. Normal
|
|
6453
6453
|
example goldens record answers; proof goldens record explanations.
|
|
6454
6454
|
|
|
6455
|
-
**Ground.** Containing no variables.
|
|
6455
|
+
**Ground.** Containing no variables. Eyelang prints only ground query answers.
|
|
6456
6456
|
|
|
6457
6457
|
**Head.** The atomic formula to the left of `:-`, or the entire formula in a
|
|
6458
6458
|
fact. A successful rule use derives an instance of its head.
|
|
@@ -6490,7 +6490,7 @@ selected, which bindings it needs and produces, and which alternatives it
|
|
|
6490
6490
|
creates.
|
|
6491
6491
|
|
|
6492
6492
|
**Occurs check.** A unification check that prevents binding a variable to a
|
|
6493
|
-
term containing that variable.
|
|
6493
|
+
term containing that variable. Eyelang performs it consistently for ordinary
|
|
6494
6494
|
unification as well as `unify_with_occurs_check/2`.
|
|
6495
6495
|
|
|
6496
6496
|
**Predicate indicator.** A predicate name paired with its arity, conventionally
|
|
@@ -6782,14 +6782,14 @@ facts, derive one new relation, and serialize the result.
|
|
|
6782
6782
|
|
|
6783
6783
|
- preserve IRIs, literals, graph identity, and one RDF 1.2 feature;
|
|
6784
6784
|
- keep adapter rules separate from domain rules;
|
|
6785
|
-
- query the generated Prolog program with
|
|
6785
|
+
- query the generated Prolog program with Eyelang directly;
|
|
6786
6786
|
- compare the final N-Quads with a checked golden;
|
|
6787
6787
|
- document what the host authenticates.
|
|
6788
6788
|
|
|
6789
6789
|
**Acceptance:** the round trip retains the selected RDF term distinctions, and
|
|
6790
6790
|
nested triple data is not accidentally asserted as a global fact.
|
|
6791
6791
|
|
|
6792
|
-
**Reflect:** what simplicity does the explicit adapter preserve in the
|
|
6792
|
+
**Reflect:** what simplicity does the explicit adapter preserve in the Eyelang
|
|
6793
6793
|
core?
|
|
6794
6794
|
|
|
6795
6795
|
### Laboratory 12. A release-quality reasoning service
|