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
package/docs/eyelang-guide.md
DELETED
|
@@ -1,535 +0,0 @@
|
|
|
1
|
-
# eyelang Guide
|
|
2
|
-
|
|
3
|
-
This guide introduces eyelang, the small Prolog-style Horn-clause engine bundled with Eyeling. eyelang works over ordinary terms, lists, arithmetic, strings, and finite search. Run it through the main Eyeling CLI with `eyeling --engine eyelang`, or use `node lib/eyelang/bin.js` when working directly from a source checkout.
|
|
4
|
-
|
|
5
|
-
Programs write relations directly, for example `ancestor(pat, emma)` or `status(case1, accepted)`. eyelang output is ordinary eyelang syntax: by default, the CLI materializes selected answer facts and prints those facts only. Pass `--proof` (or `-p`) when you also want each answer followed by a `why/2` explanation fact that records the proof. Programs may add `materialize(Name, Arity).` declarations to focus output on selected predicates.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Try it in the [Eyeling browser playground](https://eyereasoner.github.io/eyeling/playground). The playground includes run options equivalent to CLI `--stats` and `--proof` when the eyelang engine is selected.
|
|
9
|
-
|
|
10
|
-
For the normative language definition, including lexical syntax, terms, clauses, goals, built-ins, `memoize/2`, `materialize/2`, and conformance boundaries, read the [eyelang language reference](eyelang-language-reference.md).
|
|
11
|
-
|
|
12
|
-
## Contents
|
|
13
|
-
|
|
14
|
-
1. [Quick start](#quick-start)
|
|
15
|
-
2. [Running eyelang](#running-eyelang)
|
|
16
|
-
3. [Default output](#default-output)
|
|
17
|
-
4. [Writing programs](#writing-programs)
|
|
18
|
-
5. [Aggregation helpers](#aggregation-helpers)
|
|
19
|
-
6. [Context data](#context-data)
|
|
20
|
-
7. [Example catalog](#example-catalog)
|
|
21
|
-
8. [Golden outputs, tests, and conformance](#golden-outputs-tests-and-conformance)
|
|
22
|
-
9. [Development and release](#development-and-release)
|
|
23
|
-
10. [Relationship to Eyeling](#relationship-to-eyeling)
|
|
24
|
-
11. [Performance notes](#performance-notes)
|
|
25
|
-
12. [Implementation limits](#implementation-limits)
|
|
26
|
-
|
|
27
|
-
## Quick start
|
|
28
|
-
|
|
29
|
-
Install dependencies, then run the eyelang engine through the main CLI:
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
npm install
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
There is no build step for the source-checkout CLI path. Run examples, multiple inputs, stdin, or a URL:
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
eyeling --engine eyelang --version
|
|
39
|
-
eyeling --engine eyelang examples/eyelang/ancestor.pl
|
|
40
|
-
eyeling --engine eyelang facts.pl rules.pl
|
|
41
|
-
printf 'works(stdin, true) :- eq(ok, ok).\n' | eyeling --engine eyelang -
|
|
42
|
-
eyeling --engine eyelang https://raw.githubusercontent.com/eyereasoner/eyeling/refs/heads/main/examples/eyelang/ancestor.pl
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The CLI runs directly on Node.js 18 or newer. From a source checkout, `node lib/eyelang/bin.js` exposes the same eyelang-specific options without going through the `--engine` router.
|
|
46
|
-
|
|
47
|
-
Serve the playground locally:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
python3 -m http.server 8000
|
|
51
|
-
# then open http://localhost:8000/playground.html
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Running eyelang
|
|
55
|
-
|
|
56
|
-
Show the package version:
|
|
57
|
-
|
|
58
|
-
```sh
|
|
59
|
-
eyeling --engine eyelang --version
|
|
60
|
-
eyeling --engine eyelang -v
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Run a program and let eyelang print derived binary facts:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
eyeling --engine eyelang examples/eyelang/ancestor.pl
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Enable proof explanations when you want machine-readable provenance:
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
eyeling --engine eyelang --proof examples/eyelang/ancestor.pl
|
|
73
|
-
eyeling --engine eyelang -p examples/eyelang/ancestor.pl
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
eyelang-readable explanations are opt-in proof output. Each `why/2` fact contains a nested abstract proof term, and a blank line separates consecutive explanations. Using eyelang syntax for explanations keeps them in the same language as the answers themselves: they are readable by humans, parseable by eyelang, easy to test, and can be transformed or explained further like any other eyelang data. For example:
|
|
77
|
-
|
|
78
|
-
```prolog
|
|
79
|
-
type(socrates, mortal).
|
|
80
|
-
why(
|
|
81
|
-
type(socrates, mortal),
|
|
82
|
-
proof(
|
|
83
|
-
goal(type(socrates, mortal)),
|
|
84
|
-
by(rule("socrates.pl", clause(4))),
|
|
85
|
-
bindings([binding("X", socrates)]),
|
|
86
|
-
uses([
|
|
87
|
-
proof(
|
|
88
|
-
goal(type(socrates, man)),
|
|
89
|
-
by(fact("socrates.pl", clause(3)))
|
|
90
|
-
)
|
|
91
|
-
])
|
|
92
|
-
)
|
|
93
|
-
).
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The explanation output can itself be read as eyelang input; for example, another program can materialize `why/2` facts such as `why(type(socrates, mortal), Proof)`. `--proof` adds only these explanation facts; it does not change the answers found by the solver.
|
|
98
|
-
|
|
99
|
-
### Explanation cookbook
|
|
100
|
-
|
|
101
|
-
eyelang answers can carry their own provenance when proof output is enabled.
|
|
102
|
-
|
|
103
|
-
Explain one derived fact:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
eyeling --engine eyelang --proof examples/eyelang/socrates.pl
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
The output contains the answer and a `why/2` fact. The proof term shows the source rule that produced the answer and the source fact used below it. Source references use `rule("file.pl", clause(N))` and `fact("file.pl", clause(N))`, where `N` is the 1-based clause number in that file.
|
|
110
|
-
|
|
111
|
-
Inspect variable bindings with a small policy program:
|
|
112
|
-
|
|
113
|
-
```prolog
|
|
114
|
-
score(case1, 95).
|
|
115
|
-
threshold(90).
|
|
116
|
-
|
|
117
|
-
status(Case, accepted) :-
|
|
118
|
-
score(Case, Score),
|
|
119
|
-
threshold(T),
|
|
120
|
-
ge(Score, T).
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
eyeling --engine eyelang --proof policy.pl
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
The explanation contains the instantiated answer and the variables that made the rule succeed:
|
|
128
|
-
|
|
129
|
-
```prolog
|
|
130
|
-
status(case1, accepted).
|
|
131
|
-
why(
|
|
132
|
-
status(case1, accepted),
|
|
133
|
-
proof(
|
|
134
|
-
goal(status(case1, accepted)),
|
|
135
|
-
by(rule("policy.pl", clause(3))),
|
|
136
|
-
bindings([binding("Case", case1), binding("Score", 95), binding("T", 90)]),
|
|
137
|
-
uses([...])
|
|
138
|
-
)
|
|
139
|
-
).
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Use the `uses([...])` list to follow the proof tree. In the policy example it contains one subproof for `score(case1, 95)`, one for `threshold(90)`, and one for the built-in comparison `ge(95, 90)`. Built-ins are shown as `builtin(Name, Arity)` because they do not come from source clauses.
|
|
143
|
-
|
|
144
|
-
Reuse explanations as data:
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
eyeling --engine eyelang --proof examples/eyelang/socrates.pl > socrates.why.pl
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
The resulting file is ordinary eyelang syntax containing both answers and `why/2` proof facts.
|
|
151
|
-
|
|
152
|
-
Compose multiple files, stdin, and URLs:
|
|
153
|
-
|
|
154
|
-
```sh
|
|
155
|
-
eyeling --engine eyelang facts.pl rules.pl
|
|
156
|
-
printf 'works(stdin, true) :- eq(ok, ok).\n' | eyeling --engine eyelang -
|
|
157
|
-
eyeling --engine eyelang https://example.test/program.pl
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Default output
|
|
161
|
-
|
|
162
|
-
eyelang programs write relation predicates directly:
|
|
163
|
-
|
|
164
|
-
```prolog
|
|
165
|
-
parent(pat, jan).
|
|
166
|
-
parent(jan, emma).
|
|
167
|
-
|
|
168
|
-
ancestor(X, Y) :- parent(X, Y).
|
|
169
|
-
ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
By default, eyelang asks for new ground consequences of selected output predicates, suppresses duplicates, excludes source facts, sorts the result, and prints Prolog facts:
|
|
173
|
-
|
|
174
|
-
```prolog
|
|
175
|
-
ancestor(jan, emma).
|
|
176
|
-
ancestor(pat, emma).
|
|
177
|
-
ancestor(pat, jan).
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
This default is intentionally output-oriented. It is not a complete bottom-up saturation engine. Built-ins and proof search remain goal-directed; use `materialize/2` declarations and small output predicates when you want a specific relation, arity, or non-binary answer.
|
|
181
|
-
|
|
182
|
-
### Focusing default output
|
|
183
|
-
|
|
184
|
-
Large examples often have internal helper predicates. Add `materialize(Name, Arity).` declarations to restrict default output to selected predicates:
|
|
185
|
-
|
|
186
|
-
```prolog
|
|
187
|
-
materialize(answer, 2).
|
|
188
|
-
|
|
189
|
-
seed(case1).
|
|
190
|
-
helper(Case, score(95)) :- seed(Case).
|
|
191
|
-
answer(Case, accepted) :- helper(Case, score(95)).
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
The default output is then:
|
|
195
|
-
|
|
196
|
-
```prolog
|
|
197
|
-
answer(case1, accepted).
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
`materialize/2` is a declaration, not a logical rule to prove. It affects which predicates the CLI prints, not the meaning of the rules themselves.
|
|
201
|
-
|
|
202
|
-
## Writing programs
|
|
203
|
-
|
|
204
|
-
A good eyelang program normally has three layers:
|
|
205
|
-
|
|
206
|
-
1. source facts;
|
|
207
|
-
2. helper predicates for calculation or search;
|
|
208
|
-
3. concise relation-style outputs, usually binary predicates such as `status(Case, Value)`, `reason(Case, Text)`, `ancestor(Person, Ancestor)`, or `cost(Path, Amount)`.
|
|
209
|
-
|
|
210
|
-
Example:
|
|
211
|
-
|
|
212
|
-
```prolog
|
|
213
|
-
score(case1, 95).
|
|
214
|
-
threshold(90).
|
|
215
|
-
|
|
216
|
-
accepted(Case) :-
|
|
217
|
-
score(Case, Score),
|
|
218
|
-
threshold(Threshold),
|
|
219
|
-
ge(Score, Threshold).
|
|
220
|
-
|
|
221
|
-
status(Case, accepted) :- accepted(Case).
|
|
222
|
-
reason(Case, "score exceeds threshold") :- accepted(Case).
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
When `status/2` and `reason/2` are derived, they appear in default output. If the program has many helper binary predicates, declare the intended output predicates:
|
|
226
|
-
|
|
227
|
-
```prolog
|
|
228
|
-
materialize(status, 2).
|
|
229
|
-
materialize(reason, 2).
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### Naming
|
|
233
|
-
|
|
234
|
-
Predicate names and atom constants use the same lexical form. Namespace-like names should be plain names such as `type`, `person_name`, or `odrl_permission`; colon names are not part of the language.
|
|
235
|
-
|
|
236
|
-
### Embedding remains general
|
|
237
|
-
|
|
238
|
-
The CLI is output-oriented and uses `materialize/2` to decide what to print. Embedders can still use the JavaScript API and `Solver` directly for arbitrary goals and arities.
|
|
239
|
-
|
|
240
|
-
Add `-s` or `--stats` when you want lightweight solver counters on stderr without changing stdout:
|
|
241
|
-
|
|
242
|
-
```sh
|
|
243
|
-
eyeling --engine eyelang -s examples/eyelang/observability-log-correlation.pl
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
The playground has matching `--stats` and `--proof` checkboxes, so browser runs can show the same counters or explanations like the CLI.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
### Builtins
|
|
250
|
-
|
|
251
|
-
eyelang builtins are registered by name and arity in small modules under [`lib/eyelang/builtins`](../lib/eyelang/builtins). This keeps the runtime portable to Node.js and the browser while giving each builtin family a clear boundary. Builtins are enabled by normal predicate calls.
|
|
252
|
-
|
|
253
|
-
The builtin families cover unification, arithmetic, comparison, dates, strings, lists, aggregation, context terms, term inspection, and search control. Domain-specific number-theory and matrix helper modules were removed from the default registry because those predicates were examples/accelerators rather than a reusable portable surface. New reusable helpers cover common numeric functions, list slicing and summaries, string normalization/conversion, term inspection/construction, and `forall/2`. The complete bundled implementation list is kept in the top-level [README built-ins section](../README.md#built-ins-1), and the regression suite checks that table against the actual runtime registry.
|
|
254
|
-
|
|
255
|
-
To add a builtin, create or extend a module with `register(registry)` and call `registry.add(name, arity, handler, options)`. The default registry is assembled in [`lib/eyelang/builtins/registry.js`](../lib/eyelang/builtins/registry.js). Builtins that are only safe for specific argument modes should provide a `ready` predicate and `fallbackWhenNotReady: true`, so user-defined clauses remain visible until the builtin is applicable.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
## Aggregation helpers
|
|
259
|
-
|
|
260
|
-
eyelang includes goal-directed aggregation helpers for finite searches:
|
|
261
|
-
|
|
262
|
-
```prolog
|
|
263
|
-
countall(Goal, Count).
|
|
264
|
-
sumall(Value, Goal, Sum).
|
|
265
|
-
aggregate_min(Key, Template, Goal, BestKey, BestTemplate).
|
|
266
|
-
aggregate_max(Key, Template, Goal, BestKey, BestTemplate).
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
Use `countall/2` for solution counts, `sumall/3` for numeric totals, and `aggregate_min/5` or `aggregate_max/5` when a search should keep only the best candidate instead of collecting and sorting every answer. The `Key` can be a number, atom constant, string, compound term, or list; normal term ordering is used, so compound keys such as `[Cost, Path]` are useful for deterministic tie-breaking.
|
|
270
|
-
|
|
271
|
-
Example:
|
|
272
|
-
|
|
273
|
-
```prolog
|
|
274
|
-
best_cycle(Cycle, Cost) :-
|
|
275
|
-
cities(Cities),
|
|
276
|
-
aggregate_min([Cost, Cycle], Cycle, candidate_cycle(Cities, Cycle, Cost), [Cost, Cycle], Cycle).
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
## Context data
|
|
280
|
-
|
|
281
|
-
Comma terms can be data as well as conjunctions. eyelang provides two context utilities:
|
|
282
|
-
|
|
283
|
-
```prolog
|
|
284
|
-
holds((name(alice, "Alice"), knows(alice, bob)), name(S, O)).
|
|
285
|
-
holds((ready, name(alice, "Alice"), route(alice, bob, 7)), Name, Args).
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
Use `holds/2` when you want to match the member term directly, for example `name(S, O)`, `route(A, B, Cost)`, or `edge(A, arc(B, Cost))`. Use `holds/3` when you need the predicate name and argument list as data: it exposes any-arity member as atom constant `Name` plus a proper list `Args`, so zero-, binary-, and ternary members appear as `ready/0`, `name/2`, and `route/3` shapes without a special binary predicate. These utilities are useful for quoted context data, but they do not make those context members true in the ambient program. The [`context-schema-audit.pl`](../examples/eyelang/context-schema-audit.pl) example shows a case that really needs `holds/3`: it audits heterogeneous message contexts by extracting every member as `Name + Args`, computing each arity, and checking the resulting shape against a schema without knowing the predicate names in advance.
|
|
289
|
-
|
|
290
|
-
`matches/3` can create context data from named regular-expression captures, which is useful when text logs or messages need to become facts before later rules inspect them with `holds/2` or `holds/3`. See [`observability-log-correlation.pl`](../examples/eyelang/observability-log-correlation.pl) for a complete log-correlation example.
|
|
291
|
-
|
|
292
|
-
The N3 counterpart of the context schema audit lives at [`examples/context-schema-audit.n3`](../examples/context-schema-audit.n3) with golden output in [`examples/output/context-schema-audit.md`](../examples/output/context-schema-audit.md).
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
## Example catalog
|
|
296
|
-
|
|
297
|
-
The repository includes examples for recursion, graph reachability, finite search, arithmetic, list processing, optimization, policies, puzzles, and applied scientific calculations. Bundled examples use relation-style output.
|
|
298
|
-
|
|
299
|
-
| Input | Short description | Output |
|
|
300
|
-
| --- | --- | --- |
|
|
301
|
-
| [`access-control-policy.pl`](../examples/eyelang/access-control-policy.pl) | Evaluates role and condition based access decisions. | [`output/access-control-policy.pl`](../examples/eyelang/output/access-control-policy.pl) |
|
|
302
|
-
| [`ackermann.pl`](../examples/eyelang/ackermann.pl) | Computes Ackermann-style hyperoperation values. | [`output/ackermann.pl`](../examples/eyelang/output/ackermann.pl) |
|
|
303
|
-
| [`age.pl`](../examples/eyelang/age.pl) | Checks whether people meet age thresholds. | [`output/age.pl`](../examples/eyelang/output/age.pl) |
|
|
304
|
-
| [`aliases-and-namespaces.pl`](../examples/eyelang/aliases-and-namespaces.pl) | Shows ordinary predicate names for vocabulary aliases. | [`output/aliases-and-namespaces.pl`](../examples/eyelang/output/aliases-and-namespaces.pl) |
|
|
305
|
-
| [`alignment-demo.pl`](../examples/eyelang/alignment-demo.pl) | Rolls dataset concepts up through a small alignment taxonomy. | [`output/alignment-demo.pl`](../examples/eyelang/output/alignment-demo.pl) |
|
|
306
|
-
| [`allen-interval-calculus.pl`](../examples/eyelang/allen-interval-calculus.pl) | Classifies interval relations with integer time offsets. | [`output/allen-interval-calculus.pl`](../examples/eyelang/output/allen-interval-calculus.pl) |
|
|
307
|
-
| [`ancestor.pl`](../examples/eyelang/ancestor.pl) | Derives ancestors from parent facts. | [`output/ancestor.pl`](../examples/eyelang/output/ancestor.pl) |
|
|
308
|
-
| [`animal.pl`](../examples/eyelang/animal.pl) | Classifies animals from traits. | [`output/animal.pl`](../examples/eyelang/output/animal.pl) |
|
|
309
|
-
| [`annotation.pl`](../examples/eyelang/annotation.pl) | Derives facts from quoted annotation data. | [`output/annotation.pl`](../examples/eyelang/output/annotation.pl) |
|
|
310
|
-
| [`auroracare.pl`](../examples/eyelang/auroracare.pl) | Evaluates purpose-based medical data access scenarios. | [`output/auroracare.pl`](../examples/eyelang/output/auroracare.pl) |
|
|
311
|
-
| [`backward.pl`](../examples/eyelang/backward.pl) | Shows a backward-rule pattern as a goal-directed numeric rule. | [`output/backward.pl`](../examples/eyelang/output/backward.pl) |
|
|
312
|
-
| [`basic-monadic.pl`](../examples/eyelang/basic-monadic.pl) | Runs the basic monadic benchmark with explicit indexed edge joins instead of specialized search builtins. | [`output/basic-monadic.pl`](../examples/eyelang/output/basic-monadic.pl) |
|
|
313
|
-
| [`bayes-diagnosis.pl`](../examples/eyelang/bayes-diagnosis.pl) | Computes scaled Bayesian diagnosis posteriors. | [`output/bayes-diagnosis.pl`](../examples/eyelang/output/bayes-diagnosis.pl) |
|
|
314
|
-
| [`bayes-therapy.pl`](../examples/eyelang/bayes-therapy.pl) | Ranks therapies using Bayesian disease likelihoods. | [`output/bayes-therapy.pl`](../examples/eyelang/output/bayes-therapy.pl) |
|
|
315
|
-
| [`beam-deflection.pl`](../examples/eyelang/beam-deflection.pl) | Computes cantilever beam deflection. | [`output/beam-deflection.pl`](../examples/eyelang/output/beam-deflection.pl) |
|
|
316
|
-
| [`blocks-world-planning.pl`](../examples/eyelang/blocks-world-planning.pl) | Searches a finite blocks-world plan. | [`output/blocks-world-planning.pl`](../examples/eyelang/output/blocks-world-planning.pl) |
|
|
317
|
-
| [`bmi.pl`](../examples/eyelang/bmi.pl) | Normalizes BMI inputs and classifies weight. | [`output/bmi.pl`](../examples/eyelang/output/bmi.pl) |
|
|
318
|
-
| [`braking-safety-worlds.pl`](../examples/eyelang/braking-safety-worlds.pl) | Classifies braking safety under alternative worlds. | [`output/braking-safety-worlds.pl`](../examples/eyelang/output/braking-safety-worlds.pl) |
|
|
319
|
-
| [`buck-converter-design.pl`](../examples/eyelang/buck-converter-design.pl) | Checks buck-converter ripple design. | [`output/buck-converter-design.pl`](../examples/eyelang/output/buck-converter-design.pl) |
|
|
320
|
-
| [`cache-performance.pl`](../examples/eyelang/cache-performance.pl) | Summarizes cache latency performance. | [`output/cache-performance.pl`](../examples/eyelang/output/cache-performance.pl) |
|
|
321
|
-
| [`canary-release.pl`](../examples/eyelang/canary-release.pl) | Decides canary rollout or rollback. | [`output/canary-release.pl`](../examples/eyelang/output/canary-release.pl) |
|
|
322
|
-
| [`cat-koko.pl`](../examples/eyelang/cat-koko.pl) | Demonstrates named existential witnesses from a Cat Koko rule pattern. | [`output/cat-koko.pl`](../examples/eyelang/output/cat-koko.pl) |
|
|
323
|
-
| [`clinical-trial-screening.pl`](../examples/eyelang/clinical-trial-screening.pl) | Screens candidates for a trial. | [`output/clinical-trial-screening.pl`](../examples/eyelang/output/clinical-trial-screening.pl) |
|
|
324
|
-
| [`combinatorics-findall-sort.pl`](../examples/eyelang/combinatorics-findall-sort.pl) | Collects and sorts finite combinations. | [`output/combinatorics-findall-sort.pl`](../examples/eyelang/output/combinatorics-findall-sort.pl) |
|
|
325
|
-
| [`competitive-enzyme-kinetics.pl`](../examples/eyelang/competitive-enzyme-kinetics.pl) | Computes inhibited enzyme reaction rates. | [`output/competitive-enzyme-kinetics.pl`](../examples/eyelang/output/competitive-enzyme-kinetics.pl) |
|
|
326
|
-
| [`complex.pl`](../examples/eyelang/complex.pl) | Performs arithmetic on complex pairs. | [`output/complex.pl`](../examples/eyelang/output/complex.pl) |
|
|
327
|
-
| [`composition-of-injective-functions-is-injective.pl`](../examples/eyelang/composition-of-injective-functions-is-injective.pl) | Encodes composition and injectivity of finite functions. | [`output/composition-of-injective-functions-is-injective.pl`](../examples/eyelang/output/composition-of-injective-functions-is-injective.pl) |
|
|
328
|
-
| [`context-association.pl`](../examples/eyelang/context-association.pl) | Associates named contexts with their contents. | [`output/context-association.pl`](../examples/eyelang/output/context-association.pl) |
|
|
329
|
-
| [`context-schema-audit.pl`](../examples/eyelang/context-schema-audit.pl) | Audits mixed-arity context members with `holds/3`. | [`output/context-schema-audit.pl`](../examples/eyelang/output/context-schema-audit.pl) |
|
|
330
|
-
| [`control-system.pl`](../examples/eyelang/control-system.pl) | Evaluates control-system measurements and targets. | [`output/control-system.pl`](../examples/eyelang/output/control-system.pl) |
|
|
331
|
-
| [`cyclic-path.pl`](../examples/eyelang/cyclic-path.pl) | Computes paths in a cyclic graph. | [`output/cyclic-path.pl`](../examples/eyelang/output/cyclic-path.pl) |
|
|
332
|
-
| [`d3-group.pl`](../examples/eyelang/d3-group.pl) | Enumerates subgroups of the D3 group. | [`output/d3-group.pl`](../examples/eyelang/output/d3-group.pl) |
|
|
333
|
-
| [`dairy-energy-balance.pl`](../examples/eyelang/dairy-energy-balance.pl) | Classifies dairy cow energy balance. | [`output/dairy-energy-balance.pl`](../examples/eyelang/output/dairy-energy-balance.pl) |
|
|
334
|
-
| [`data-negotiation.pl`](../examples/eyelang/data-negotiation.pl) | Chooses an accepted data-negotiation offer. | [`output/data-negotiation.pl`](../examples/eyelang/output/data-negotiation.pl) |
|
|
335
|
-
| [`deep-taxonomy-10.pl`](../examples/eyelang/deep-taxonomy-10.pl) | Stress-tests recursive taxonomy depth 10. | [`output/deep-taxonomy-10.pl`](../examples/eyelang/output/deep-taxonomy-10.pl) |
|
|
336
|
-
| [`deep-taxonomy-100.pl`](../examples/eyelang/deep-taxonomy-100.pl) | Stress-tests recursive taxonomy depth 100. | [`output/deep-taxonomy-100.pl`](../examples/eyelang/output/deep-taxonomy-100.pl) |
|
|
337
|
-
| [`deep-taxonomy-1000.pl`](../examples/eyelang/deep-taxonomy-1000.pl) | Stress-tests recursive taxonomy depth 1000. | [`output/deep-taxonomy-1000.pl`](../examples/eyelang/output/deep-taxonomy-1000.pl) |
|
|
338
|
-
| [`deep-taxonomy-10000.pl`](../examples/eyelang/deep-taxonomy-10000.pl) | Stress-tests recursive taxonomy depth 10000. | [`output/deep-taxonomy-10000.pl`](../examples/eyelang/output/deep-taxonomy-10000.pl) |
|
|
339
|
-
| [`deep-taxonomy-100000.pl`](../examples/eyelang/deep-taxonomy-100000.pl) | Stress-tests recursive taxonomy depth 100000. | [`output/deep-taxonomy-100000.pl`](../examples/eyelang/output/deep-taxonomy-100000.pl) |
|
|
340
|
-
| [`delfour.pl`](../examples/eyelang/delfour.pl) | Derives shopping and authorization recommendations. | [`output/delfour.pl`](../examples/eyelang/output/delfour.pl) |
|
|
341
|
-
| [`deontic-logic.pl`](../examples/eyelang/deontic-logic.pl) | Reports obligations, prohibitions, and violations. | [`output/deontic-logic.pl`](../examples/eyelang/output/deontic-logic.pl) |
|
|
342
|
-
| [`derived-backward-rule.pl`](../examples/eyelang/derived-backward-rule.pl) | Derives an inverse-property backward rule from rule data. | [`output/derived-backward-rule.pl`](../examples/eyelang/output/derived-backward-rule.pl) |
|
|
343
|
-
| [`derived-rule.pl`](../examples/eyelang/derived-rule.pl) | Derives conclusions from rule data. | [`output/derived-rule.pl`](../examples/eyelang/output/derived-rule.pl) |
|
|
344
|
-
| [`diamond-property.pl`](../examples/eyelang/diamond-property.pl) | Checks the diamond property of a relation. | [`output/diamond-property.pl`](../examples/eyelang/output/diamond-property.pl) |
|
|
345
|
-
| [`dijkstra.pl`](../examples/eyelang/dijkstra.pl) | Enumerates weighted simple paths. | [`output/dijkstra.pl`](../examples/eyelang/output/dijkstra.pl) |
|
|
346
|
-
| [`dijkstra-findall-sort.pl`](../examples/eyelang/dijkstra-findall-sort.pl) | Finds shortest paths using collected candidates. | [`output/dijkstra-findall-sort.pl`](../examples/eyelang/output/dijkstra-findall-sort.pl) |
|
|
347
|
-
| [`dijkstra-risk-path.pl`](../examples/eyelang/dijkstra-risk-path.pl) | Ranks routes by cost and trust. | [`output/dijkstra-risk-path.pl`](../examples/eyelang/output/dijkstra-risk-path.pl) |
|
|
348
|
-
| [`dining-philosophers.pl`](../examples/eyelang/dining-philosophers.pl) | Simulates Chandy-Misra fork exchanges. | [`output/dining-philosophers.pl`](../examples/eyelang/output/dining-philosophers.pl) |
|
|
349
|
-
| [`dog.pl`](../examples/eyelang/dog.pl) | Counts dogs and derives when a license is required. | [`output/dog.pl`](../examples/eyelang/output/dog.pl) |
|
|
350
|
-
| [`dpv-odrl-purpose-mapping.pl`](../examples/eyelang/dpv-odrl-purpose-mapping.pl) | Maps a DPV process into an ODRL permission view. | [`output/dpv-odrl-purpose-mapping.pl`](../examples/eyelang/output/dpv-odrl-purpose-mapping.pl) |
|
|
351
|
-
| [`drone-corridor-planner.pl`](../examples/eyelang/drone-corridor-planner.pl) | Plans bounded drone corridor routes. | [`output/drone-corridor-planner.pl`](../examples/eyelang/output/drone-corridor-planner.pl) |
|
|
352
|
-
| [`easter-computus.pl`](../examples/eyelang/easter-computus.pl) | Computes Gregorian Easter dates. | [`output/easter-computus.pl`](../examples/eyelang/output/easter-computus.pl) |
|
|
353
|
-
| [`electrical-rc-filter.pl`](../examples/eyelang/electrical-rc-filter.pl) | Sizes an RC low-pass filter. | [`output/electrical-rc-filter.pl`](../examples/eyelang/output/electrical-rc-filter.pl) |
|
|
354
|
-
| [`epidemic-policy.pl`](../examples/eyelang/epidemic-policy.pl) | Chooses policies from risk and social cost. | [`output/epidemic-policy.pl`](../examples/eyelang/output/epidemic-policy.pl) |
|
|
355
|
-
| [`equivalence-classes-overlap-implies-same-class.pl`](../examples/eyelang/equivalence-classes-overlap-implies-same-class.pl) | Packages the shared-member proof pattern for equivalence classes. | [`output/equivalence-classes-overlap-implies-same-class.pl`](../examples/eyelang/output/equivalence-classes-overlap-implies-same-class.pl) |
|
|
356
|
-
| [`eulerian-path.pl`](../examples/eyelang/eulerian-path.pl) | Finds an Eulerian path using each edge once. | [`output/eulerian-path.pl`](../examples/eyelang/output/eulerian-path.pl) |
|
|
357
|
-
| [`ev-range-worlds.pl`](../examples/eyelang/ev-range-worlds.pl) | Estimates electric-vehicle trip feasibility. | [`output/ev-range-worlds.pl`](../examples/eyelang/output/ev-range-worlds.pl) |
|
|
358
|
-
| [`existential-rule.pl`](../examples/eyelang/existential-rule.pl) | Represents existential witnesses with explicit Skolem-style terms. | [`output/existential-rule.pl`](../examples/eyelang/output/existential-rule.pl) |
|
|
359
|
-
| [`exoplanet-validation-worlds.pl`](../examples/eyelang/exoplanet-validation-worlds.pl) | Validates exoplanet candidates across worlds. | [`output/exoplanet-validation-worlds.pl`](../examples/eyelang/output/exoplanet-validation-worlds.pl) |
|
|
360
|
-
| [`expression-eval.pl`](../examples/eyelang/expression-eval.pl) | Evaluates a small arithmetic expression tree. | [`output/expression-eval.pl`](../examples/eyelang/output/expression-eval.pl) |
|
|
361
|
-
| [`family-cousins.pl`](../examples/eyelang/family-cousins.pl) | Derives cousin and family labels. | [`output/family-cousins.pl`](../examples/eyelang/output/family-cousins.pl) |
|
|
362
|
-
| [`fastpow.pl`](../examples/eyelang/fastpow.pl) | Computes powers by repeated squaring. | [`output/fastpow.pl`](../examples/eyelang/output/fastpow.pl) |
|
|
363
|
-
| [`fft8-numeric.pl`](../examples/eyelang/fft8-numeric.pl) | Runs an 8-point FFT over complex pairs. | [`output/fft8-numeric.pl`](../examples/eyelang/output/fft8-numeric.pl) |
|
|
364
|
-
| [`fibonacci.pl`](../examples/eyelang/fibonacci.pl) | Computes large Fibonacci numbers by fast doubling. | [`output/fibonacci.pl`](../examples/eyelang/output/fibonacci.pl) |
|
|
365
|
-
| [`field-nitrogen-balance.pl`](../examples/eyelang/field-nitrogen-balance.pl) | Classifies field nitrogen balance. | [`output/field-nitrogen-balance.pl`](../examples/eyelang/output/field-nitrogen-balance.pl) |
|
|
366
|
-
| [`flandor.pl`](../examples/eyelang/flandor.pl) | Derives a Flanders macro-insight authorization and retooling package. | [`output/flandor.pl`](../examples/eyelang/output/flandor.pl) |
|
|
367
|
-
| [`floating-point.pl`](../examples/eyelang/floating-point.pl) | Exercises floating-point arithmetic and comparisons. | [`output/floating-point.pl`](../examples/eyelang/output/floating-point.pl) |
|
|
368
|
-
| [`four-color-map.pl`](../examples/eyelang/four-color-map.pl) | Checks a four-colour map assignment. | [`output/four-color-map.pl`](../examples/eyelang/output/four-color-map.pl) |
|
|
369
|
-
| [`fundamental-theorem-arithmetic.pl`](../examples/eyelang/fundamental-theorem-arithmetic.pl) | Factors integers and reconstructs products. | [`output/fundamental-theorem-arithmetic.pl`](../examples/eyelang/output/fundamental-theorem-arithmetic.pl) |
|
|
370
|
-
| [`gd-step-certified.pl`](../examples/eyelang/gd-step-certified.pl) | Certifies a gradient-descent step. | [`output/gd-step-certified.pl`](../examples/eyelang/output/gd-step-certified.pl) |
|
|
371
|
-
| [`gdpr-compliance.pl`](../examples/eyelang/gdpr-compliance.pl) | Checks GDPR-style processing compliance. | [`output/gdpr-compliance.pl`](../examples/eyelang/output/gdpr-compliance.pl) |
|
|
372
|
-
| [`good-cobbler.pl`](../examples/eyelang/good-cobbler.pl) | Demonstrates term-level structure with a good-cobbler statement. | [`output/good-cobbler.pl`](../examples/eyelang/output/good-cobbler.pl) |
|
|
373
|
-
| [`gps.pl`](../examples/eyelang/gps.pl) | Finds and verifies route paths. | [`output/gps.pl`](../examples/eyelang/output/gps.pl) |
|
|
374
|
-
| [`graph-reachability.pl`](../examples/eyelang/graph-reachability.pl) | Derives reachable nodes in a graph. | [`output/graph-reachability.pl`](../examples/eyelang/output/graph-reachability.pl) |
|
|
375
|
-
| [`gray-code-counter.pl`](../examples/eyelang/gray-code-counter.pl) | Generates Gray-code counter states. | [`output/gray-code-counter.pl`](../examples/eyelang/output/gray-code-counter.pl) |
|
|
376
|
-
| [`greatest-lower-bound-uniqueness.pl`](../examples/eyelang/greatest-lower-bound-uniqueness.pl) | Shows uniqueness of greatest lower bounds in a finite order instance. | [`output/greatest-lower-bound-uniqueness.pl`](../examples/eyelang/output/greatest-lower-bound-uniqueness.pl) |
|
|
377
|
-
| [`group-inverse-uniqueness.pl`](../examples/eyelang/group-inverse-uniqueness.pl) | Shows uniqueness of inverses in a finite group instance. | [`output/group-inverse-uniqueness.pl`](../examples/eyelang/output/group-inverse-uniqueness.pl) |
|
|
378
|
-
| [`hamiltonian-path.pl`](../examples/eyelang/hamiltonian-path.pl) | Finds a Hamiltonian path. | [`output/hamiltonian-path.pl`](../examples/eyelang/output/hamiltonian-path.pl) |
|
|
379
|
-
| [`hamming-code.pl`](../examples/eyelang/hamming-code.pl) | Corrects a single-bit Hamming word. | [`output/hamming-code.pl`](../examples/eyelang/output/hamming-code.pl) |
|
|
380
|
-
| [`hanoi.pl`](../examples/eyelang/hanoi.pl) | Derives the Towers of Hanoi moves. | [`output/hanoi.pl`](../examples/eyelang/output/hanoi.pl) |
|
|
381
|
-
| [`heat-loss.pl`](../examples/eyelang/heat-loss.pl) | Computes conductive heat loss. | [`output/heat-loss.pl`](../examples/eyelang/output/heat-loss.pl) |
|
|
382
|
-
| [`heron-theorem.pl`](../examples/eyelang/heron-theorem.pl) | Computes triangle area by Heron's theorem. | [`output/heron-theorem.pl`](../examples/eyelang/output/heron-theorem.pl) |
|
|
383
|
-
| [`ideal-gas-law.pl`](../examples/eyelang/ideal-gas-law.pl) | Applies the ideal gas law. | [`output/ideal-gas-law.pl`](../examples/eyelang/output/ideal-gas-law.pl) |
|
|
384
|
-
| [`illegitimate-reasoning.pl`](../examples/eyelang/illegitimate-reasoning.pl) | Detects suspect reasoning patterns. | [`output/illegitimate-reasoning.pl`](../examples/eyelang/output/illegitimate-reasoning.pl) |
|
|
385
|
-
| [`knowledge-engineering-alignment-flow.pl`](../examples/eyelang/knowledge-engineering-alignment-flow.pl) | Specializes reusable alignment rules into a target-shaped flow view. | [`output/knowledge-engineering-alignment-flow.pl`](../examples/eyelang/output/knowledge-engineering-alignment-flow.pl) |
|
|
386
|
-
| [`law-of-cosines.pl`](../examples/eyelang/law-of-cosines.pl) | Computes a triangle side by cosine law. | [`output/law-of-cosines.pl`](../examples/eyelang/output/law-of-cosines.pl) |
|
|
387
|
-
| [`least-squares-regression.pl`](../examples/eyelang/least-squares-regression.pl) | Fits a least-squares regression line. | [`output/least-squares-regression.pl`](../examples/eyelang/output/least-squares-regression.pl) |
|
|
388
|
-
| [`list-collection.pl`](../examples/eyelang/list-collection.pl) | Demonstrates list and collection built-ins. | [`output/list-collection.pl`](../examples/eyelang/output/list-collection.pl) |
|
|
389
|
-
| [`lldm.pl`](../examples/eyelang/lldm.pl) | Calculates leg-length discrepancy measurements. | [`output/lldm.pl`](../examples/eyelang/output/lldm.pl) |
|
|
390
|
-
| [`manufacturing-quality-control.pl`](../examples/eyelang/manufacturing-quality-control.pl) | Evaluates process capability and quality. | [`output/manufacturing-quality-control.pl`](../examples/eyelang/output/manufacturing-quality-control.pl) |
|
|
391
|
-
| [`microgrid-dispatch.pl`](../examples/eyelang/microgrid-dispatch.pl) | Plans microgrid dispatch and reserve. | [`output/microgrid-dispatch.pl`](../examples/eyelang/output/microgrid-dispatch.pl) |
|
|
392
|
-
| [`monkey-bananas.pl`](../examples/eyelang/monkey-bananas.pl) | Solves the monkey-and-bananas puzzle. | [`output/monkey-bananas.pl`](../examples/eyelang/output/monkey-bananas.pl) |
|
|
393
|
-
| [`network-sla.pl`](../examples/eyelang/network-sla.pl) | Checks network path SLA compliance. | [`output/network-sla.pl`](../examples/eyelang/output/network-sla.pl) |
|
|
394
|
-
| [`newton-raphson.pl`](../examples/eyelang/newton-raphson.pl) | Finds roots by Newton-Raphson iteration. | [`output/newton-raphson.pl`](../examples/eyelang/output/newton-raphson.pl) |
|
|
395
|
-
| [`nixon-diamond.pl`](../examples/eyelang/nixon-diamond.pl) | Reports the classic Nixon-diamond conflict. | [`output/nixon-diamond.pl`](../examples/eyelang/output/nixon-diamond.pl) |
|
|
396
|
-
| [`observability-log-correlation.pl`](../examples/eyelang/observability-log-correlation.pl) | Extracts named regex captures from observability logs and correlates events by trace id. | [`output/observability-log-correlation.pl`](../examples/eyelang/output/observability-log-correlation.pl) |
|
|
397
|
-
| [`odrl-dpv-fpv-trust-flow.pl`](../examples/eyelang/odrl-dpv-fpv-trust-flow.pl) | Decides ODRL/DPV data flows with local FPV trust gates. | [`output/odrl-dpv-fpv-trust-flow.pl`](../examples/eyelang/output/odrl-dpv-fpv-trust-flow.pl) |
|
|
398
|
-
| [`odrl-dpv-healthcare-risk-ranked.pl`](../examples/eyelang/odrl-dpv-healthcare-risk-ranked.pl) | Ranks healthcare policy risks and mitigations. | [`output/odrl-dpv-healthcare-risk-ranked.pl`](../examples/eyelang/output/odrl-dpv-healthcare-risk-ranked.pl) |
|
|
399
|
-
| [`odrl-dpv-risk-ranked.pl`](../examples/eyelang/odrl-dpv-risk-ranked.pl) | Ranks data-policy risks and mitigations. | [`output/odrl-dpv-risk-ranked.pl`](../examples/eyelang/output/odrl-dpv-risk-ranked.pl) |
|
|
400
|
-
| [`orbital-transfer-design.pl`](../examples/eyelang/orbital-transfer-design.pl) | Designs a Hohmann orbital transfer. | [`output/orbital-transfer-design.pl`](../examples/eyelang/output/orbital-transfer-design.pl) |
|
|
401
|
-
| [`path-discovery.pl`](../examples/eyelang/path-discovery.pl) | Discovers bounded air-route paths. | [`output/path-discovery.pl`](../examples/eyelang/output/path-discovery.pl) |
|
|
402
|
-
| [`peano-arithmetic.pl`](../examples/eyelang/peano-arithmetic.pl) | Computes Peano addition, multiplication, and factorial. | [`output/peano-arithmetic.pl`](../examples/eyelang/output/peano-arithmetic.pl) |
|
|
403
|
-
| [`peasant.pl`](../examples/eyelang/peasant.pl) | Performs peasant multiplication and exponentiation. | [`output/peasant.pl`](../examples/eyelang/output/peasant.pl) |
|
|
404
|
-
| [`pendulum-period.pl`](../examples/eyelang/pendulum-period.pl) | Computes simple pendulum periods. | [`output/pendulum-period.pl`](../examples/eyelang/output/pendulum-period.pl) |
|
|
405
|
-
| [`polynomial.pl`](../examples/eyelang/polynomial.pl) | Finds complex integer polynomial roots. | [`output/polynomial.pl`](../examples/eyelang/output/polynomial.pl) |
|
|
406
|
-
| [`proof-contrapositive.pl`](../examples/eyelang/proof-contrapositive.pl) | Models proof by contrapositive. | [`output/proof-contrapositive.pl`](../examples/eyelang/output/proof-contrapositive.pl) |
|
|
407
|
-
| [`quadratic-formula.pl`](../examples/eyelang/quadratic-formula.pl) | Solves sample quadratic equations. | [`output/quadratic-formula.pl`](../examples/eyelang/output/quadratic-formula.pl) |
|
|
408
|
-
| [`radioactive-decay.pl`](../examples/eyelang/radioactive-decay.pl) | Computes radioactive decay over time. | [`output/radioactive-decay.pl`](../examples/eyelang/output/radioactive-decay.pl) |
|
|
409
|
-
| [`reusable-builtins.pl`](../examples/eyelang/reusable-builtins.pl) | Tours reusable numeric, list, and string builtins. | [`output/reusable-builtins.pl`](../examples/eyelang/output/reusable-builtins.pl) |
|
|
410
|
-
| [`riemann-hypothesis.pl`](../examples/eyelang/riemann-hypothesis.pl) | Checks a finite catalogue of non-trivial zeta zeros against the Riemann-hypothesis condition. | [`output/riemann-hypothesis.pl`](../examples/eyelang/output/riemann-hypothesis.pl) |
|
|
411
|
-
| [`security-incident-correlation.pl`](../examples/eyelang/security-incident-correlation.pl) | Correlates security incidents across signals. | [`output/security-incident-correlation.pl`](../examples/eyelang/output/security-incident-correlation.pl) |
|
|
412
|
-
| [`service-impact.pl`](../examples/eyelang/service-impact.pl) | Analyzes service impact over cyclic dependencies. | [`output/service-impact.pl`](../examples/eyelang/output/service-impact.pl) |
|
|
413
|
-
| [`sieve.pl`](../examples/eyelang/sieve.pl) | Enumerates primes with a sieve-style program. | [`output/sieve.pl`](../examples/eyelang/output/sieve.pl) |
|
|
414
|
-
| [`skolem-functions.pl`](../examples/eyelang/skolem-functions.pl) | Generates deterministic functional terms. | [`output/skolem-functions.pl`](../examples/eyelang/output/skolem-functions.pl) |
|
|
415
|
-
| [`socket-age.pl`](../examples/eyelang/socket-age.pl) | Shows socket-declared age reasoning inputs and plugs. | [`output/socket-age.pl`](../examples/eyelang/output/socket-age.pl) |
|
|
416
|
-
| [`socket-family.pl`](../examples/eyelang/socket-family.pl) | Shows socket-declared family-source inputs and ancestry rules. | [`output/socket-family.pl`](../examples/eyelang/output/socket-family.pl) |
|
|
417
|
-
| [`socrates.pl`](../examples/eyelang/socrates.pl) | Derives that Socrates is mortal. | [`output/socrates.pl`](../examples/eyelang/output/socrates.pl) |
|
|
418
|
-
| [`statistics-summary.pl`](../examples/eyelang/statistics-summary.pl) | Computes population statistics for a sample. | [`output/statistics-summary.pl`](../examples/eyelang/output/statistics-summary.pl) |
|
|
419
|
-
| [`superdense-coding.pl`](../examples/eyelang/superdense-coding.pl) | Models superdense-coding bit transmission. | [`output/superdense-coding.pl`](../examples/eyelang/output/superdense-coding.pl) |
|
|
420
|
-
| [`term-tools.pl`](../examples/eyelang/term-tools.pl) | Inspects, builds, renders, and validates terms with reusable term/control builtins. | [`output/term-tools.pl`](../examples/eyelang/output/term-tools.pl) |
|
|
421
|
-
| [`trust-flow-provenance-threshold.pl`](../examples/eyelang/trust-flow-provenance-threshold.pl) | Classifies message trust from provenance confidence scores. | [`output/trust-flow-provenance-threshold.pl`](../examples/eyelang/output/trust-flow-provenance-threshold.pl) |
|
|
422
|
-
| [`turing.pl`](../examples/eyelang/turing.pl) | Simulates a binary-increment Turing machine. | [`output/turing.pl`](../examples/eyelang/output/turing.pl) |
|
|
423
|
-
| [`vector-similarity.pl`](../examples/eyelang/vector-similarity.pl) | Computes dot product, norm, and cosine similarity. | [`output/vector-similarity.pl`](../examples/eyelang/output/vector-similarity.pl) |
|
|
424
|
-
| [`vulnerability-impact.pl`](../examples/eyelang/vulnerability-impact.pl) | Analyzes vulnerable transitive dependencies and urgent patch impact. | [`output/vulnerability-impact.pl`](../examples/eyelang/output/vulnerability-impact.pl) |
|
|
425
|
-
| [`witch.pl`](../examples/eyelang/witch.pl) | Derives the classic “burn the witch” rule chain. | [`output/witch.pl`](../examples/eyelang/output/witch.pl) |
|
|
426
|
-
| [`wolf-goat-cabbage.pl`](../examples/eyelang/wolf-goat-cabbage.pl) | Solves the wolf-goat-cabbage river crossing. | [`output/wolf-goat-cabbage.pl`](../examples/eyelang/output/wolf-goat-cabbage.pl) |
|
|
427
|
-
| [`zebra.pl`](../examples/eyelang/zebra.pl) | Solves the zebra logic puzzle. | [`output/zebra.pl`](../examples/eyelang/output/zebra.pl) |
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
## Golden outputs, tests, and conformance
|
|
431
|
-
|
|
432
|
-
Golden answer outputs live in [`examples/eyelang/output`](../examples/eyelang/output). `npm run test:eyelang` covers the eyelang integration check, conformance cases, regression checks, runnable examples, and proof-output examples. A curated proof-output suite for `.pl` examples lives in [`examples/eyelang/proof`](../examples/eyelang/proof). Example tests pin `local_time/1` to `2026-05-30` so date-dependent examples stay deterministic. Regenerate them after an intentional output or explanation change:
|
|
433
|
-
|
|
434
|
-
```sh
|
|
435
|
-
for f in examples/eyelang/*.pl; do
|
|
436
|
-
[ -e "$f" ] || continue
|
|
437
|
-
b=$(basename "$f")
|
|
438
|
-
EYELANG_LOCAL_TIME=2026-05-30 eyeling --engine eyelang "$f" > "examples/eyelang/output/$b"
|
|
439
|
-
done
|
|
440
|
-
|
|
441
|
-
for f in examples/eyelang/proof/*.pl; do
|
|
442
|
-
b=$(basename "$f")
|
|
443
|
-
EYELANG_LOCAL_TIME=2026-05-30 eyeling --engine eyelang --proof "examples/eyelang/$b" > "examples/eyelang/proof/$b"
|
|
444
|
-
done
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
Run the full eyelang suite:
|
|
448
|
-
|
|
449
|
-
```sh
|
|
450
|
-
npm run test:eyelang
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
The eyelang corpus runner runs in this order: Conformance, Regression/API/White-box, Examples. Each section prints its own subtotal, followed by a suite-specific grand total. The suite checks the conformance cases derived from the language reference, supplemental regression/API/white-box checks, and every runnable example against its golden output.
|
|
454
|
-
|
|
455
|
-
Run only one internal suite when you are iterating:
|
|
456
|
-
|
|
457
|
-
```sh
|
|
458
|
-
node test/eyelang/run-conformance.mjs
|
|
459
|
-
node test/eyelang/run-regression.mjs
|
|
460
|
-
node test/eyelang/run-examples.mjs
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
The conformance suite lives in [`test/eyelang/conformance/`](../test/eyelang/conformance/) as one flat eyelang corpus. Each case is a small `.pl` program with an exact expected stdout `.pl` file, and some cases also include a goal file for testing the embeddable solver, so other implementations can reuse the same cases. The suite covers the standard language surface from the language reference, including reusable built-ins. The regression suite lives in [`test/eyelang/run-regression.mjs`](../test/eyelang/run-regression.mjs) and covers CLI regressions, the public JavaScript API, and white-box invariants for parser, unification, and indexing behavior.
|
|
464
|
-
|
|
465
|
-
## Development and release
|
|
466
|
-
|
|
467
|
-
Common commands:
|
|
468
|
-
|
|
469
|
-
```sh
|
|
470
|
-
npm run test:eyelang # integration check plus eyelang corpus
|
|
471
|
-
npm run test:eyelang:corpus # conformance, regression/API/white-box, examples, and proof examples
|
|
472
|
-
node test/eyelang/run-conformance.mjs
|
|
473
|
-
node test/eyelang/run-regression.mjs
|
|
474
|
-
node test/eyelang/run-examples.mjs
|
|
475
|
-
eyeling --engine eyelang --help
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
Useful profiling smoke test:
|
|
479
|
-
|
|
480
|
-
```sh
|
|
481
|
-
eyeling --engine eyelang -s examples/eyelang/observability-log-correlation.pl > /dev/null
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
For a release:
|
|
485
|
-
|
|
486
|
-
1. update `VERSION`;
|
|
487
|
-
2. update `README.md` and the language reference;
|
|
488
|
-
3. regenerate golden outputs if behavior changed;
|
|
489
|
-
4. run `npm run test:eyelang`;
|
|
490
|
-
5. publish the repository with the browser playground assets if publishing the playground. The playground includes controls equivalent to CLI `--stats` and `--proof`.
|
|
491
|
-
|
|
492
|
-
## Relationship to Eyeling
|
|
493
|
-
|
|
494
|
-
[Eyeling](https://github.com/eyereasoner/eyeling) and eyelang share the same goal of small, inspectable rule-based reasoning in JavaScript, but they make different language and implementation trade-offs.
|
|
495
|
-
|
|
496
|
-
Eyeling is the RDF/Notation3 member of the family. It reads N3-style triples, quoted formulas, forward rules written with `=>`, backward rules written with `<=`, RDF terms, RDF-JS data, and RDF-oriented streams. That makes it the better fit when data interchange with RDF/N3 tools is the main requirement.
|
|
497
|
-
|
|
498
|
-
eyelang is the compact Prolog-style member of the family. It uses ordinary predicate syntax such as `parent(alice, bob).` and `ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).` This keeps the core syntax close to the ISO-standardized Prolog tradition while deliberately staying much smaller than ISO Prolog. It is a good fit when the problem is naturally relational, goal-directed, finite, and does not need RDF graph interchange.
|
|
499
|
-
|
|
500
|
-
A useful rule of thumb:
|
|
501
|
-
|
|
502
|
-
| Use case | Prefer | Why |
|
|
503
|
-
| --- | --- | --- |
|
|
504
|
-
| RDF/N3 data, triples, prefixes, graph terms, RDF-JS, RDF message streams | Eyeling | The surface language and APIs are RDF/Notation3-native. |
|
|
505
|
-
| Compact relational rules over ordinary terms, lists, arithmetic, and finite search | eyelang | The syntax is shorter for non-RDF relation programs and output is ordinary facts. |
|
|
506
|
-
| Human-auditable derivations | Either | Both can emit proof explanations when requested. |
|
|
507
|
-
| Large generated Horn-clause workloads | eyelang | The engine specializes in predicate/arity indexing, scalar argument indexes, fast fact paths, and materialized output goals. |
|
|
508
|
-
|
|
509
|
-
For the deep taxonomy benchmark, eyelang is substantially faster in current local checks. On one sandbox run, `eyeling --engine eyelang examples/eyelang/deep-taxonomy-100000.pl > /dev/null` took about `1.60 sec`, while `eyeling` package version `1.28.7` on `examples/deep-taxonomy-100000.n3` took about `4.56 sec` without proof and about `5.04 sec` with proof. Treat those numbers as a smoke comparison rather than a formal benchmark: hardware, Node.js version, package version, and CLI startup all matter.
|
|
510
|
-
|
|
511
|
-
The projects are therefore complementary rather than replacements for each other: Eyeling optimizes for Semantic Web interoperability and N3 expressiveness; eyelang optimizes for a small standard-looking relational rule language and fast finite goal-directed execution.
|
|
512
|
-
|
|
513
|
-
## Performance notes
|
|
514
|
-
|
|
515
|
-
Use `-s` or `--stats` for a quick sanity check while optimizing solver changes. It prints counters such as `solve_goals_calls`, `unify_calls`, `deterministic_rule_expansions`, `candidate_lists_selected`, `clause_candidates_considered`, `clauses_tried`, `max_depth`, and `max_solver_call_depth` to stderr, leaving normal output stable for golden-file tests. The `max_solver_call_depth` counter is especially useful for browser regressions, where the VM call stack can be tighter than a command-line run.
|
|
516
|
-
|
|
517
|
-
eyelang hashes predicate groups by name and arity, then indexes clauses by scalar argument values. It also builds two-argument composite indexes for scalar pairs and probes those composite indexes without per-lookup heap allocation. This helps both large generated programs with many predicates and selective queries such as:
|
|
518
|
-
|
|
519
|
-
```prolog
|
|
520
|
-
edge(g1, a, X).
|
|
521
|
-
path(a, Y).
|
|
522
|
-
status(Case, accepted).
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
Ground facts use a fast path that avoids freshening and copying a rule body. Recursive-predicate detection uses an explicit work stack, which keeps large predicate chains safer in the browser. Recursive examples use an active-call variant guard to prevent common cyclic closures from looping. Selected predicates can be memoized with:
|
|
526
|
-
|
|
527
|
-
```prolog
|
|
528
|
-
memoize(path, 2).
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
For large programs, keep helper predicates selective, bind arguments early, and declare focused output predicates with `materialize/2` when default output would otherwise solve broad helper goals.
|
|
532
|
-
|
|
533
|
-
## Implementation limits
|
|
534
|
-
|
|
535
|
-
eyelang is intentionally smaller than ISO Prolog. It has no operators, cut, modules, dynamic database updates, DCGs, or complete ISO library. Negation is negation-as-failure through `not/1`. Search is goal-directed and expected to be finite for the selected output goals. Output explanations are non-normative proof printouts and do not change answer semantics.
|