eyeling 1.34.5 → 2.34.7
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 +3 -90
- package/bin/eyeling.cjs +4 -56
- package/dist/browser/eyeling.browser.js +0 -1
- package/examples/context-schema-audit.n3 +1 -1
- package/eyeling.js +0 -1
- package/index.d.ts +3 -37
- package/index.js +1 -90
- package/lib/cli.js +0 -1
- package/package.json +3 -12
- package/test/packlist.test.js +0 -2
- package/test/run.js +0 -2
- package/docs/eyelang-guide.md +0 -535
- package/docs/eyelang-language-reference.md +0 -697
- package/examples/eyelang/access-control-policy.pl +0 -52
- package/examples/eyelang/ackermann.pl +0 -46
- package/examples/eyelang/age.pl +0 -28
- package/examples/eyelang/aliases-and-namespaces.pl +0 -22
- package/examples/eyelang/alignment-demo.pl +0 -44
- package/examples/eyelang/allen-interval-calculus.pl +0 -64
- package/examples/eyelang/ancestor.pl +0 -21
- package/examples/eyelang/animal.pl +0 -21
- package/examples/eyelang/annotation.pl +0 -34
- package/examples/eyelang/auroracare.pl +0 -309
- package/examples/eyelang/backward.pl +0 -12
- package/examples/eyelang/basic-monadic.pl +0 -10032
- package/examples/eyelang/bayes-diagnosis.pl +0 -108
- package/examples/eyelang/bayes-therapy.pl +0 -182
- package/examples/eyelang/beam-deflection.pl +0 -50
- package/examples/eyelang/blocks-world-planning.pl +0 -75
- package/examples/eyelang/bmi.pl +0 -232
- package/examples/eyelang/braking-safety-worlds.pl +0 -69
- package/examples/eyelang/buck-converter-design.pl +0 -78
- package/examples/eyelang/cache-performance.pl +0 -54
- package/examples/eyelang/canary-release.pl +0 -49
- package/examples/eyelang/cat-koko.pl +0 -24
- package/examples/eyelang/clinical-trial-screening.pl +0 -92
- package/examples/eyelang/combinatorics-findall-sort.pl +0 -37
- package/examples/eyelang/competitive-enzyme-kinetics.pl +0 -78
- package/examples/eyelang/complex.pl +0 -121
- package/examples/eyelang/composition-of-injective-functions-is-injective.pl +0 -50
- package/examples/eyelang/context-association.pl +0 -53
- package/examples/eyelang/context-schema-audit.pl +0 -46
- package/examples/eyelang/control-system.pl +0 -72
- package/examples/eyelang/cyclic-path.pl +0 -16
- package/examples/eyelang/d3-group.pl +0 -100
- package/examples/eyelang/dairy-energy-balance.pl +0 -65
- package/examples/eyelang/data-negotiation.pl +0 -39
- package/examples/eyelang/deep-taxonomy-10.pl +0 -115
- package/examples/eyelang/deep-taxonomy-100.pl +0 -385
- package/examples/eyelang/deep-taxonomy-1000.pl +0 -3085
- package/examples/eyelang/deep-taxonomy-10000.pl +0 -30094
- package/examples/eyelang/deep-taxonomy-100000.pl +0 -300184
- package/examples/eyelang/delfour.pl +0 -281
- package/examples/eyelang/deontic-logic.pl +0 -52
- package/examples/eyelang/derived-backward-rule.pl +0 -30
- package/examples/eyelang/derived-rule.pl +0 -27
- package/examples/eyelang/diamond-property.pl +0 -38
- package/examples/eyelang/dijkstra-findall-sort.pl +0 -44
- package/examples/eyelang/dijkstra-risk-path.pl +0 -86
- package/examples/eyelang/dijkstra.pl +0 -46
- package/examples/eyelang/dining-philosophers.pl +0 -140
- package/examples/eyelang/dog.pl +0 -25
- package/examples/eyelang/dpv-odrl-purpose-mapping.pl +0 -46
- package/examples/eyelang/drone-corridor-planner.pl +0 -51
- package/examples/eyelang/easter-computus.pl +0 -89
- package/examples/eyelang/electrical-rc-filter.pl +0 -36
- package/examples/eyelang/epidemic-policy.pl +0 -67
- package/examples/eyelang/equivalence-classes-overlap-implies-same-class.pl +0 -27
- package/examples/eyelang/eulerian-path.pl +0 -85
- package/examples/eyelang/ev-range-worlds.pl +0 -82
- package/examples/eyelang/existential-rule.pl +0 -18
- package/examples/eyelang/exoplanet-validation-worlds.pl +0 -88
- package/examples/eyelang/expression-eval.pl +0 -43
- package/examples/eyelang/family-cousins.pl +0 -65
- package/examples/eyelang/fastpow.pl +0 -53
- package/examples/eyelang/fft8-numeric.pl +0 -83
- package/examples/eyelang/fibonacci.pl +0 -53
- package/examples/eyelang/field-nitrogen-balance.pl +0 -70
- package/examples/eyelang/flandor.pl +0 -296
- package/examples/eyelang/floating-point.pl +0 -23
- package/examples/eyelang/four-color-map.pl +0 -127
- package/examples/eyelang/fundamental-theorem-arithmetic.pl +0 -113
- package/examples/eyelang/gd-step-certified.pl +0 -158
- package/examples/eyelang/gdpr-compliance.pl +0 -69
- package/examples/eyelang/good-cobbler.pl +0 -14
- package/examples/eyelang/gps.pl +0 -152
- package/examples/eyelang/graph-reachability.pl +0 -36
- package/examples/eyelang/gray-code-counter.pl +0 -48
- package/examples/eyelang/greatest-lower-bound-uniqueness.pl +0 -28
- package/examples/eyelang/group-inverse-uniqueness.pl +0 -34
- package/examples/eyelang/hamiltonian-path.pl +0 -49
- package/examples/eyelang/hamming-code.pl +0 -105
- package/examples/eyelang/hanoi.pl +0 -20
- package/examples/eyelang/heat-loss.pl +0 -51
- package/examples/eyelang/heron-theorem.pl +0 -36
- package/examples/eyelang/ideal-gas-law.pl +0 -37
- package/examples/eyelang/illegitimate-reasoning.pl +0 -88
- package/examples/eyelang/knowledge-engineering-alignment-flow.pl +0 -40
- package/examples/eyelang/law-of-cosines.pl +0 -31
- package/examples/eyelang/least-squares-regression.pl +0 -81
- package/examples/eyelang/list-collection.pl +0 -33
- package/examples/eyelang/lldm.pl +0 -78
- package/examples/eyelang/manufacturing-quality-control.pl +0 -73
- package/examples/eyelang/microgrid-dispatch.pl +0 -85
- package/examples/eyelang/monkey-bananas.pl +0 -45
- package/examples/eyelang/network-sla.pl +0 -48
- package/examples/eyelang/newton-raphson.pl +0 -49
- package/examples/eyelang/nixon-diamond.pl +0 -37
- package/examples/eyelang/observability-log-correlation.pl +0 -34
- package/examples/eyelang/odrl-dpv-fpv-trust-flow.pl +0 -43
- package/examples/eyelang/odrl-dpv-healthcare-risk-ranked.pl +0 -266
- package/examples/eyelang/odrl-dpv-risk-ranked.pl +0 -320
- package/examples/eyelang/orbital-transfer-design.pl +0 -113
- package/examples/eyelang/output/access-control-policy.pl +0 -2
- package/examples/eyelang/output/ackermann.pl +0 -12
- package/examples/eyelang/output/age.pl +0 -2
- package/examples/eyelang/output/aliases-and-namespaces.pl +0 -5
- package/examples/eyelang/output/alignment-demo.pl +0 -32
- package/examples/eyelang/output/allen-interval-calculus.pl +0 -154
- package/examples/eyelang/output/ancestor.pl +0 -6
- package/examples/eyelang/output/animal.pl +0 -4
- package/examples/eyelang/output/annotation.pl +0 -4
- package/examples/eyelang/output/auroracare.pl +0 -117
- package/examples/eyelang/output/backward.pl +0 -1
- package/examples/eyelang/output/basic-monadic.pl +0 -1518
- package/examples/eyelang/output/bayes-diagnosis.pl +0 -13
- package/examples/eyelang/output/bayes-therapy.pl +0 -23
- package/examples/eyelang/output/beam-deflection.pl +0 -5
- package/examples/eyelang/output/blocks-world-planning.pl +0 -4
- package/examples/eyelang/output/bmi.pl +0 -32
- package/examples/eyelang/output/braking-safety-worlds.pl +0 -18
- package/examples/eyelang/output/buck-converter-design.pl +0 -6
- package/examples/eyelang/output/cache-performance.pl +0 -4
- package/examples/eyelang/output/canary-release.pl +0 -5
- package/examples/eyelang/output/cat-koko.pl +0 -3
- package/examples/eyelang/output/clinical-trial-screening.pl +0 -9
- package/examples/eyelang/output/combinatorics-findall-sort.pl +0 -2
- package/examples/eyelang/output/competitive-enzyme-kinetics.pl +0 -6
- package/examples/eyelang/output/complex.pl +0 -1
- package/examples/eyelang/output/composition-of-injective-functions-is-injective.pl +0 -2
- package/examples/eyelang/output/context-association.pl +0 -3
- package/examples/eyelang/output/context-schema-audit.pl +0 -12
- package/examples/eyelang/output/control-system.pl +0 -6
- package/examples/eyelang/output/cyclic-path.pl +0 -16
- package/examples/eyelang/output/d3-group.pl +0 -2
- package/examples/eyelang/output/dairy-energy-balance.pl +0 -13
- package/examples/eyelang/output/data-negotiation.pl +0 -1
- package/examples/eyelang/output/deep-taxonomy-10.pl +0 -16
- package/examples/eyelang/output/deep-taxonomy-100.pl +0 -16
- package/examples/eyelang/output/deep-taxonomy-1000.pl +0 -16
- package/examples/eyelang/output/deep-taxonomy-10000.pl +0 -16
- package/examples/eyelang/output/deep-taxonomy-100000.pl +0 -16
- package/examples/eyelang/output/delfour.pl +0 -31
- package/examples/eyelang/output/deontic-logic.pl +0 -4
- package/examples/eyelang/output/derived-backward-rule.pl +0 -3
- package/examples/eyelang/output/derived-rule.pl +0 -2
- package/examples/eyelang/output/diamond-property.pl +0 -4
- package/examples/eyelang/output/dijkstra-findall-sort.pl +0 -2
- package/examples/eyelang/output/dijkstra-risk-path.pl +0 -29
- package/examples/eyelang/output/dijkstra.pl +0 -16
- package/examples/eyelang/output/dining-philosophers.pl +0 -350
- package/examples/eyelang/output/dog.pl +0 -1
- package/examples/eyelang/output/dpv-odrl-purpose-mapping.pl +0 -18
- package/examples/eyelang/output/drone-corridor-planner.pl +0 -17
- package/examples/eyelang/output/easter-computus.pl +0 -30
- package/examples/eyelang/output/electrical-rc-filter.pl +0 -3
- package/examples/eyelang/output/epidemic-policy.pl +0 -14
- package/examples/eyelang/output/equivalence-classes-overlap-implies-same-class.pl +0 -18
- package/examples/eyelang/output/eulerian-path.pl +0 -3
- package/examples/eyelang/output/ev-range-worlds.pl +0 -19
- package/examples/eyelang/output/existential-rule.pl +0 -2
- package/examples/eyelang/output/exoplanet-validation-worlds.pl +0 -22
- package/examples/eyelang/output/expression-eval.pl +0 -1
- package/examples/eyelang/output/family-cousins.pl +0 -28
- package/examples/eyelang/output/fastpow.pl +0 -6
- package/examples/eyelang/output/fft8-numeric.pl +0 -4
- package/examples/eyelang/output/fibonacci.pl +0 -6
- package/examples/eyelang/output/field-nitrogen-balance.pl +0 -21
- package/examples/eyelang/output/flandor.pl +0 -43
- package/examples/eyelang/output/floating-point.pl +0 -9
- package/examples/eyelang/output/four-color-map.pl +0 -3
- package/examples/eyelang/output/fundamental-theorem-arithmetic.pl +0 -9
- package/examples/eyelang/output/gd-step-certified.pl +0 -79
- package/examples/eyelang/output/gdpr-compliance.pl +0 -6
- package/examples/eyelang/output/good-cobbler.pl +0 -1
- package/examples/eyelang/output/gps.pl +0 -21
- package/examples/eyelang/output/graph-reachability.pl +0 -3
- package/examples/eyelang/output/gray-code-counter.pl +0 -1
- package/examples/eyelang/output/greatest-lower-bound-uniqueness.pl +0 -2
- package/examples/eyelang/output/group-inverse-uniqueness.pl +0 -2
- package/examples/eyelang/output/hamiltonian-path.pl +0 -121
- package/examples/eyelang/output/hamming-code.pl +0 -6
- package/examples/eyelang/output/hanoi.pl +0 -1
- package/examples/eyelang/output/heat-loss.pl +0 -5
- package/examples/eyelang/output/heron-theorem.pl +0 -4
- package/examples/eyelang/output/ideal-gas-law.pl +0 -3
- package/examples/eyelang/output/illegitimate-reasoning.pl +0 -15
- package/examples/eyelang/output/knowledge-engineering-alignment-flow.pl +0 -17
- package/examples/eyelang/output/law-of-cosines.pl +0 -3
- package/examples/eyelang/output/least-squares-regression.pl +0 -5
- package/examples/eyelang/output/list-collection.pl +0 -3
- package/examples/eyelang/output/lldm.pl +0 -6
- package/examples/eyelang/output/manufacturing-quality-control.pl +0 -6
- package/examples/eyelang/output/microgrid-dispatch.pl +0 -6
- package/examples/eyelang/output/monkey-bananas.pl +0 -5
- package/examples/eyelang/output/network-sla.pl +0 -4
- package/examples/eyelang/output/newton-raphson.pl +0 -3
- package/examples/eyelang/output/nixon-diamond.pl +0 -5
- package/examples/eyelang/output/observability-log-correlation.pl +0 -28
- package/examples/eyelang/output/odrl-dpv-fpv-trust-flow.pl +0 -9
- package/examples/eyelang/output/odrl-dpv-healthcare-risk-ranked.pl +0 -42
- package/examples/eyelang/output/odrl-dpv-risk-ranked.pl +0 -120
- package/examples/eyelang/output/orbital-transfer-design.pl +0 -7
- package/examples/eyelang/output/path-discovery.pl +0 -3
- package/examples/eyelang/output/peano-arithmetic.pl +0 -3
- package/examples/eyelang/output/peasant.pl +0 -10
- package/examples/eyelang/output/pendulum-period.pl +0 -4
- package/examples/eyelang/output/polynomial.pl +0 -14
- package/examples/eyelang/output/proof-contrapositive.pl +0 -3
- package/examples/eyelang/output/quadratic-formula.pl +0 -6
- package/examples/eyelang/output/radioactive-decay.pl +0 -5
- package/examples/eyelang/output/reusable-builtins.pl +0 -5
- package/examples/eyelang/output/riemann-hypothesis.pl +0 -12
- package/examples/eyelang/output/security-incident-correlation.pl +0 -3
- package/examples/eyelang/output/service-impact.pl +0 -11
- package/examples/eyelang/output/sieve.pl +0 -1
- package/examples/eyelang/output/skolem-functions.pl +0 -16
- package/examples/eyelang/output/socket-age.pl +0 -1
- package/examples/eyelang/output/socket-family.pl +0 -3
- package/examples/eyelang/output/socrates.pl +0 -2
- package/examples/eyelang/output/statistics-summary.pl +0 -4
- package/examples/eyelang/output/superdense-coding.pl +0 -6
- package/examples/eyelang/output/term-tools.pl +0 -6
- package/examples/eyelang/output/trust-flow-provenance-threshold.pl +0 -6
- package/examples/eyelang/output/turing.pl +0 -12
- package/examples/eyelang/output/vector-similarity.pl +0 -4
- package/examples/eyelang/output/vulnerability-impact.pl +0 -20
- package/examples/eyelang/output/witch.pl +0 -7
- package/examples/eyelang/output/wolf-goat-cabbage.pl +0 -3
- package/examples/eyelang/output/zebra.pl +0 -3
- package/examples/eyelang/path-discovery.pl +0 -45013
- package/examples/eyelang/peano-arithmetic.pl +0 -31
- package/examples/eyelang/peasant.pl +0 -30
- package/examples/eyelang/pendulum-period.pl +0 -50
- package/examples/eyelang/polynomial.pl +0 -124
- package/examples/eyelang/proof/age.pl +0 -71
- package/examples/eyelang/proof/aliases-and-namespaces.pl +0 -78
- package/examples/eyelang/proof/ancestor.pl +0 -140
- package/examples/eyelang/proof/animal.pl +0 -68
- package/examples/eyelang/proof/annotation.pl +0 -80
- package/examples/eyelang/proof/backward.pl +0 -22
- package/examples/eyelang/proof/cat-koko.pl +0 -86
- package/examples/eyelang/proof/data-negotiation.pl +0 -76
- package/examples/eyelang/proof/derived-rule.pl +0 -43
- package/examples/eyelang/proof/dog.pl +0 -31
- package/examples/eyelang/proof/electrical-rc-filter.pl +0 -105
- package/examples/eyelang/proof/existential-rule.pl +0 -40
- package/examples/eyelang/proof/floating-point.pl +0 -160
- package/examples/eyelang/proof/good-cobbler.pl +0 -16
- package/examples/eyelang/proof/group-inverse-uniqueness.pl +0 -84
- package/examples/eyelang/proof/list-collection.pl +0 -52
- package/examples/eyelang/proof/proof-contrapositive.pl +0 -78
- package/examples/eyelang/proof/socket-age.pl +0 -32
- package/examples/eyelang/proof/socket-family.pl +0 -59
- package/examples/eyelang/proof/socrates.pl +0 -38
- package/examples/eyelang/proof-contrapositive.pl +0 -27
- package/examples/eyelang/quadratic-formula.pl +0 -54
- package/examples/eyelang/radioactive-decay.pl +0 -56
- package/examples/eyelang/reusable-builtins.pl +0 -32
- package/examples/eyelang/riemann-hypothesis.pl +0 -110
- package/examples/eyelang/security-incident-correlation.pl +0 -69
- package/examples/eyelang/service-impact.pl +0 -41
- package/examples/eyelang/sieve.pl +0 -20
- package/examples/eyelang/skolem-functions.pl +0 -52
- package/examples/eyelang/socket-age.pl +0 -39
- package/examples/eyelang/socket-family.pl +0 -28
- package/examples/eyelang/socrates.pl +0 -19
- package/examples/eyelang/statistics-summary.pl +0 -54
- package/examples/eyelang/superdense-coding.pl +0 -84
- package/examples/eyelang/term-tools.pl +0 -23
- package/examples/eyelang/trust-flow-provenance-threshold.pl +0 -40
- package/examples/eyelang/turing.pl +0 -67
- package/examples/eyelang/vector-similarity.pl +0 -56
- package/examples/eyelang/vulnerability-impact.pl +0 -70
- package/examples/eyelang/witch.pl +0 -38
- package/examples/eyelang/wolf-goat-cabbage.pl +0 -56
- package/examples/eyelang/zebra.pl +0 -44
- package/eyelang.d.ts +0 -80
- package/lib/eyelang/bin.js +0 -7
- package/lib/eyelang/builtins/aggregation.js +0 -81
- package/lib/eyelang/builtins/arithmetic.js +0 -208
- package/lib/eyelang/builtins/context.js +0 -42
- package/lib/eyelang/builtins/control.js +0 -34
- package/lib/eyelang/builtins/core.js +0 -78
- package/lib/eyelang/builtins/lists.js +0 -283
- package/lib/eyelang/builtins/registry.js +0 -48
- package/lib/eyelang/builtins/strings.js +0 -234
- package/lib/eyelang/builtins/terms.js +0 -66
- package/lib/eyelang/cli.js +0 -180
- package/lib/eyelang/explain.js +0 -324
- package/lib/eyelang/hash.js +0 -294
- package/lib/eyelang/index.js +0 -47
- package/lib/eyelang/package.json +0 -3
- package/lib/eyelang/parser.js +0 -428
- package/lib/eyelang/program.js +0 -237
- package/lib/eyelang/solver.js +0 -237
- package/lib/eyelang/term.js +0 -328
- package/test/eyelang/conformance/README.md +0 -43
- package/test/eyelang/conformance/cases/001_fact_output.pl +0 -4
- package/test/eyelang/conformance/cases/002_rule_recursion.pl +0 -7
- package/test/eyelang/conformance/cases/002_rule_recursion.query +0 -1
- package/test/eyelang/conformance/cases/003_terms_and_readback.pl +0 -16
- package/test/eyelang/conformance/cases/003_terms_and_readback.query +0 -1
- package/test/eyelang/conformance/cases/004_conjunction_and_parentheses.pl +0 -5
- package/test/eyelang/conformance/cases/004_conjunction_and_parentheses.query +0 -1
- package/test/eyelang/conformance/cases/005_list_deconstruction.pl +0 -6
- package/test/eyelang/conformance/cases/005_list_deconstruction.query +0 -1
- package/test/eyelang/conformance/cases/006_comma_formula_data.pl +0 -4
- package/test/eyelang/conformance/cases/006_comma_formula_data.query +0 -1
- package/test/eyelang/conformance/cases/007_anonymous_variables.pl +0 -5
- package/test/eyelang/conformance/cases/007_anonymous_variables.query +0 -1
- package/test/eyelang/conformance/cases/008_graphic_atoms.pl +0 -6
- package/test/eyelang/conformance/cases/008_graphic_atoms.query +0 -1
- package/test/eyelang/conformance/cases/009_comments_and_whitespace.pl +0 -5
- package/test/eyelang/conformance/cases/009_comments_and_whitespace.query +0 -1
- package/test/eyelang/conformance/cases/010_variable_scope_and_reuse.pl +0 -8
- package/test/eyelang/conformance/cases/010_variable_scope_and_reuse.query +0 -1
- package/test/eyelang/conformance/cases/011_predicate_arity.pl +0 -6
- package/test/eyelang/conformance/cases/011_predicate_arity.query +0 -1
- package/test/eyelang/conformance/cases/012_nested_compound_unification.pl +0 -5
- package/test/eyelang/conformance/cases/012_nested_compound_unification.query +0 -1
- package/test/eyelang/conformance/cases/013_multiple_clauses_order.pl +0 -6
- package/test/eyelang/conformance/cases/013_multiple_clauses_order.query +0 -1
- package/test/eyelang/conformance/cases/014_failure_filters_answers.pl +0 -7
- package/test/eyelang/conformance/cases/014_failure_filters_answers.query +0 -1
- package/test/eyelang/conformance/cases/015_improper_list_unification.pl +0 -6
- package/test/eyelang/conformance/cases/015_improper_list_unification.query +0 -1
- package/test/eyelang/conformance/cases/016_zero_arity_compound.pl +0 -4
- package/test/eyelang/conformance/cases/016_zero_arity_compound.query +0 -1
- package/test/eyelang/conformance/cases/017_three_step_recursion.pl +0 -8
- package/test/eyelang/conformance/cases/017_three_step_recursion.query +0 -1
- package/test/eyelang/conformance/cases/018_quoted_atom_readback.pl +0 -6
- package/test/eyelang/conformance/cases/018_quoted_atom_readback.query +0 -1
- package/test/eyelang/conformance/cases/019_parenthesized_three_conjuncts.pl +0 -7
- package/test/eyelang/conformance/cases/019_parenthesized_three_conjuncts.query +0 -1
- package/test/eyelang/conformance/cases/020_nested_list_terms.pl +0 -5
- package/test/eyelang/conformance/cases/020_nested_list_terms.query +0 -1
- package/test/eyelang/conformance/cases/021_repeated_variable_head.pl +0 -7
- package/test/eyelang/conformance/cases/022_rule_head_structure.pl +0 -5
- package/test/eyelang/conformance/cases/023_quoted_escapes_readback.pl +0 -5
- package/test/eyelang/conformance/cases/024_numeric_literal_readback.pl +0 -6
- package/test/eyelang/conformance/cases/025_body_parentheses_with_formula_data.pl +0 -5
- package/test/eyelang/conformance/cases/026_underscore_named_variable_reuse.pl +0 -5
- package/test/eyelang/conformance/cases/027_default_derived_output.pl +0 -5
- package/test/eyelang/conformance/cases/028_materialize_focus.pl +0 -5
- package/test/eyelang/conformance/cases/029_arithmetic_and_comparison.pl +0 -11
- package/test/eyelang/conformance/cases/029_arithmetic_and_comparison.query +0 -1
- package/test/eyelang/conformance/cases/030_strings_and_atoms.pl +0 -4
- package/test/eyelang/conformance/cases/030_strings_and_atoms.query +0 -1
- package/test/eyelang/conformance/cases/031_lists_aggregation_ordering.pl +0 -10
- package/test/eyelang/conformance/cases/031_lists_aggregation_ordering.query +0 -1
- package/test/eyelang/conformance/cases/032_holds_parts.pl +0 -4
- package/test/eyelang/conformance/cases/033_negation_once_generators.pl +0 -7
- package/test/eyelang/conformance/cases/033_negation_once_generators.query +0 -1
- package/test/eyelang/conformance/cases/034_equality_and_inequality.pl +0 -6
- package/test/eyelang/conformance/cases/034_equality_and_inequality.query +0 -1
- package/test/eyelang/conformance/cases/035_list_relations.pl +0 -5
- package/test/eyelang/conformance/cases/035_list_relations.query +0 -1
- package/test/eyelang/conformance/cases/036_append_splits.pl +0 -3
- package/test/eyelang/conformance/cases/036_append_splits.query +0 -1
- package/test/eyelang/conformance/cases/037_matching_and_comparison.pl +0 -7
- package/test/eyelang/conformance/cases/037_matching_and_comparison.query +0 -1
- package/test/eyelang/conformance/cases/038_memoize_declaration.pl +0 -8
- package/test/eyelang/conformance/cases/038_memoize_declaration.query +0 -1
- package/test/eyelang/conformance/cases/039_numeric_functions.pl +0 -9
- package/test/eyelang/conformance/cases/039_numeric_functions.query +0 -1
- package/test/eyelang/conformance/cases/040_between_enumeration.pl +0 -3
- package/test/eyelang/conformance/cases/040_between_enumeration.query +0 -1
- package/test/eyelang/conformance/cases/041_smallest_divisor.pl +0 -3
- package/test/eyelang/conformance/cases/041_smallest_divisor.query +0 -1
- package/test/eyelang/conformance/cases/042_negation_filter.pl +0 -7
- package/test/eyelang/conformance/cases/042_negation_filter.query +0 -1
- package/test/eyelang/conformance/cases/043_once_user_predicate.pl +0 -5
- package/test/eyelang/conformance/cases/043_once_user_predicate.query +0 -1
- package/test/eyelang/conformance/cases/044_findall_user_goal.pl +0 -6
- package/test/eyelang/conformance/cases/044_findall_user_goal.query +0 -1
- package/test/eyelang/conformance/cases/045_sort_deduplicates_atoms.pl +0 -3
- package/test/eyelang/conformance/cases/045_sort_deduplicates_atoms.query +0 -1
- package/test/eyelang/conformance/cases/046_append_bound_prefix_suffix.pl +0 -4
- package/test/eyelang/conformance/cases/046_append_bound_prefix_suffix.query +0 -1
- package/test/eyelang/conformance/cases/047_nth0_index_generation.pl +0 -3
- package/test/eyelang/conformance/cases/047_nth0_index_generation.query +0 -1
- package/test/eyelang/conformance/cases/048_set_nth0_edges.pl +0 -4
- package/test/eyelang/conformance/cases/048_set_nth0_edges.query +0 -1
- package/test/eyelang/conformance/cases/049_select_duplicate_occurrences.pl +0 -3
- package/test/eyelang/conformance/cases/049_select_duplicate_occurrences.query +0 -1
- package/test/eyelang/conformance/cases/050_not_member_filter.pl +0 -6
- package/test/eyelang/conformance/cases/050_not_member_filter.query +0 -1
- package/test/eyelang/conformance/cases/051_nested_holds_parts.pl +0 -4
- package/test/eyelang/conformance/cases/052_holds_member.pl +0 -3
- package/test/eyelang/conformance/cases/053_materialize_excludes_source_fact.pl +0 -6
- package/test/eyelang/conformance/cases/054_numeric_and_lexical_comparison.pl +0 -5
- package/test/eyelang/conformance/cases/054_numeric_and_lexical_comparison.query +0 -1
- package/test/eyelang/conformance/cases/055_string_matching_filters.pl +0 -6
- package/test/eyelang/conformance/cases/055_string_matching_filters.query +0 -1
- package/test/eyelang/conformance/cases/056_string_and_atom_concat.pl +0 -3
- package/test/eyelang/conformance/cases/056_string_and_atom_concat.query +0 -1
- package/test/eyelang/conformance/cases/057_countall_empty_and_nonempty.pl +0 -4
- package/test/eyelang/conformance/cases/057_countall_empty_and_nonempty.query +0 -1
- package/test/eyelang/conformance/cases/058_sumall_numeric_template.pl +0 -5
- package/test/eyelang/conformance/cases/058_sumall_numeric_template.query +0 -1
- package/test/eyelang/conformance/cases/059_aggregate_min_template.pl +0 -5
- package/test/eyelang/conformance/cases/059_aggregate_min_template.query +0 -1
- package/test/eyelang/conformance/cases/060_aggregate_max_compound_key.pl +0 -5
- package/test/eyelang/conformance/cases/060_aggregate_max_compound_key.query +0 -1
- package/test/eyelang/conformance/cases/061_date_difference.pl +0 -4
- package/test/eyelang/conformance/cases/062_reusable_numeric_builtins.pl +0 -10
- package/test/eyelang/conformance/cases/063_reusable_list_builtins.pl +0 -11
- package/test/eyelang/conformance/cases/064_reusable_string_builtins.pl +0 -12
- package/test/eyelang/conformance/cases/065_reusable_term_control_builtins.pl +0 -11
- package/test/eyelang/conformance/cases/066_numeric_edges.pl +0 -14
- package/test/eyelang/conformance/cases/067_list_edges.pl +0 -10
- package/test/eyelang/conformance/cases/068_list_generation_order.pl +0 -7
- package/test/eyelang/conformance/cases/069_list_summaries_and_sets.pl +0 -9
- package/test/eyelang/conformance/cases/070_matches_named_captures.pl +0 -13
- package/test/eyelang/conformance/cases/071_string_edges.pl +0 -10
- package/test/eyelang/conformance/cases/072_string_conversions.pl +0 -10
- package/test/eyelang/conformance/cases/073_term_introspection_edges.pl +0 -10
- package/test/eyelang/conformance/cases/074_forall_edges.pl +0 -10
- package/test/eyelang/conformance/cases/075_aggregation_edges.pl +0 -12
- package/test/eyelang/conformance/cases/076_composed_reusable_builtins.pl +0 -8
- package/test/eyelang/conformance/cases/077_recursive_path_with_lists.pl +0 -10
- package/test/eyelang/conformance/cases/078_mutual_recursion_with_arithmetic.pl +0 -7
- package/test/eyelang/conformance/cases/079_big_integer_arithmetic.pl +0 -8
- package/test/eyelang/conformance/cases/080_rounding_modes.pl +0 -10
- package/test/eyelang/conformance/cases/081_zero_safe_numeric_functions.pl +0 -9
- package/test/eyelang/conformance/cases/082_comparison_semantics.pl +0 -10
- package/test/eyelang/conformance/cases/083_between_modes_and_empty_ranges.pl +0 -8
- package/test/eyelang/conformance/cases/084_append_and_select_composition.pl +0 -7
- package/test/eyelang/conformance/cases/085_nth_and_update_edges.pl +0 -8
- package/test/eyelang/conformance/cases/086_slicing_pipeline.pl +0 -10
- package/test/eyelang/conformance/cases/087_sort_reverse_length.pl +0 -8
- package/test/eyelang/conformance/cases/088_list_summaries_failures.pl +0 -8
- package/test/eyelang/conformance/cases/089_string_split_join_pipeline.pl +0 -7
- package/test/eyelang/conformance/cases/090_string_substring_replace_edges.pl +0 -9
- package/test/eyelang/conformance/cases/091_string_case_and_trim.pl +0 -7
- package/test/eyelang/conformance/cases/092_scalar_string_conversions.pl +0 -9
- package/test/eyelang/conformance/cases/093_regex_named_captures_context.pl +0 -8
- package/test/eyelang/conformance/cases/094_context_holds_enumeration.pl +0 -7
- package/test/eyelang/conformance/cases/095_term_introspection_roundtrip.pl +0 -8
- package/test/eyelang/conformance/cases/096_functor_scalar_edges.pl +0 -8
- package/test/eyelang/conformance/cases/097_control_negation_once_forall.pl +0 -13
- package/test/eyelang/conformance/cases/098_aggregation_nested_templates.pl +0 -11
- package/test/eyelang/conformance/cases/099_materialize_multiple_arities.pl +0 -8
- package/test/eyelang/conformance/cases/100_reusable_builtin_workflow.pl +0 -10
- package/test/eyelang/conformance/cases/core/001_fact_output.pl +0 -4
- package/test/eyelang/conformance/cases/core/001_fact_query.query +0 -1
- package/test/eyelang/conformance/cases/core/002_rule_recursion.pl +0 -7
- package/test/eyelang/conformance/cases/core/002_rule_recursion.query +0 -1
- package/test/eyelang/conformance/cases/core/003_terms_and_readback.pl +0 -16
- package/test/eyelang/conformance/cases/core/003_terms_and_readback.query +0 -1
- package/test/eyelang/conformance/cases/core/004_conjunction_and_parentheses.pl +0 -5
- package/test/eyelang/conformance/cases/core/004_conjunction_and_parentheses.query +0 -1
- package/test/eyelang/conformance/cases/core/005_list_deconstruction.pl +0 -6
- package/test/eyelang/conformance/cases/core/005_list_deconstruction.query +0 -1
- package/test/eyelang/conformance/cases/core/006_comma_formula_data.pl +0 -4
- package/test/eyelang/conformance/cases/core/006_comma_formula_data.query +0 -1
- package/test/eyelang/conformance/cases/core/007_anonymous_variables.pl +0 -5
- package/test/eyelang/conformance/cases/core/007_anonymous_variables.query +0 -1
- package/test/eyelang/conformance/cases/core/008_graphic_atoms.pl +0 -6
- package/test/eyelang/conformance/cases/core/008_graphic_atoms.query +0 -1
- package/test/eyelang/conformance/cases/core/009_comments_and_whitespace.pl +0 -5
- package/test/eyelang/conformance/cases/core/009_comments_and_whitespace.query +0 -1
- package/test/eyelang/conformance/cases/core/010_variable_scope_and_reuse.pl +0 -8
- package/test/eyelang/conformance/cases/core/010_variable_scope_and_reuse.query +0 -1
- package/test/eyelang/conformance/cases/core/011_predicate_arity.pl +0 -6
- package/test/eyelang/conformance/cases/core/011_predicate_arity.query +0 -1
- package/test/eyelang/conformance/cases/core/012_nested_compound_unification.pl +0 -5
- package/test/eyelang/conformance/cases/core/012_nested_compound_unification.query +0 -1
- package/test/eyelang/conformance/cases/core/013_multiple_clauses_order.pl +0 -6
- package/test/eyelang/conformance/cases/core/013_multiple_clauses_order.query +0 -1
- package/test/eyelang/conformance/cases/core/014_failure_filters_answers.pl +0 -7
- package/test/eyelang/conformance/cases/core/014_failure_filters_answers.query +0 -1
- package/test/eyelang/conformance/cases/core/015_improper_list_unification.pl +0 -6
- package/test/eyelang/conformance/cases/core/015_improper_list_unification.query +0 -1
- package/test/eyelang/conformance/cases/core/016_zero_arity_compound.pl +0 -4
- package/test/eyelang/conformance/cases/core/016_zero_arity_compound.query +0 -1
- package/test/eyelang/conformance/cases/core/017_three_step_recursion.pl +0 -8
- package/test/eyelang/conformance/cases/core/017_three_step_recursion.query +0 -1
- package/test/eyelang/conformance/cases/core/018_quoted_atom_readback.pl +0 -6
- package/test/eyelang/conformance/cases/core/018_quoted_atom_readback.query +0 -1
- package/test/eyelang/conformance/cases/core/019_parenthesized_three_conjuncts.pl +0 -7
- package/test/eyelang/conformance/cases/core/019_parenthesized_three_conjuncts.query +0 -1
- package/test/eyelang/conformance/cases/core/020_nested_list_terms.pl +0 -5
- package/test/eyelang/conformance/cases/core/020_nested_list_terms.query +0 -1
- package/test/eyelang/conformance/cases/core/021_repeated_variable_head.pl +0 -7
- package/test/eyelang/conformance/cases/core/022_rule_head_structure.pl +0 -5
- package/test/eyelang/conformance/cases/core/023_quoted_escapes_readback.pl +0 -5
- package/test/eyelang/conformance/cases/core/024_numeric_literal_readback.pl +0 -6
- package/test/eyelang/conformance/cases/core/025_body_parentheses_with_formula_data.pl +0 -5
- package/test/eyelang/conformance/cases/core/026_underscore_named_variable_reuse.pl +0 -5
- package/test/eyelang/conformance/cases/extension/001_default_derived_output.pl +0 -5
- package/test/eyelang/conformance/cases/extension/002_materialize_focus.pl +0 -5
- package/test/eyelang/conformance/cases/extension/003_arithmetic_and_comparison.pl +0 -11
- package/test/eyelang/conformance/cases/extension/003_arithmetic_and_comparison.query +0 -1
- package/test/eyelang/conformance/cases/extension/004_strings_and_atoms.pl +0 -4
- package/test/eyelang/conformance/cases/extension/004_strings_and_atoms.query +0 -1
- package/test/eyelang/conformance/cases/extension/005_lists_aggregation_ordering.pl +0 -10
- package/test/eyelang/conformance/cases/extension/005_lists_aggregation_ordering.query +0 -1
- package/test/eyelang/conformance/cases/extension/006_formula_terms.query +0 -1
- package/test/eyelang/conformance/cases/extension/006_holds_parts.pl +0 -4
- package/test/eyelang/conformance/cases/extension/007_negation_once_generators.pl +0 -7
- package/test/eyelang/conformance/cases/extension/007_negation_once_generators.query +0 -1
- package/test/eyelang/conformance/cases/extension/008_equality_and_inequality.pl +0 -6
- package/test/eyelang/conformance/cases/extension/008_equality_and_inequality.query +0 -1
- package/test/eyelang/conformance/cases/extension/009_list_relations.pl +0 -5
- package/test/eyelang/conformance/cases/extension/009_list_relations.query +0 -1
- package/test/eyelang/conformance/cases/extension/010_append_splits.pl +0 -3
- package/test/eyelang/conformance/cases/extension/010_append_splits.query +0 -1
- package/test/eyelang/conformance/cases/extension/011_matching_and_comparison.pl +0 -7
- package/test/eyelang/conformance/cases/extension/011_matching_and_comparison.query +0 -1
- package/test/eyelang/conformance/cases/extension/012_memoize_declaration.pl +0 -8
- package/test/eyelang/conformance/cases/extension/012_memoize_declaration.query +0 -1
- package/test/eyelang/conformance/cases/extension/013_numeric_functions.pl +0 -9
- package/test/eyelang/conformance/cases/extension/013_numeric_functions.query +0 -1
- package/test/eyelang/conformance/cases/extension/014_between_enumeration.pl +0 -3
- package/test/eyelang/conformance/cases/extension/014_between_enumeration.query +0 -1
- package/test/eyelang/conformance/cases/extension/015_smallest_divisor.pl +0 -3
- package/test/eyelang/conformance/cases/extension/015_smallest_divisor.query +0 -1
- package/test/eyelang/conformance/cases/extension/016_negation_filter.pl +0 -7
- package/test/eyelang/conformance/cases/extension/016_negation_filter.query +0 -1
- package/test/eyelang/conformance/cases/extension/017_once_user_predicate.pl +0 -5
- package/test/eyelang/conformance/cases/extension/017_once_user_predicate.query +0 -1
- package/test/eyelang/conformance/cases/extension/018_findall_user_goal.pl +0 -6
- package/test/eyelang/conformance/cases/extension/018_findall_user_goal.query +0 -1
- package/test/eyelang/conformance/cases/extension/019_sort_deduplicates_atoms.pl +0 -3
- package/test/eyelang/conformance/cases/extension/019_sort_deduplicates_atoms.query +0 -1
- package/test/eyelang/conformance/cases/extension/020_append_bound_prefix_suffix.pl +0 -4
- package/test/eyelang/conformance/cases/extension/020_append_bound_prefix_suffix.query +0 -1
- package/test/eyelang/conformance/cases/extension/021_nth0_index_generation.pl +0 -3
- package/test/eyelang/conformance/cases/extension/021_nth0_index_generation.query +0 -1
- package/test/eyelang/conformance/cases/extension/022_set_nth0_edges.pl +0 -4
- package/test/eyelang/conformance/cases/extension/022_set_nth0_edges.query +0 -1
- package/test/eyelang/conformance/cases/extension/023_select_duplicate_occurrences.pl +0 -3
- package/test/eyelang/conformance/cases/extension/023_select_duplicate_occurrences.query +0 -1
- package/test/eyelang/conformance/cases/extension/024_not_member_filter.pl +0 -6
- package/test/eyelang/conformance/cases/extension/024_not_member_filter.query +0 -1
- package/test/eyelang/conformance/cases/extension/026_nested_formula_terms.query +0 -1
- package/test/eyelang/conformance/cases/extension/026_nested_holds_parts.pl +0 -4
- package/test/eyelang/conformance/cases/extension/027_formula_member.query +0 -1
- package/test/eyelang/conformance/cases/extension/027_holds_member.pl +0 -3
- package/test/eyelang/conformance/cases/extension/027_materialize_excludes_source_fact.pl +0 -6
- package/test/eyelang/conformance/cases/extension/028_numeric_and_lexical_comparison.pl +0 -5
- package/test/eyelang/conformance/cases/extension/028_numeric_and_lexical_comparison.query +0 -1
- package/test/eyelang/conformance/cases/extension/029_string_matching_filters.pl +0 -6
- package/test/eyelang/conformance/cases/extension/029_string_matching_filters.query +0 -1
- package/test/eyelang/conformance/cases/extension/030_string_and_atom_concat.pl +0 -3
- package/test/eyelang/conformance/cases/extension/030_string_and_atom_concat.query +0 -1
- package/test/eyelang/conformance/cases/extension/031_countall_empty_and_nonempty.pl +0 -4
- package/test/eyelang/conformance/cases/extension/031_countall_empty_and_nonempty.query +0 -1
- package/test/eyelang/conformance/cases/extension/032_sumall_numeric_template.pl +0 -5
- package/test/eyelang/conformance/cases/extension/032_sumall_numeric_template.query +0 -1
- package/test/eyelang/conformance/cases/extension/033_aggregate_min_template.pl +0 -5
- package/test/eyelang/conformance/cases/extension/033_aggregate_min_template.query +0 -1
- package/test/eyelang/conformance/cases/extension/034_aggregate_max_compound_key.pl +0 -5
- package/test/eyelang/conformance/cases/extension/034_aggregate_max_compound_key.query +0 -1
- package/test/eyelang/conformance/cases/extension/035_date_difference.pl +0 -4
- package/test/eyelang/conformance/cases/extension/036_reusable_numeric_builtins.pl +0 -10
- package/test/eyelang/conformance/cases/extension/037_reusable_list_builtins.pl +0 -11
- package/test/eyelang/conformance/cases/extension/038_reusable_string_builtins.pl +0 -12
- package/test/eyelang/conformance/cases/extension/039_reusable_term_control_builtins.pl +0 -11
- package/test/eyelang/conformance/cases/extension/044_matches_named_captures.pl +0 -13
- package/test/eyelang/conformance/expected/001_fact_output.pl +0 -1
- package/test/eyelang/conformance/expected/002_rule_recursion.pl +0 -2
- package/test/eyelang/conformance/expected/003_terms_and_readback.pl +0 -13
- package/test/eyelang/conformance/expected/004_conjunction_and_parentheses.pl +0 -1
- package/test/eyelang/conformance/expected/005_list_deconstruction.pl +0 -2
- package/test/eyelang/conformance/expected/006_comma_formula_data.pl +0 -1
- package/test/eyelang/conformance/expected/007_anonymous_variables.pl +0 -1
- package/test/eyelang/conformance/expected/008_graphic_atoms.pl +0 -3
- package/test/eyelang/conformance/expected/009_comments_and_whitespace.pl +0 -2
- package/test/eyelang/conformance/expected/010_variable_scope_and_reuse.pl +0 -2
- package/test/eyelang/conformance/expected/011_predicate_arity.pl +0 -2
- package/test/eyelang/conformance/expected/012_nested_compound_unification.pl +0 -2
- package/test/eyelang/conformance/expected/013_multiple_clauses_order.pl +0 -2
- package/test/eyelang/conformance/expected/014_failure_filters_answers.pl +0 -1
- package/test/eyelang/conformance/expected/015_improper_list_unification.pl +0 -3
- package/test/eyelang/conformance/expected/016_zero_arity_compound.pl +0 -1
- package/test/eyelang/conformance/expected/017_three_step_recursion.pl +0 -3
- package/test/eyelang/conformance/expected/018_quoted_atom_readback.pl +0 -3
- package/test/eyelang/conformance/expected/019_parenthesized_three_conjuncts.pl +0 -1
- package/test/eyelang/conformance/expected/020_nested_list_terms.pl +0 -2
- package/test/eyelang/conformance/expected/021_repeated_variable_head.pl +0 -2
- package/test/eyelang/conformance/expected/022_rule_head_structure.pl +0 -2
- package/test/eyelang/conformance/expected/023_quoted_escapes_readback.pl +0 -2
- package/test/eyelang/conformance/expected/024_numeric_literal_readback.pl +0 -3
- package/test/eyelang/conformance/expected/025_body_parentheses_with_formula_data.pl +0 -1
- package/test/eyelang/conformance/expected/026_underscore_named_variable_reuse.pl +0 -1
- package/test/eyelang/conformance/expected/027_default_derived_output.pl +0 -3
- package/test/eyelang/conformance/expected/028_materialize_focus.pl +0 -1
- package/test/eyelang/conformance/expected/029_arithmetic_and_comparison.pl +0 -9
- package/test/eyelang/conformance/expected/030_strings_and_atoms.pl +0 -2
- package/test/eyelang/conformance/expected/031_lists_aggregation_ordering.pl +0 -9
- package/test/eyelang/conformance/expected/032_holds_parts.pl +0 -3
- package/test/eyelang/conformance/expected/033_negation_once_generators.pl +0 -2
- package/test/eyelang/conformance/expected/034_equality_and_inequality.pl +0 -4
- package/test/eyelang/conformance/expected/035_list_relations.pl +0 -4
- package/test/eyelang/conformance/expected/036_append_splits.pl +0 -3
- package/test/eyelang/conformance/expected/037_matching_and_comparison.pl +0 -5
- package/test/eyelang/conformance/expected/038_memoize_declaration.pl +0 -2
- package/test/eyelang/conformance/expected/039_numeric_functions.pl +0 -7
- package/test/eyelang/conformance/expected/040_between_enumeration.pl +0 -3
- package/test/eyelang/conformance/expected/041_smallest_divisor.pl +0 -1
- package/test/eyelang/conformance/expected/042_negation_filter.pl +0 -2
- package/test/eyelang/conformance/expected/043_once_user_predicate.pl +0 -1
- package/test/eyelang/conformance/expected/044_findall_user_goal.pl +0 -1
- package/test/eyelang/conformance/expected/045_sort_deduplicates_atoms.pl +0 -1
- package/test/eyelang/conformance/expected/046_append_bound_prefix_suffix.pl +0 -2
- package/test/eyelang/conformance/expected/047_nth0_index_generation.pl +0 -1
- package/test/eyelang/conformance/expected/048_set_nth0_edges.pl +0 -2
- package/test/eyelang/conformance/expected/049_select_duplicate_occurrences.pl +0 -2
- package/test/eyelang/conformance/expected/050_not_member_filter.pl +0 -1
- package/test/eyelang/conformance/expected/051_nested_holds_parts.pl +0 -3
- package/test/eyelang/conformance/expected/052_holds_member.pl +0 -2
- package/test/eyelang/conformance/expected/053_materialize_excludes_source_fact.pl +0 -1
- package/test/eyelang/conformance/expected/054_numeric_and_lexical_comparison.pl +0 -3
- package/test/eyelang/conformance/expected/055_string_matching_filters.pl +0 -2
- package/test/eyelang/conformance/expected/056_string_and_atom_concat.pl +0 -1
- package/test/eyelang/conformance/expected/057_countall_empty_and_nonempty.pl +0 -1
- package/test/eyelang/conformance/expected/058_sumall_numeric_template.pl +0 -1
- package/test/eyelang/conformance/expected/059_aggregate_min_template.pl +0 -1
- package/test/eyelang/conformance/expected/060_aggregate_max_compound_key.pl +0 -1
- package/test/eyelang/conformance/expected/061_date_difference.pl +0 -2
- package/test/eyelang/conformance/expected/062_reusable_numeric_builtins.pl +0 -8
- package/test/eyelang/conformance/expected/063_reusable_list_builtins.pl +0 -9
- package/test/eyelang/conformance/expected/064_reusable_string_builtins.pl +0 -10
- package/test/eyelang/conformance/expected/065_reusable_term_control_builtins.pl +0 -6
- package/test/eyelang/conformance/expected/066_numeric_edges.pl +0 -12
- package/test/eyelang/conformance/expected/067_list_edges.pl +0 -8
- package/test/eyelang/conformance/expected/068_list_generation_order.pl +0 -10
- package/test/eyelang/conformance/expected/069_list_summaries_and_sets.pl +0 -7
- package/test/eyelang/conformance/expected/070_matches_named_captures.pl +0 -1
- package/test/eyelang/conformance/expected/071_string_edges.pl +0 -8
- package/test/eyelang/conformance/expected/072_string_conversions.pl +0 -8
- package/test/eyelang/conformance/expected/073_term_introspection_edges.pl +0 -8
- package/test/eyelang/conformance/expected/074_forall_edges.pl +0 -5
- package/test/eyelang/conformance/expected/075_aggregation_edges.pl +0 -7
- package/test/eyelang/conformance/expected/076_composed_reusable_builtins.pl +0 -5
- package/test/eyelang/conformance/expected/077_recursive_path_with_lists.pl +0 -3
- package/test/eyelang/conformance/expected/078_mutual_recursion_with_arithmetic.pl +0 -7
- package/test/eyelang/conformance/expected/079_big_integer_arithmetic.pl +0 -6
- package/test/eyelang/conformance/expected/080_rounding_modes.pl +0 -8
- package/test/eyelang/conformance/expected/081_zero_safe_numeric_functions.pl +0 -7
- package/test/eyelang/conformance/expected/082_comparison_semantics.pl +0 -8
- package/test/eyelang/conformance/expected/083_between_modes_and_empty_ranges.pl +0 -8
- package/test/eyelang/conformance/expected/084_append_and_select_composition.pl +0 -10
- package/test/eyelang/conformance/expected/085_nth_and_update_edges.pl +0 -8
- package/test/eyelang/conformance/expected/086_slicing_pipeline.pl +0 -7
- package/test/eyelang/conformance/expected/087_sort_reverse_length.pl +0 -6
- package/test/eyelang/conformance/expected/088_list_summaries_failures.pl +0 -6
- package/test/eyelang/conformance/expected/089_string_split_join_pipeline.pl +0 -4
- package/test/eyelang/conformance/expected/090_string_substring_replace_edges.pl +0 -7
- package/test/eyelang/conformance/expected/091_string_case_and_trim.pl +0 -5
- package/test/eyelang/conformance/expected/092_scalar_string_conversions.pl +0 -7
- package/test/eyelang/conformance/expected/093_regex_named_captures_context.pl +0 -5
- package/test/eyelang/conformance/expected/094_context_holds_enumeration.pl +0 -8
- package/test/eyelang/conformance/expected/095_term_introspection_roundtrip.pl +0 -6
- package/test/eyelang/conformance/expected/096_functor_scalar_edges.pl +0 -6
- package/test/eyelang/conformance/expected/097_control_negation_once_forall.pl +0 -5
- package/test/eyelang/conformance/expected/098_aggregation_nested_templates.pl +0 -5
- package/test/eyelang/conformance/expected/099_materialize_multiple_arities.pl +0 -4
- package/test/eyelang/conformance/expected/100_reusable_builtin_workflow.pl +0 -6
- package/test/eyelang/conformance/expected/core/001_fact_output.out +0 -1
- package/test/eyelang/conformance/expected/core/002_rule_recursion.out +0 -2
- package/test/eyelang/conformance/expected/core/003_terms_and_readback.out +0 -13
- package/test/eyelang/conformance/expected/core/004_conjunction_and_parentheses.out +0 -1
- package/test/eyelang/conformance/expected/core/005_list_deconstruction.out +0 -2
- package/test/eyelang/conformance/expected/core/006_comma_formula_data.out +0 -1
- package/test/eyelang/conformance/expected/core/007_anonymous_variables.out +0 -1
- package/test/eyelang/conformance/expected/core/008_graphic_atoms.out +0 -3
- package/test/eyelang/conformance/expected/core/009_comments_and_whitespace.out +0 -2
- package/test/eyelang/conformance/expected/core/010_variable_scope_and_reuse.out +0 -2
- package/test/eyelang/conformance/expected/core/011_predicate_arity.out +0 -2
- package/test/eyelang/conformance/expected/core/012_nested_compound_unification.out +0 -2
- package/test/eyelang/conformance/expected/core/013_multiple_clauses_order.out +0 -2
- package/test/eyelang/conformance/expected/core/014_failure_filters_answers.out +0 -1
- package/test/eyelang/conformance/expected/core/015_improper_list_unification.out +0 -3
- package/test/eyelang/conformance/expected/core/016_zero_arity_compound.out +0 -1
- package/test/eyelang/conformance/expected/core/017_three_step_recursion.out +0 -3
- package/test/eyelang/conformance/expected/core/018_quoted_atom_readback.out +0 -3
- package/test/eyelang/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -1
- package/test/eyelang/conformance/expected/core/020_nested_list_terms.out +0 -2
- package/test/eyelang/conformance/expected/core/021_repeated_variable_head.out +0 -2
- package/test/eyelang/conformance/expected/core/022_rule_head_structure.out +0 -2
- package/test/eyelang/conformance/expected/core/023_quoted_escapes_readback.out +0 -2
- package/test/eyelang/conformance/expected/core/024_numeric_literal_readback.out +0 -3
- package/test/eyelang/conformance/expected/core/025_body_parentheses_with_formula_data.out +0 -1
- package/test/eyelang/conformance/expected/core/026_underscore_named_variable_reuse.out +0 -1
- package/test/eyelang/conformance/expected/extension/001_default_derived_output.out +0 -3
- package/test/eyelang/conformance/expected/extension/002_materialize_focus.out +0 -1
- package/test/eyelang/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -9
- package/test/eyelang/conformance/expected/extension/004_strings_and_atoms.out +0 -2
- package/test/eyelang/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -9
- package/test/eyelang/conformance/expected/extension/006_holds_parts.out +0 -3
- package/test/eyelang/conformance/expected/extension/007_negation_once_generators.out +0 -2
- package/test/eyelang/conformance/expected/extension/008_equality_and_inequality.out +0 -4
- package/test/eyelang/conformance/expected/extension/009_list_relations.out +0 -4
- package/test/eyelang/conformance/expected/extension/010_append_splits.out +0 -3
- package/test/eyelang/conformance/expected/extension/011_matching_and_comparison.out +0 -5
- package/test/eyelang/conformance/expected/extension/012_memoize_declaration.out +0 -2
- package/test/eyelang/conformance/expected/extension/013_numeric_functions.out +0 -7
- package/test/eyelang/conformance/expected/extension/014_between_enumeration.out +0 -3
- package/test/eyelang/conformance/expected/extension/015_smallest_divisor.out +0 -1
- package/test/eyelang/conformance/expected/extension/016_negation_filter.out +0 -2
- package/test/eyelang/conformance/expected/extension/017_once_user_predicate.out +0 -1
- package/test/eyelang/conformance/expected/extension/018_findall_user_goal.out +0 -1
- package/test/eyelang/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -1
- package/test/eyelang/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -2
- package/test/eyelang/conformance/expected/extension/021_nth0_index_generation.out +0 -1
- package/test/eyelang/conformance/expected/extension/022_set_nth0_edges.out +0 -2
- package/test/eyelang/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -2
- package/test/eyelang/conformance/expected/extension/024_not_member_filter.out +0 -1
- package/test/eyelang/conformance/expected/extension/026_nested_holds_parts.out +0 -3
- package/test/eyelang/conformance/expected/extension/027_holds_member.out +0 -2
- package/test/eyelang/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -1
- package/test/eyelang/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -3
- package/test/eyelang/conformance/expected/extension/029_string_matching_filters.out +0 -2
- package/test/eyelang/conformance/expected/extension/030_string_and_atom_concat.out +0 -1
- package/test/eyelang/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -1
- package/test/eyelang/conformance/expected/extension/032_sumall_numeric_template.out +0 -1
- package/test/eyelang/conformance/expected/extension/033_aggregate_min_template.out +0 -1
- package/test/eyelang/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -1
- package/test/eyelang/conformance/expected/extension/035_date_difference.out +0 -2
- package/test/eyelang/conformance/expected/extension/036_reusable_numeric_builtins.out +0 -8
- package/test/eyelang/conformance/expected/extension/037_reusable_list_builtins.out +0 -9
- package/test/eyelang/conformance/expected/extension/038_reusable_string_builtins.out +0 -10
- package/test/eyelang/conformance/expected/extension/039_reusable_term_control_builtins.out +0 -6
- package/test/eyelang/conformance/expected/extension/044_matches_named_captures.out +0 -1
- package/test/eyelang/run-all.mjs +0 -20
- package/test/eyelang/run-conformance.mjs +0 -78
- package/test/eyelang/run-examples.mjs +0 -125
- package/test/eyelang/run-regression.mjs +0 -612
- package/test/eyelang/test-style.mjs +0 -94
- package/test/eyelang.test.js +0 -58
|
@@ -1,697 +0,0 @@
|
|
|
1
|
-
# eyelang Language Reference
|
|
2
|
-
|
|
3
|
-
## Table of contents
|
|
4
|
-
|
|
5
|
-
- [Abstract](#abstract)
|
|
6
|
-
- [1. Terminology and normative language](#1-terminology-and-normative-language)
|
|
7
|
-
- [2. Design goals](#2-design-goals)
|
|
8
|
-
- [3. Lexical structure](#3-lexical-structure)
|
|
9
|
-
- [3.1 Character stream](#31-character-stream)
|
|
10
|
-
- [3.2 Comments](#32-comments)
|
|
11
|
-
- [3.3 Punctuation tokens](#33-punctuation-tokens)
|
|
12
|
-
- [3.4 Variables](#34-variables)
|
|
13
|
-
- [3.5 Atom constants](#35-atom-constants)
|
|
14
|
-
- [3.6 Strings](#36-strings)
|
|
15
|
-
- [3.7 Numbers](#37-numbers)
|
|
16
|
-
- [4. Surface grammar](#4-surface-grammar)
|
|
17
|
-
- [5. Terms](#5-terms)
|
|
18
|
-
- [5.1 Variables](#51-variables)
|
|
19
|
-
- [5.2 Atom constants, strings, and numbers](#52-atom-constants-strings-and-numbers)
|
|
20
|
-
- [5.3 Compound terms and atomic formulas](#53-compound-terms-and-atomic-formulas)
|
|
21
|
-
- [5.4 Lists](#54-lists)
|
|
22
|
-
- [5.5 Comma terms](#55-comma-terms)
|
|
23
|
-
- [6. Clauses and predicates](#6-clauses-and-predicates)
|
|
24
|
-
- [7. Goals and proof search](#7-goals-and-proof-search)
|
|
25
|
-
- [7.1 Unification](#71-unification)
|
|
26
|
-
- [7.2 Failure](#72-failure)
|
|
27
|
-
- [7.3 Finite search expectation](#73-finite-search-expectation)
|
|
28
|
-
- [8. Logical reading: Herbrand semantics](#8-logical-reading-herbrand-semantics)
|
|
29
|
-
- [8.1 Variables and quantification](#81-variables-and-quantification)
|
|
30
|
-
- [8.2 Equality, identity, and unification](#82-equality-identity-and-unification)
|
|
31
|
-
- [8.3 Goal-directed execution versus model-theoretic meaning](#83-goal-directed-execution-versus-model-theoretic-meaning)
|
|
32
|
-
- [8.4 Built-ins and operational extensions](#84-built-ins-and-operational-extensions)
|
|
33
|
-
- [9. Standard built-in predicates](#9-standard-built-in-predicates)
|
|
34
|
-
- [9.1 Equality and unification](#91-equality-and-unification)
|
|
35
|
-
- [9.2 Arithmetic](#92-arithmetic)
|
|
36
|
-
- [9.3 Comparison](#93-comparison)
|
|
37
|
-
- [9.4 Dates and durations](#94-dates-and-durations)
|
|
38
|
-
- [9.5 Generators](#95-generators)
|
|
39
|
-
- [9.6 Strings and atom constants](#96-strings-and-atom-constants)
|
|
40
|
-
- [9.7 Lists](#97-lists)
|
|
41
|
-
- [9.8 Aggregation and ordering](#98-aggregation-and-ordering)
|
|
42
|
-
- [9.9 Context terms](#99-context-terms)
|
|
43
|
-
- [9.10 Search control](#910-search-control)
|
|
44
|
-
- [10. Implementation-specific built-ins](#10-implementation-specific-built-ins)
|
|
45
|
-
- [11. Declarations](#11-declarations)
|
|
46
|
-
- [11.1 Memoization](#111-memoization)
|
|
47
|
-
- [11.2 Default-output materialization](#112-default-output-materialization)
|
|
48
|
-
- [12. eyelang Sockets](#12-eyelang-sockets)
|
|
49
|
-
- [12.1 Socket vocabulary](#121-socket-vocabulary)
|
|
50
|
-
- [12.2 Socket example](#122-socket-example)
|
|
51
|
-
- [12.3 Sockets and AI agents](#123-sockets-and-ai-agents)
|
|
52
|
-
- [13. Output and read-back profile](#13-output-and-read-back-profile)
|
|
53
|
-
- [13.1 Explanation output](#131-explanation-output)
|
|
54
|
-
- [14. Conformance](#14-conformance)
|
|
55
|
-
- [15. Relationship to ISO Prolog](#15-relationship-to-iso-prolog)
|
|
56
|
-
- [16. Examples](#16-examples)
|
|
57
|
-
- [16.1 Transitive closure](#161-transitive-closure)
|
|
58
|
-
- [16.2 Arithmetic](#162-arithmetic)
|
|
59
|
-
- [16.3 Lists](#163-lists)
|
|
60
|
-
- [16.4 Negation as failure](#164-negation-as-failure)
|
|
61
|
-
- [17. Security and portability considerations](#17-security-and-portability-considerations)
|
|
62
|
-
|
|
63
|
-
## Abstract
|
|
64
|
-
|
|
65
|
-
eyelang is a compact Prolog-like definite-clause language for rule-based programs over ordinary terms, lists, arithmetic, strings, and finite search. An eyelang program is a finite sequence of facts and Horn clauses. The underlying declarative semantics of the pure language is **Herbrand semantics**: constants, compound terms, and lists denote themselves, and predicates denote sets of ground atomic formulas over those terms. Evaluation is goal-directed: goals are solved by unification against facts, rules, and a fixed set of built-in predicates.
|
|
66
|
-
|
|
67
|
-
eyelang is intentionally smaller than ISO Prolog. It supports enough Prolog syntax to express Horn-clause reasoning, list processing, arithmetic examples, finite search, and context data, without operators, cut, modules, dynamic predicates, DCGs, or a complete ISO standard library.
|
|
68
|
-
|
|
69
|
-
## 1. Terminology and normative language
|
|
70
|
-
|
|
71
|
-
The key words **MUST**, **MUST NOT**, **SHOULD**, **SHOULD NOT**, and **MAY** are to be interpreted as normative requirements.
|
|
72
|
-
|
|
73
|
-
A **term** is a variable, atom constant, string, number, list, or compound term.
|
|
74
|
-
|
|
75
|
-
An **atom constant** is a symbolic scalar term, such as `pat`, `type`, or `'atom with spaces'`. It is a term and may appear as an argument, list element, functor name, or predicate name.
|
|
76
|
-
|
|
77
|
-
An **atomic formula** is a predicate application such as `parent(pat, jan)` or `status(case1, accepted)`. It is the unit of truth in a Herbrand interpretation. In some logic-programming literature atomic formulas are called "atoms"; this specification avoids that shorthand. Whenever the noun "atom" appears here outside the phrase "atomic formula", it means **atom constant**.
|
|
78
|
-
|
|
79
|
-
This distinction is normative: `pat` is an atom constant and can appear as a term argument; `parent(pat, jan)` is an atomic formula and can appear as a fact, rule head, or goal. A compound term such as `pair(pat, jan)` has the same surface shape as an atomic formula, but its role is determined by context: as data it is a compound term, and as a clause head or goal it is an atomic formula with predicate symbol `pair/2`.
|
|
80
|
-
|
|
81
|
-
A **clause** is either a fact `Head.` or a rule `Head :- Body.`.
|
|
82
|
-
|
|
83
|
-
A **goal** is an atomic formula, a built-in call, or a comma conjunction.
|
|
84
|
-
|
|
85
|
-
A **source fact** is a fact written directly in the input program. A **new derivation** is a ground consequence found through at least one rule and not merely repeated from the source facts.
|
|
86
|
-
|
|
87
|
-
The **Herbrand universe** of a program is the set of all ground eyelang terms constructible from the constants and functors in the program, together with the built-in list constructors `[]` and `./2` where lists are used. The **Herbrand base** is the set of all ground atomic formulas whose predicate symbols occur in the program and whose arguments are terms from the Herbrand universe.
|
|
88
|
-
|
|
89
|
-
## 2. Design goals
|
|
90
|
-
|
|
91
|
-
eyelang is designed to be:
|
|
92
|
-
|
|
93
|
-
- small enough to embed and audit;
|
|
94
|
-
- deterministic in textual output order after duplicate suppression;
|
|
95
|
-
- useful for relation-style `p(S, O)` output through ordinary predicate names;
|
|
96
|
-
- practical for examples involving recursion, lists, arithmetic, strings, aggregation, finite search, and context-valued data.
|
|
97
|
-
|
|
98
|
-
Non-goals include complete ISO Prolog compatibility, operator declarations, module systems, dynamic database updates, cut-based control, and full bottom-up closure semantics.
|
|
99
|
-
|
|
100
|
-
## 3. Lexical structure
|
|
101
|
-
|
|
102
|
-
### 3.1 Character stream
|
|
103
|
-
|
|
104
|
-
Input is Unicode text. Whitespace separates tokens and is otherwise insignificant outside quoted strings and quoted atom constants.
|
|
105
|
-
|
|
106
|
-
### 3.2 Comments
|
|
107
|
-
|
|
108
|
-
A percent sign starts a line comment outside quoted strings and quoted atom constants. The comment extends to the end of the line.
|
|
109
|
-
|
|
110
|
-
```prolog
|
|
111
|
-
parent(pat, jan). % this is a comment
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### 3.3 Punctuation tokens
|
|
115
|
-
|
|
116
|
-
The punctuation tokens are:
|
|
117
|
-
|
|
118
|
-
```text
|
|
119
|
-
( ) [ ] , | . :-
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
A colon outside `:-` is not part of the language. Namespace-like names SHOULD be written as plain atom constants such as `person_type` or `odrl_permission`.
|
|
123
|
-
|
|
124
|
-
### 3.4 Variables
|
|
125
|
-
|
|
126
|
-
A variable starts with an uppercase ASCII letter or underscore, followed by zero or more ASCII letters, digits, or underscores.
|
|
127
|
-
|
|
128
|
-
Examples:
|
|
129
|
-
|
|
130
|
-
```prolog
|
|
131
|
-
X
|
|
132
|
-
Person
|
|
133
|
-
_Thing
|
|
134
|
-
_
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Each `_` anonymous variable occurrence is fresh.
|
|
138
|
-
|
|
139
|
-
### 3.5 Atom constants
|
|
140
|
-
|
|
141
|
-
A plain atom constant starts with a lowercase ASCII letter and is followed by zero or more ASCII letters, digits, or underscores:
|
|
142
|
-
|
|
143
|
-
```prolog
|
|
144
|
-
pat
|
|
145
|
-
type
|
|
146
|
-
case_123
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
A quoted atom constant is enclosed in single quotes. A single quote inside a quoted atom constant is represented by doubling it:
|
|
150
|
-
|
|
151
|
-
```prolog
|
|
152
|
-
'atom with spaces'
|
|
153
|
-
'needs''quote'
|
|
154
|
-
''
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
A graphic atom constant is one or more graphic characters from this set:
|
|
158
|
-
|
|
159
|
-
```text
|
|
160
|
-
#$&*+-/<=>?@^~\
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### 3.6 Strings
|
|
164
|
-
|
|
165
|
-
A string is enclosed in double quotes. The implementation supports common escapes such as `\n`, `\t`, `\"`, and `\\`.
|
|
166
|
-
|
|
167
|
-
### 3.7 Numbers
|
|
168
|
-
|
|
169
|
-
Numbers are scalar terms. Integers, decimal numbers, and scientific notation are accepted:
|
|
170
|
-
|
|
171
|
-
```prolog
|
|
172
|
-
0
|
|
173
|
-
-42
|
|
174
|
-
0.25
|
|
175
|
-
1.25e-3
|
|
176
|
-
1.25e+3
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Integer arithmetic built-ins use arbitrary-precision decimal strings where possible. Floating operations use the host implementation's IEEE-754 double-precision behavior.
|
|
180
|
-
|
|
181
|
-
## 4. Surface grammar
|
|
182
|
-
|
|
183
|
-
This grammar is descriptive. Implementations MAY reject programs that exceed implementation limits.
|
|
184
|
-
|
|
185
|
-
```text
|
|
186
|
-
program ::= clause*
|
|
187
|
-
clause ::= term "." | term ":-" goal_list "."
|
|
188
|
-
goal_list ::= term ("," term)*
|
|
189
|
-
term ::= variable
|
|
190
|
-
| atom_constant
|
|
191
|
-
| string
|
|
192
|
-
| number
|
|
193
|
-
| atom_constant "(" [term ("," term)*] ")"
|
|
194
|
-
| "[" [list_items] "]"
|
|
195
|
-
| "(" term ("," term)+ ")"
|
|
196
|
-
list_items ::= term ("," term)* ["|" term]
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Here `atom_constant` is a lexical class for symbolic scalar terms, not an atomic formula. Atomic formulas are represented by the grammar alternative `atom_constant "(" ... ")"` when such a compound appears in a clause head, rule body, or selected goal.
|
|
200
|
-
|
|
201
|
-
A clause head SHOULD be a compound term. Non-compound heads are parsed but are not useful in the current predicate index.
|
|
202
|
-
|
|
203
|
-
Zero-arity compounds are written with parentheses:
|
|
204
|
-
|
|
205
|
-
```prolog
|
|
206
|
-
nil().
|
|
207
|
-
value(example, nil()).
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
## 5. Terms
|
|
211
|
-
|
|
212
|
-
### 5.1 Variables
|
|
213
|
-
|
|
214
|
-
Variables are scoped to a single clause or selected goal. A variable in a rule head and body denotes the same logical variable within that clause.
|
|
215
|
-
|
|
216
|
-
### 5.2 Atom constants, strings, and numbers
|
|
217
|
-
|
|
218
|
-
Atom constants, strings, and numbers are distinct scalar term kinds. Two scalar terms unify only when their type and lexical value match, except where a built-in explicitly interprets lexical values.
|
|
219
|
-
|
|
220
|
-
### 5.3 Compound terms and atomic formulas
|
|
221
|
-
|
|
222
|
-
A compound term has a functor name and arity:
|
|
223
|
-
|
|
224
|
-
```prolog
|
|
225
|
-
parent(pat, jan)
|
|
226
|
-
pair(3, nested(atom, [x, y]))
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
The same concrete syntax is used for atomic formulas when the compound appears as a fact, rule head, or goal. In `parent(pat, jan).`, `parent/2` is a predicate symbol and the whole expression is an atomic formula. In `value(x, parent(pat, jan)).`, the inner `parent(pat, jan)` is ordinary compound data.
|
|
230
|
-
|
|
231
|
-
The functor or predicate name is fixed syntactically and is written as an atom constant. eyelang does not support variables in predicate or functor position.
|
|
232
|
-
|
|
233
|
-
### 5.4 Lists
|
|
234
|
-
|
|
235
|
-
Lists use Prolog surface syntax and are represented internally with `./2` and `[]`:
|
|
236
|
-
|
|
237
|
-
```prolog
|
|
238
|
-
[]
|
|
239
|
-
[a, b, c]
|
|
240
|
-
[a, b | tail]
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### 5.5 Comma terms
|
|
244
|
-
|
|
245
|
-
Parenthesized comma terms may be goals or data:
|
|
246
|
-
|
|
247
|
-
```prolog
|
|
248
|
-
(parent(pat, jan), parent(jan, emma))
|
|
249
|
-
(name(alice, "Alice"), knows(alice, bob))
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
When a comma term appears as a goal, it is evaluated as conjunction. When it appears as data, it remains a term. `holds/2` enumerates member terms inside such contexts, and `holds/3` exposes each member as a predicate name plus an argument list for any arity.
|
|
253
|
-
|
|
254
|
-
## 6. Clauses and predicates
|
|
255
|
-
|
|
256
|
-
A fact has no body:
|
|
257
|
-
|
|
258
|
-
```prolog
|
|
259
|
-
parent(pat, jan).
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
A rule has a head and a body:
|
|
263
|
-
|
|
264
|
-
```prolog
|
|
265
|
-
ancestor(X, Y) :-
|
|
266
|
-
parent(X, Y).
|
|
267
|
-
|
|
268
|
-
ancestor(X, Z) :-
|
|
269
|
-
parent(X, Y),
|
|
270
|
-
ancestor(Y, Z).
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
Clauses with the same predicate name and arity define one predicate group. Predicate name and arity are both significant: `p/1` and `p/2` are different predicates.
|
|
274
|
-
|
|
275
|
-
## 7. Goals and proof search
|
|
276
|
-
|
|
277
|
-
Goals are solved left-to-right. For a user-defined atomic-formula goal, eyelang selects candidate clauses by predicate name, arity, and available indexes. A candidate clause is freshened, its head is unified with the goal, and then its body is solved.
|
|
278
|
-
|
|
279
|
-
A conjunction goal succeeds when all conjunct goals succeed in order. An answer is printed as the resolved answer term followed by a period.
|
|
280
|
-
|
|
281
|
-
### 7.1 Unification
|
|
282
|
-
|
|
283
|
-
Unification follows the ordinary first-order term structure used by the language. The implementation does not perform an occurs check.
|
|
284
|
-
|
|
285
|
-
### 7.2 Failure
|
|
286
|
-
|
|
287
|
-
A goal fails when no built-in case or user clause can prove it. eyelang has no exception term language; parse errors and resource failures are implementation errors reported to the host.
|
|
288
|
-
|
|
289
|
-
### 7.3 Finite search expectation
|
|
290
|
-
|
|
291
|
-
Programs and selected output goals SHOULD be written so the relevant search space is finite. eyelang includes recursion guards and memoization support, but it is not required to terminate for arbitrary recursive logic programs.
|
|
292
|
-
|
|
293
|
-
## 8. Logical reading: Herbrand semantics
|
|
294
|
-
|
|
295
|
-
The pure eyelang language is interpreted over the **Herbrand universe** and **Herbrand base**. The Herbrand universe is the first-order universe made only of the ground terms that can be built from the program's atom constants, strings, numbers, list constructors, and compound functors. There are no hidden domain elements: a term denotes itself. For example, the atom constant `pat` denotes the Herbrand constant `pat`, and the number `3` denotes the numeric Herbrand constant written `3`. The Herbrand base is separate from the universe: it contains ground atomic formulas such as `parent(pat, jan)`, whose predicate symbol is `parent/2` and whose arguments are Herbrand terms.
|
|
296
|
-
|
|
297
|
-
An atom constant by itself is not true or false. For example, `pat` is a term, not a proposition. Truth applies to atomic formulas: `person(pat)` may be true or false in a Herbrand interpretation, while `pat` is simply one possible argument term.
|
|
298
|
-
|
|
299
|
-
A **Herbrand interpretation** for a program is a set of ground atomic formulas that are considered true. A source fact such as:
|
|
300
|
-
|
|
301
|
-
```prolog
|
|
302
|
-
parent(pat, jan).
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
places the ground atomic formula `parent(pat, jan)` in the interpretation. A rule such as:
|
|
306
|
-
|
|
307
|
-
```prolog
|
|
308
|
-
ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
is read universally over Herbrand terms: for every substitution of `X`, `Y`, and `Z` by ground Herbrand terms, if both ground body atomic formulas are true, then the ground head atomic formula is true. The declarative meaning of a pure program is the **least Herbrand model**: the smallest set of ground atomic formulas that contains all facts and is closed under all rules.
|
|
312
|
-
|
|
313
|
-
Equivalently, the least Herbrand model is obtained by repeatedly applying the immediate-consequence operation: start with the source facts, add every ground rule head whose ground body is already true, and continue to the least fixed point. This definition is mathematical; an implementation does not have to compute the model bottom-up.
|
|
314
|
-
|
|
315
|
-
### 8.1 Variables and quantification
|
|
316
|
-
|
|
317
|
-
Variables do not range over external objects, records, pointers, or host-language values. In the logical reading, variables range over Herbrand terms. A rule is implicitly universally quantified over its variables. A selected goal is existential in the usual logic-programming sense: eyelang searches for substitutions of its variables by Herbrand terms that make the goal true with respect to the program.
|
|
318
|
-
|
|
319
|
-
### 8.2 Equality, identity, and unification
|
|
320
|
-
|
|
321
|
-
Because the domain is Herbrand, equality in the pure language is syntactic identity of terms after substitution. Two distinct atom constants are distinct. Two compound terms are equal only when they have the same functor, the same arity, and pairwise equal arguments. Lists follow the same rule through their `[]` and `./2` representation.
|
|
322
|
-
|
|
323
|
-
Operationally, eyelang uses first-order unification to find substitutions. The implementation does not perform an occurs check, so cyclic terms are not part of the portable Herbrand reading even if a particular implementation can temporarily construct recursive bindings internally. Portable programs SHOULD avoid relying on occurs-check-sensitive cases such as `eq(X, f(X))`.
|
|
324
|
-
|
|
325
|
-
### 8.3 Goal-directed execution versus model-theoretic meaning
|
|
326
|
-
|
|
327
|
-
eyelang's CLI and library evaluator are goal-directed. They try to prove requested goals by resolving them against facts, rules, and built-ins, using clause order, goal order, indexing, memoization, and deterministic built-in execution. This operational strategy is intended to enumerate answers that are true in the least Herbrand model for the pure Horn-clause fragment, but it is not a complete bottom-up model enumerator. Non-terminating recursion or infinite generators can prevent an answer from being found even when the answer belongs to the least Herbrand model.
|
|
328
|
-
|
|
329
|
-
Default CLI output is also a host behavior, not a separate semantics. It asks broad materialization goals, suppresses duplicates, excludes source facts, keeps ground answers, and prints selected consequences. Embedders can still access the goal-directed solver directly through the implementation API.
|
|
330
|
-
|
|
331
|
-
### 8.4 Built-ins and operational extensions
|
|
332
|
-
|
|
333
|
-
Built-ins are specified relations or operations added to the Herbrand core. A built-in call in a goal has the syntax of an atomic formula, but its success relation is specified procedurally here rather than by source clauses. Some built-ins, such as `eq/2`, `append/3`, `member/2`, and `length/2`, can be understood as relations over Herbrand terms. Others, such as arithmetic, string matching, date/time predicates, aggregation, `once/1`, and negation-as-failure, are operational extensions whose behavior is defined by this specification rather than by pure least-Herbrand-model semantics alone.
|
|
334
|
-
|
|
335
|
-
Arithmetic and string built-ins do not introduce a separate semantic universe. They inspect the lexical values of already represented Herbrand constants and, when they succeed, bind output arguments to eyelang terms such as numbers, strings, or atom constants. For example, `add(2, 3, X)` may bind `X` to the number term `5`; it does not mean that variables range over host-language numbers outside the Herbrand universe.
|
|
336
|
-
|
|
337
|
-
Negation-as-failure `not(Goal)` is especially operational: it succeeds when the current goal-directed search finds no solution for `Goal`. It is not classical negation and should not be read as adding negative facts to the Herbrand model. Programs using negation SHOULD keep the negated goal sufficiently ground and finite.
|
|
338
|
-
|
|
339
|
-
## 9. Standard built-in predicates
|
|
340
|
-
|
|
341
|
-
This section specifies the **standard built-ins** of the eyelang language. An implementation that claims support for this standard built-in profile MUST implement the predicates in this section with the meanings described here.
|
|
342
|
-
|
|
343
|
-
A built-in call is still written as an atomic formula, but the relation is provided by the host implementation rather than by source clauses. Several built-ins are mode-sensitive: they are intended to run when their input arguments are sufficiently ground, and implementations may leave user-defined clauses visible when that mode is not yet satisfied.
|
|
344
|
-
|
|
345
|
-
Implementations MAY provide additional built-ins, but such built-ins are implementation-specific and are not part of this normative catalog. Implementation-specific built-ins are discussed separately in section 10.
|
|
346
|
-
|
|
347
|
-
### 9.1 Equality and unification
|
|
348
|
-
|
|
349
|
-
| Built-in | Meaning |
|
|
350
|
-
|---|---|
|
|
351
|
-
| `eq(A, B)` | Succeeds when `A` and `B` unify. |
|
|
352
|
-
| `neq(A, B)` | Succeeds when `A` and `B` do not unify. |
|
|
353
|
-
|
|
354
|
-
### 9.2 Arithmetic
|
|
355
|
-
|
|
356
|
-
| Built-in | Meaning |
|
|
357
|
-
|---|---|
|
|
358
|
-
| `neg(A, B)` | `B` is the numeric negation of `A`. |
|
|
359
|
-
| `abs(A, B)` | `B` is the absolute value of `A`. |
|
|
360
|
-
| `sin(A, B)`, `cos(A, B)`, `tan(A, B)` | Trigonometric floating functions. |
|
|
361
|
-
| `asin(A, B)`, `acos(A, B)`, `atan2(Y, X, Angle)` | Inverse trigonometric floating functions. |
|
|
362
|
-
| `sqrt(A, B)` | Square root. Fails for negative inputs. |
|
|
363
|
-
| `floor(A, B)`, `ceiling(A, B)`, `trunc(A, B)`, `rounded(A, B)` | Integer-valued numeric rounding functions. |
|
|
364
|
-
| `exp(A, B)`, `log(A, B)` | Natural exponent and logarithm. `log/2` fails for non-positive inputs. |
|
|
365
|
-
| `add(A, B, C)` | `C = A + B`. |
|
|
366
|
-
| `sub(A, B, C)` | `C = A - B`. |
|
|
367
|
-
| `mul(A, B, C)` | `C = A * B`. |
|
|
368
|
-
| `div(A, B, C)` | `C = A / B`; integer inputs use integer division. |
|
|
369
|
-
| `mod(A, B, C)` | Integer remainder. |
|
|
370
|
-
| `pow(A, B, C)` | `C = A^B`. |
|
|
371
|
-
| `min(A, B, C)`, `max(A, B, C)` | Numeric minimum and maximum. |
|
|
372
|
-
|
|
373
|
-
### 9.3 Comparison
|
|
374
|
-
|
|
375
|
-
| Built-in | Meaning |
|
|
376
|
-
|---|---|
|
|
377
|
-
| `lt(A, B)` | `A < B`. |
|
|
378
|
-
| `gt(A, B)` | `A > B`. |
|
|
379
|
-
| `le(A, B)` | `A =< B`. |
|
|
380
|
-
| `ge(A, B)` | `A >= B`. |
|
|
381
|
-
|
|
382
|
-
Comparisons interpret numeric-looking terms numerically. Other scalar terms are compared lexically.
|
|
383
|
-
|
|
384
|
-
### 9.4 Dates and durations
|
|
385
|
-
|
|
386
|
-
| Built-in | Meaning |
|
|
387
|
-
|---|---|
|
|
388
|
-
| `local_time(T)` | Binds `T` to the local date string. For deterministic runs, `EYELANG_LOCAL_TIME=YYYY-MM-DD` overrides the current date. |
|
|
389
|
-
| `difference(A, B, D)` | Computes an ISO-like date/duration difference. |
|
|
390
|
-
|
|
391
|
-
### 9.5 Generators
|
|
392
|
-
|
|
393
|
-
| Built-in | Meaning |
|
|
394
|
-
|---|---|
|
|
395
|
-
| `between(Low, High, X)` | Enumerates integers from `Low` through `High`. |
|
|
396
|
-
| `smallest_divisor_from(N, Start, D)` | Finds a divisor of `N` starting at `Start`. |
|
|
397
|
-
|
|
398
|
-
### 9.6 Strings and atom constants
|
|
399
|
-
|
|
400
|
-
| Built-in | Meaning |
|
|
401
|
-
|---|---|
|
|
402
|
-
| `str_concat(A, B, C)` | String concatenation. |
|
|
403
|
-
| `contains(Text, Needle)` | Text contains `Needle`. |
|
|
404
|
-
| `matches(Text, Pattern)` | Text matches a simple implementation regex/search pattern. |
|
|
405
|
-
| `matches(Text, Pattern, Context)` | Text matches a JavaScript regular expression with named capture groups; `Context` is a comma context containing one unary term per matched capture group. |
|
|
406
|
-
| `not_matches(Text, Pattern)` | Negation of `matches/2`. |
|
|
407
|
-
| `split(Text, Separator, Parts)` | Splits text into a proper list of strings. |
|
|
408
|
-
| `join(Parts, Separator, Text)` | Joins a proper list of scalar terms into a string. |
|
|
409
|
-
| `substring(Text, Start, Length, Out)` | Extracts a zero-based substring. |
|
|
410
|
-
| `replace(Text, Search, Replacement, Out)` | Replaces all non-empty literal occurrences of `Search`. |
|
|
411
|
-
| `lowercase(Text, Out)`, `uppercase(Text, Out)`, `trim(Text, Out)` | Text normalization helpers. |
|
|
412
|
-
| `number_string(Number, String)` | Converts a number to a string or parses a numeric string into a number. |
|
|
413
|
-
| `atom_string(Atom, String)` | Converts between atom constants and strings. |
|
|
414
|
-
| `term_string(Term, String)` | Renders a ground term as its eyelang source string. |
|
|
415
|
-
|
|
416
|
-
### 9.7 Lists
|
|
417
|
-
|
|
418
|
-
| Built-in | Meaning |
|
|
419
|
-
|---|---|
|
|
420
|
-
| `append(A, B, C)` | List append/split relation. |
|
|
421
|
-
| `nth0(Index, List, Value)` | Zero-based list lookup. |
|
|
422
|
-
| `set_nth0(Index, List, Value, Out)` | Functional list update. |
|
|
423
|
-
| `head(List, Head)` | Head of a non-empty list. |
|
|
424
|
-
| `rest(List, Tail)` | Tail of a non-empty list. |
|
|
425
|
-
| `last(List, Last)` | Last element of a non-empty proper list. |
|
|
426
|
-
| `take(N, List, Prefix)` | First `N` items of a proper list. |
|
|
427
|
-
| `drop(N, List, Suffix)` | Proper-list suffix after dropping `N` items. |
|
|
428
|
-
| `slice(Start, Length, List, Slice)` | Zero-based proper-list slice. |
|
|
429
|
-
| `member(X, List)` | Member generator. |
|
|
430
|
-
| `select(X, List, Rest)` | Selects one occurrence. |
|
|
431
|
-
| `not_member(X, List)` | Succeeds when `X` is not a member. |
|
|
432
|
-
| `reverse(A, B)` | Reverses a proper list. |
|
|
433
|
-
| `length(List, N)` | Proper-list length. |
|
|
434
|
-
| `sum_list(List, Sum)` | Numeric sum of a proper list; empty lists produce `0`. |
|
|
435
|
-
| `min_list(List, Min)`, `max_list(List, Max)` | Minimum and maximum under standard term ordering. |
|
|
436
|
-
| `list_to_set(List, Set)` | Removes duplicates while preserving the first occurrence order. |
|
|
437
|
-
| `sort(Input, Output)` | Sorts and deduplicates a proper list. |
|
|
438
|
-
|
|
439
|
-
### 9.8 Aggregation and ordering
|
|
440
|
-
|
|
441
|
-
| Built-in | Meaning |
|
|
442
|
-
|---|---|
|
|
443
|
-
| `findall(Template, Goal, Bag)` | Collects all templates for solutions of `Goal`. |
|
|
444
|
-
| `countall(Goal, Count)` | Counts solutions of `Goal`; empty solution sets produce `0`. |
|
|
445
|
-
| `sumall(Template, Goal, Sum)` | Sums numeric `Template` values over solutions of `Goal`; empty solution sets produce `0`. |
|
|
446
|
-
| `aggregate_min(Key, Template, Goal, BestKey, BestTemplate)` | Selects the solution of `Goal` with the smallest resolved `Key`, returning that key and the corresponding resolved `Template`. Fails when `Goal` has no solutions. |
|
|
447
|
-
| `aggregate_max(Key, Template, Goal, BestKey, BestTemplate)` | Selects the solution of `Goal` with the largest resolved `Key`, returning that key and the corresponding resolved `Template`. Fails when `Goal` has no solutions. |
|
|
448
|
-
|
|
449
|
-
### 9.9 Context and term inspection
|
|
450
|
-
|
|
451
|
-
Context terms are data representations of atomic formulas and comma conjunctions.
|
|
452
|
-
|
|
453
|
-
| Built-in | Meaning |
|
|
454
|
-
|---|---|
|
|
455
|
-
| `holds(Context, Term)` | Enumerates member terms inside a context term and unifies each member with `Term`. |
|
|
456
|
-
| `holds(Context, Name, Args)` | Enumerates context members of any arity, exposing each member as atom constant `Name` plus a proper argument list `Args`. |
|
|
457
|
-
| `functor(Term, Name, Arity)` | Decomposes a non-variable term into its name and arity. |
|
|
458
|
-
| `arg(Index, Term, Arg)` | Extracts the 1-based argument of a compound term. |
|
|
459
|
-
| `compound_name_arguments(Term, Name, Args)` | Decomposes a compound term or constructs one from an atom name and proper argument list. |
|
|
460
|
-
|
|
461
|
-
Example:
|
|
462
|
-
|
|
463
|
-
```prolog
|
|
464
|
-
holds((name(alice, "Alice"), knows(alice, bob)), name(S, O)).
|
|
465
|
-
holds((ready, name(alice, "Alice"), route(alice, bob, 7)), Name, Args).
|
|
466
|
-
functor(route(alice, bob, 7), route, 3).
|
|
467
|
-
arg(2, route(alice, bob, 7), bob).
|
|
468
|
-
compound_name_arguments(Term, route, [alice, bob, 7]).
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
The first goal can yield `holds((name(alice, "Alice"), knows(alice, bob)), name(alice, "Alice")).` The second can yield `holds((ready, name(alice, "Alice"), route(alice, bob, 7)), ready, []).`, `holds((ready, name(alice, "Alice"), route(alice, bob, 7)), name, [alice, "Alice"]).`, and `holds((ready, name(alice, "Alice"), route(alice, bob, 7)), route, [alice, bob, 7]).`
|
|
472
|
-
|
|
473
|
-
`holds/3` is the appropriate form for schema-style introspection because it exposes the predicate name and all arguments without assuming a fixed arity. For example, a single rule can inspect `heartbeat`, `source(sensor17)`, `temperature(sensor17, 38)`, and `signature(sensor17, sha256, Hash, Time)` as `heartbeat/0`, `source/1`, `temperature/2`, and `signature/4`; see [`context-schema-audit.pl`](../examples/eyelang/context-schema-audit.pl).
|
|
474
|
-
|
|
475
|
-
The N3 example [`context-schema-audit.n3`](../examples/context-schema-audit.n3) shows the same idea in quoted graph form: members are encoded as predicates with RDF-list argument objects, then `log:includes` and `list:length` expose `Name + Arity` for schema checking.
|
|
476
|
-
|
|
477
|
-
### 9.10 Search control
|
|
478
|
-
|
|
479
|
-
| Built-in | Meaning |
|
|
480
|
-
|---|---|
|
|
481
|
-
| `not(Goal)` | Negation as failure. Succeeds when `Goal` has no solution. |
|
|
482
|
-
| `once(Goal)` | Succeeds with at most the first solution of `Goal`. |
|
|
483
|
-
| `forall(Generator, Test)` | Succeeds when every solution of `Generator` also satisfies `Test`; succeeds vacuously when `Generator` has no solutions. |
|
|
484
|
-
|
|
485
|
-
## 10. Implementation-specific built-ins
|
|
486
|
-
|
|
487
|
-
Implementations MAY provide additional built-ins beyond the standard predicates listed above. Such built-ins are **implementation-specific built-ins**. They are useful for embedding eyelang in particular host environments, exposing efficient finite-domain solvers, or providing domain-specific relations for applications.
|
|
488
|
-
|
|
489
|
-
Implementation-specific built-ins are not required for conformance to this specification. A portable eyelang program SHOULD NOT depend on one unless the target implementation explicitly documents it.
|
|
490
|
-
|
|
491
|
-
An implementation-specific built-in SHOULD obey the same surface-language discipline as standard built-ins:
|
|
492
|
-
|
|
493
|
-
- it is called using ordinary atomic-formula syntax, for example `some_extension(A, B)`;
|
|
494
|
-
- its arguments and results are eyelang terms from the Herbrand universe;
|
|
495
|
-
- it succeeds, fails, and binds variables as a relation over eyelang terms;
|
|
496
|
-
- it SHOULD document its intended modes, especially which arguments must be ground before it runs deterministically;
|
|
497
|
-
- it MUST NOT change the meaning of ordinary facts, rules, unification, or standard built-ins.
|
|
498
|
-
|
|
499
|
-
For example, an implementation may include host-specific integrations or domain accelerators. Those modules may be valuable and may make applications much faster, but their predicate names, arities, algorithms, and modes are implementation-defined unless they are separately standardized.
|
|
500
|
-
|
|
501
|
-
An implementation that provides explanation output SHOULD make implementation-specific built-ins explainable at least as opaque successful or failed built-in calls, so that proof traces do not incorrectly report "no clauses" for a host-provided relation.
|
|
502
|
-
|
|
503
|
-
## 11. Declarations
|
|
504
|
-
|
|
505
|
-
Declarations are written as ordinary facts, but the host treats them specially.
|
|
506
|
-
|
|
507
|
-
### 11.1 Memoization
|
|
508
|
-
|
|
509
|
-
```prolog
|
|
510
|
-
memoize(Name, Arity).
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
`Name` MUST be an atom constant and `Arity` MUST be a non-negative integer. The declaration asks the solver to table answers for the named predicate group when applicable.
|
|
514
|
-
|
|
515
|
-
Example:
|
|
516
|
-
|
|
517
|
-
```prolog
|
|
518
|
-
memoize(path, 2).
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### 11.2 Default-output materialization
|
|
522
|
-
|
|
523
|
-
```prolog
|
|
524
|
-
materialize(Name, Arity).
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
`Name` MUST be an atom constant and `Arity` MUST be a non-negative integer. If a program contains one or more `materialize/2` declarations, default CLI output is restricted to those predicate groups. Source facts are still excluded from printed output.
|
|
528
|
-
|
|
529
|
-
Example:
|
|
530
|
-
|
|
531
|
-
```prolog
|
|
532
|
-
materialize(status, 2).
|
|
533
|
-
materialize(reason, 2).
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
`materialize/2` affects host output selection only; it does not change the logical meaning of the program.
|
|
537
|
-
|
|
538
|
-
## 12. eyelang Sockets
|
|
539
|
-
|
|
540
|
-
A **eyelang Socket** is a declared semantic opening in a eyelang program where facts, rules, tools, datasets, or agents can plug in knowledge through an explicit contract while preserving eyelang-readable reasoning and explanations.
|
|
541
|
-
|
|
542
|
-
The term follows the ordinary socket pattern: a socket defines a place where a matching provider can connect. In eyelang, the matching part is knowledge. A socket identifies what shape of knowledge a program expects; a plug identifies which provider supplies it. This separates reasoning logic from knowledge providers and makes composition boundaries visible as eyelang data.
|
|
543
|
-
|
|
544
|
-
In this specification, sockets are a portable **programming pattern** expressed with ordinary facts. The core solver does not give `socket/2`, `plug/2`, `provides/1`, or `requires/1` special proof-search behavior unless a host explicitly documents such an extension. Because they are ordinary facts, socket declarations remain readable, inspectable, explainable, and safe to ignore by hosts that do not validate them.
|
|
545
|
-
|
|
546
|
-
### 12.1 Socket vocabulary
|
|
547
|
-
|
|
548
|
-
The minimal socket vocabulary is:
|
|
549
|
-
|
|
550
|
-
```prolog
|
|
551
|
-
socket(Name, Contract).
|
|
552
|
-
plug(Provider, Name).
|
|
553
|
-
provides(Signature).
|
|
554
|
-
requires(Signature).
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
`Name` and `Provider` are ordinary eyelang terms, usually atom constants. `Contract` is an ordinary eyelang term that describes the expected or offered knowledge. A portable signature form is:
|
|
558
|
-
|
|
559
|
-
```prolog
|
|
560
|
-
predicate(PredicateName, Arity)
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
For example:
|
|
564
|
-
|
|
565
|
-
```prolog
|
|
566
|
-
socket(family_source, provides(predicate(parent, 2))).
|
|
567
|
-
plug(family_file, family_source).
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
This says that `family_source` is a named opening for knowledge of the shape `parent/2`, and that `family_file` is the provider plugged into that opening.
|
|
571
|
-
|
|
572
|
-
### 12.2 Socket example
|
|
573
|
-
|
|
574
|
-
A rule module can declare the knowledge it expects:
|
|
575
|
-
|
|
576
|
-
```prolog
|
|
577
|
-
materialize(ancestor, 2).
|
|
578
|
-
|
|
579
|
-
socket(family_source, provides(predicate(parent, 2))).
|
|
580
|
-
plug(family_file, family_source).
|
|
581
|
-
|
|
582
|
-
parent(pat, jan).
|
|
583
|
-
parent(jan, emma).
|
|
584
|
-
|
|
585
|
-
ancestor(X, Y) :-
|
|
586
|
-
parent(X, Y).
|
|
587
|
-
|
|
588
|
-
ancestor(X, Z) :-
|
|
589
|
-
parent(X, Y),
|
|
590
|
-
ancestor(Y, Z).
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
The `ancestor/2` rules do not depend on a particular storage mechanism for `parent/2`. In a small test, the provider may be the same file. In an embedded host, it may be a database adapter, a document extractor, a remote service, or another eyelang module. The socket facts make that boundary explicit without changing the logical meaning of the rules.
|
|
594
|
-
|
|
595
|
-
When eyelang derives `ancestor(pat, emma)`, the answer explanation can still refer to the source clauses that were actually used, for example facts for `parent/2` and rules for `ancestor/2`. The socket facts add an inspectable description of where such knowledge is intended to enter.
|
|
596
|
-
|
|
597
|
-
### 12.3 Sockets and AI agents
|
|
598
|
-
|
|
599
|
-
eyelang Sockets are especially useful for AI-facing systems. An AI agent can extract or propose candidate claims, but those claims should enter a reasoning program as explicit eyelang facts or rules through a declared socket rather than as opaque text. eyelang can then check the claims against other facts and rules, derive consequences, and optionally return ordinary `why/2` explanations.
|
|
600
|
-
|
|
601
|
-
This gives a clear division of labor: AI can help generate, translate, and connect knowledge; eyelang can represent, check, and explain the reasoning; sockets define the boundary between them.
|
|
602
|
-
|
|
603
|
-
## 13. Output and read-back profile
|
|
604
|
-
|
|
605
|
-
Normal answer output prints one resolved answer term followed by a period. Strings are double-quoted; atom constants are quoted when needed; lists use list syntax; compound terms use functor notation. Host interfaces MAY provide an option such as `--proof` to add `why/2` explanation facts; this option MUST NOT change the answers found.
|
|
606
|
-
|
|
607
|
-
Output SHOULD be accepted as eyelang input when it contains only supported term syntax. Explanations are ordinary eyelang facts, so answer output can be read back and processed by eyelang.
|
|
608
|
-
|
|
609
|
-
Default host output behavior is:
|
|
610
|
-
|
|
611
|
-
1. parse all inputs into one program;
|
|
612
|
-
2. collect source fact lines for duplicate suppression;
|
|
613
|
-
3. if `materialize/2` declarations exist, solve those predicate groups; otherwise solve all binary predicate groups with at least one rule;
|
|
614
|
-
4. keep only ground answers;
|
|
615
|
-
5. remove answers identical to source facts;
|
|
616
|
-
6. suppress duplicates;
|
|
617
|
-
7. print each answer, followed by its `why/2` explanation only if the host interface was explicitly asked to emit proof output.
|
|
618
|
-
|
|
619
|
-
### 13.1 Explanation output
|
|
620
|
-
|
|
621
|
-
When proof output is enabled, each answer SHOULD be followed by a machine-readable `why/2` fact. Explanation output is ordinary eyelang syntax whose second argument is a nested abstract proof term such as `proof(goal(G), by(Method), bindings(Bindings), uses(Proofs))`; implementations SHOULD print `goal(...)` and `by(...)` on separate lines for readability. A proof term preserves the answer goal, derivation method, relevant bindings, and nested uses while omitting proof IDs. User clauses SHOULD be referenced explicitly as `fact(Filename, clause(N))` or `rule(Filename, clause(N))`, where `N` is the 1-based clause number within that source. Built-ins SHOULD be referenced as `builtin(Name, Arity)` because they do not come from source clauses. Explanation output is outside the logical semantics of the input program and MUST NOT change the set of answers.
|
|
622
|
-
|
|
623
|
-
## 14. Conformance
|
|
624
|
-
|
|
625
|
-
A conforming eyelang implementation supports the standard language described above as one conformance surface rather than as separate core and extension profiles. This includes:
|
|
626
|
-
|
|
627
|
-
- lexical syntax described above;
|
|
628
|
-
- facts and definite clauses;
|
|
629
|
-
- first-order unification without occurs check;
|
|
630
|
-
- left-to-right goal-directed proof search;
|
|
631
|
-
- lists and comma conjunctions;
|
|
632
|
-
- answer printing and read-back formatting;
|
|
633
|
-
- the standard built-ins listed in section 9;
|
|
634
|
-
- `memoize/2` declarations;
|
|
635
|
-
- `materialize/2` declarations;
|
|
636
|
-
- default derived output;
|
|
637
|
-
- explanation output when the host exposes proof output.
|
|
638
|
-
|
|
639
|
-
Browser execution, package layout, CLI URL loading, and any implementation-specific built-ins described in host documentation are outside this conformance surface unless separately standardized.
|
|
640
|
-
|
|
641
|
-
Conformance cases live in the repository under `test/eyelang/conformance/`. They are run by `npm test` before the example suite, and can be run alone with `node test/eyelang/run-conformance.mjs`. Each case has an input program under `conformance/cases/` and an exact expected standard-output file under `conformance/expected/`; both use `.pl` so expected output remains eyelang-readable.
|
|
642
|
-
|
|
643
|
-
## 15. Relationship to ISO Prolog
|
|
644
|
-
|
|
645
|
-
eyelang borrows familiar Prolog syntax and Horn-clause execution but is not ISO Prolog. Notable differences include:
|
|
646
|
-
|
|
647
|
-
- no operators or operator declarations;
|
|
648
|
-
- no cut;
|
|
649
|
-
- no modules;
|
|
650
|
-
- no dynamic database update;
|
|
651
|
-
- no DCGs;
|
|
652
|
-
- no full ISO term ordering or standard library;
|
|
653
|
-
- no variables in functor or predicate position;
|
|
654
|
-
- no occurs check in unification.
|
|
655
|
-
|
|
656
|
-
Programs intended to be portable to eyelang SHOULD avoid ISO-specific syntax and keep terms explicit.
|
|
657
|
-
|
|
658
|
-
## 16. Examples
|
|
659
|
-
|
|
660
|
-
### 16.1 Transitive closure
|
|
661
|
-
|
|
662
|
-
```prolog
|
|
663
|
-
parent(pat, jan).
|
|
664
|
-
parent(jan, emma).
|
|
665
|
-
|
|
666
|
-
ancestor(X, Y) :- parent(X, Y).
|
|
667
|
-
ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).
|
|
668
|
-
```
|
|
669
|
-
|
|
670
|
-
### 16.2 Arithmetic
|
|
671
|
-
|
|
672
|
-
```prolog
|
|
673
|
-
square(X, Y) :- mul(X, X, Y).
|
|
674
|
-
answer(three, Y) :- square(3, Y).
|
|
675
|
-
```
|
|
676
|
-
|
|
677
|
-
### 16.3 Lists
|
|
678
|
-
|
|
679
|
-
```prolog
|
|
680
|
-
first([X | _Rest], X).
|
|
681
|
-
answer(example, X) :- first([a, b, c], X).
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
### 16.4 Negation as failure
|
|
685
|
-
|
|
686
|
-
```prolog
|
|
687
|
-
closed(b).
|
|
688
|
-
open(X) :- not(closed(X)).
|
|
689
|
-
status(a, open) :- open(a).
|
|
690
|
-
```
|
|
691
|
-
|
|
692
|
-
## 17. Security and portability considerations
|
|
693
|
-
|
|
694
|
-
URL input uses host networking support when available. Hosts SHOULD treat downloaded programs as untrusted code because they can trigger expensive search.
|
|
695
|
-
|
|
696
|
-
Programs SHOULD be written with finite search in mind. Broad default materialization can be expensive for helper predicates; use `materialize/2` declarations and concise output predicates when needed.
|
|
697
|
-
|