eyeling 1.34.4 → 1.34.6
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/eyelang/conformance/README.md +9 -11
- package/test/eyelang/conformance/cases/001_fact_output.pl +4 -0
- package/test/eyelang/conformance/cases/002_rule_recursion.pl +7 -0
- package/test/eyelang/conformance/cases/002_rule_recursion.query +1 -0
- package/test/eyelang/conformance/cases/003_terms_and_readback.pl +16 -0
- package/test/eyelang/conformance/cases/003_terms_and_readback.query +1 -0
- package/test/eyelang/conformance/cases/004_conjunction_and_parentheses.pl +5 -0
- package/test/eyelang/conformance/cases/004_conjunction_and_parentheses.query +1 -0
- package/test/eyelang/conformance/cases/005_list_deconstruction.pl +6 -0
- package/test/eyelang/conformance/cases/005_list_deconstruction.query +1 -0
- package/test/eyelang/conformance/cases/006_comma_formula_data.pl +4 -0
- package/test/eyelang/conformance/cases/006_comma_formula_data.query +1 -0
- package/test/eyelang/conformance/cases/007_anonymous_variables.pl +5 -0
- package/test/eyelang/conformance/cases/007_anonymous_variables.query +1 -0
- package/test/eyelang/conformance/cases/008_graphic_atoms.pl +6 -0
- package/test/eyelang/conformance/cases/008_graphic_atoms.query +1 -0
- package/test/eyelang/conformance/cases/009_comments_and_whitespace.pl +5 -0
- package/test/eyelang/conformance/cases/009_comments_and_whitespace.query +1 -0
- package/test/eyelang/conformance/cases/010_variable_scope_and_reuse.pl +8 -0
- package/test/eyelang/conformance/cases/010_variable_scope_and_reuse.query +1 -0
- package/test/eyelang/conformance/cases/011_predicate_arity.pl +6 -0
- package/test/eyelang/conformance/cases/011_predicate_arity.query +1 -0
- package/test/eyelang/conformance/cases/012_nested_compound_unification.pl +5 -0
- package/test/eyelang/conformance/cases/012_nested_compound_unification.query +1 -0
- package/test/eyelang/conformance/cases/013_multiple_clauses_order.pl +6 -0
- package/test/eyelang/conformance/cases/013_multiple_clauses_order.query +1 -0
- package/test/eyelang/conformance/cases/014_failure_filters_answers.pl +7 -0
- package/test/eyelang/conformance/cases/014_failure_filters_answers.query +1 -0
- package/test/eyelang/conformance/cases/015_improper_list_unification.pl +6 -0
- package/test/eyelang/conformance/cases/015_improper_list_unification.query +1 -0
- package/test/eyelang/conformance/cases/016_zero_arity_compound.pl +4 -0
- package/test/eyelang/conformance/cases/016_zero_arity_compound.query +1 -0
- package/test/eyelang/conformance/cases/017_three_step_recursion.pl +8 -0
- package/test/eyelang/conformance/cases/017_three_step_recursion.query +1 -0
- package/test/eyelang/conformance/cases/018_quoted_atom_readback.pl +6 -0
- package/test/eyelang/conformance/cases/018_quoted_atom_readback.query +1 -0
- package/test/eyelang/conformance/cases/019_parenthesized_three_conjuncts.pl +7 -0
- package/test/eyelang/conformance/cases/019_parenthesized_three_conjuncts.query +1 -0
- package/test/eyelang/conformance/cases/020_nested_list_terms.pl +5 -0
- package/test/eyelang/conformance/cases/020_nested_list_terms.query +1 -0
- package/test/eyelang/conformance/cases/021_repeated_variable_head.pl +7 -0
- package/test/eyelang/conformance/cases/022_rule_head_structure.pl +5 -0
- package/test/eyelang/conformance/cases/023_quoted_escapes_readback.pl +5 -0
- package/test/eyelang/conformance/cases/024_numeric_literal_readback.pl +6 -0
- package/test/eyelang/conformance/cases/025_body_parentheses_with_formula_data.pl +5 -0
- package/test/eyelang/conformance/cases/026_underscore_named_variable_reuse.pl +5 -0
- package/test/eyelang/conformance/cases/027_default_derived_output.pl +5 -0
- package/test/eyelang/conformance/cases/028_materialize_focus.pl +5 -0
- package/test/eyelang/conformance/cases/029_arithmetic_and_comparison.pl +11 -0
- package/test/eyelang/conformance/cases/029_arithmetic_and_comparison.query +1 -0
- package/test/eyelang/conformance/cases/030_strings_and_atoms.pl +4 -0
- package/test/eyelang/conformance/cases/030_strings_and_atoms.query +1 -0
- package/test/eyelang/conformance/cases/031_lists_aggregation_ordering.pl +10 -0
- package/test/eyelang/conformance/cases/031_lists_aggregation_ordering.query +1 -0
- package/test/eyelang/conformance/cases/032_holds_parts.pl +4 -0
- package/test/eyelang/conformance/cases/033_negation_once_generators.pl +7 -0
- package/test/eyelang/conformance/cases/033_negation_once_generators.query +1 -0
- package/test/eyelang/conformance/cases/034_equality_and_inequality.pl +6 -0
- package/test/eyelang/conformance/cases/034_equality_and_inequality.query +1 -0
- package/test/eyelang/conformance/cases/035_list_relations.pl +5 -0
- package/test/eyelang/conformance/cases/035_list_relations.query +1 -0
- package/test/eyelang/conformance/cases/036_append_splits.pl +3 -0
- package/test/eyelang/conformance/cases/036_append_splits.query +1 -0
- package/test/eyelang/conformance/cases/037_matching_and_comparison.pl +7 -0
- package/test/eyelang/conformance/cases/037_matching_and_comparison.query +1 -0
- package/test/eyelang/conformance/cases/038_memoize_declaration.pl +8 -0
- package/test/eyelang/conformance/cases/038_memoize_declaration.query +1 -0
- package/test/eyelang/conformance/cases/039_numeric_functions.pl +9 -0
- package/test/eyelang/conformance/cases/039_numeric_functions.query +1 -0
- package/test/eyelang/conformance/cases/040_between_enumeration.pl +3 -0
- package/test/eyelang/conformance/cases/040_between_enumeration.query +1 -0
- package/test/eyelang/conformance/cases/041_smallest_divisor.pl +3 -0
- package/test/eyelang/conformance/cases/041_smallest_divisor.query +1 -0
- package/test/eyelang/conformance/cases/042_negation_filter.pl +7 -0
- package/test/eyelang/conformance/cases/042_negation_filter.query +1 -0
- package/test/eyelang/conformance/cases/043_once_user_predicate.pl +5 -0
- package/test/eyelang/conformance/cases/043_once_user_predicate.query +1 -0
- package/test/eyelang/conformance/cases/044_findall_user_goal.pl +6 -0
- package/test/eyelang/conformance/cases/044_findall_user_goal.query +1 -0
- package/test/eyelang/conformance/cases/045_sort_deduplicates_atoms.pl +3 -0
- package/test/eyelang/conformance/cases/045_sort_deduplicates_atoms.query +1 -0
- package/test/eyelang/conformance/cases/046_append_bound_prefix_suffix.pl +4 -0
- package/test/eyelang/conformance/cases/046_append_bound_prefix_suffix.query +1 -0
- package/test/eyelang/conformance/cases/047_nth0_index_generation.pl +3 -0
- package/test/eyelang/conformance/cases/047_nth0_index_generation.query +1 -0
- package/test/eyelang/conformance/cases/048_set_nth0_edges.pl +4 -0
- package/test/eyelang/conformance/cases/048_set_nth0_edges.query +1 -0
- package/test/eyelang/conformance/cases/049_select_duplicate_occurrences.pl +3 -0
- package/test/eyelang/conformance/cases/049_select_duplicate_occurrences.query +1 -0
- package/test/eyelang/conformance/cases/050_not_member_filter.pl +6 -0
- package/test/eyelang/conformance/cases/050_not_member_filter.query +1 -0
- package/test/eyelang/conformance/cases/051_nested_holds_parts.pl +4 -0
- package/test/eyelang/conformance/cases/052_holds_member.pl +3 -0
- package/test/eyelang/conformance/cases/053_materialize_excludes_source_fact.pl +6 -0
- package/test/eyelang/conformance/cases/054_numeric_and_lexical_comparison.pl +5 -0
- package/test/eyelang/conformance/cases/054_numeric_and_lexical_comparison.query +1 -0
- package/test/eyelang/conformance/cases/055_string_matching_filters.pl +6 -0
- package/test/eyelang/conformance/cases/055_string_matching_filters.query +1 -0
- package/test/eyelang/conformance/cases/056_string_and_atom_concat.pl +3 -0
- package/test/eyelang/conformance/cases/056_string_and_atom_concat.query +1 -0
- package/test/eyelang/conformance/cases/057_countall_empty_and_nonempty.pl +4 -0
- package/test/eyelang/conformance/cases/057_countall_empty_and_nonempty.query +1 -0
- package/test/eyelang/conformance/cases/058_sumall_numeric_template.pl +5 -0
- package/test/eyelang/conformance/cases/058_sumall_numeric_template.query +1 -0
- package/test/eyelang/conformance/cases/059_aggregate_min_template.pl +5 -0
- package/test/eyelang/conformance/cases/059_aggregate_min_template.query +1 -0
- package/test/eyelang/conformance/cases/060_aggregate_max_compound_key.pl +5 -0
- package/test/eyelang/conformance/cases/060_aggregate_max_compound_key.query +1 -0
- package/test/eyelang/conformance/cases/061_date_difference.pl +4 -0
- package/test/eyelang/conformance/cases/062_reusable_numeric_builtins.pl +10 -0
- package/test/eyelang/conformance/cases/063_reusable_list_builtins.pl +11 -0
- package/test/eyelang/conformance/cases/064_reusable_string_builtins.pl +12 -0
- package/test/eyelang/conformance/cases/065_reusable_term_control_builtins.pl +11 -0
- package/test/eyelang/conformance/cases/066_numeric_edges.pl +14 -0
- package/test/eyelang/conformance/cases/067_list_edges.pl +10 -0
- package/test/eyelang/conformance/cases/068_list_generation_order.pl +7 -0
- package/test/eyelang/conformance/cases/069_list_summaries_and_sets.pl +9 -0
- package/test/eyelang/conformance/cases/070_matches_named_captures.pl +13 -0
- package/test/eyelang/conformance/cases/071_string_edges.pl +10 -0
- package/test/eyelang/conformance/cases/072_string_conversions.pl +10 -0
- package/test/eyelang/conformance/cases/073_term_introspection_edges.pl +10 -0
- package/test/eyelang/conformance/cases/074_forall_edges.pl +10 -0
- package/test/eyelang/conformance/cases/075_aggregation_edges.pl +12 -0
- package/test/eyelang/conformance/cases/076_composed_reusable_builtins.pl +8 -0
- package/test/eyelang/conformance/cases/077_recursive_path_with_lists.pl +10 -0
- package/test/eyelang/conformance/cases/078_mutual_recursion_with_arithmetic.pl +7 -0
- package/test/eyelang/conformance/cases/079_big_integer_arithmetic.pl +8 -0
- package/test/eyelang/conformance/cases/080_rounding_modes.pl +10 -0
- package/test/eyelang/conformance/cases/081_zero_safe_numeric_functions.pl +9 -0
- package/test/eyelang/conformance/cases/082_comparison_semantics.pl +10 -0
- package/test/eyelang/conformance/cases/083_between_modes_and_empty_ranges.pl +8 -0
- package/test/eyelang/conformance/cases/084_append_and_select_composition.pl +7 -0
- package/test/eyelang/conformance/cases/085_nth_and_update_edges.pl +8 -0
- package/test/eyelang/conformance/cases/086_slicing_pipeline.pl +10 -0
- package/test/eyelang/conformance/cases/087_sort_reverse_length.pl +8 -0
- package/test/eyelang/conformance/cases/088_list_summaries_failures.pl +8 -0
- package/test/eyelang/conformance/cases/089_string_split_join_pipeline.pl +7 -0
- package/test/eyelang/conformance/cases/090_string_substring_replace_edges.pl +9 -0
- package/test/eyelang/conformance/cases/091_string_case_and_trim.pl +7 -0
- package/test/eyelang/conformance/cases/092_scalar_string_conversions.pl +9 -0
- package/test/eyelang/conformance/cases/093_regex_named_captures_context.pl +8 -0
- package/test/eyelang/conformance/cases/094_context_holds_enumeration.pl +7 -0
- package/test/eyelang/conformance/cases/095_term_introspection_roundtrip.pl +8 -0
- package/test/eyelang/conformance/cases/096_functor_scalar_edges.pl +8 -0
- package/test/eyelang/conformance/cases/097_control_negation_once_forall.pl +13 -0
- package/test/eyelang/conformance/cases/098_aggregation_nested_templates.pl +11 -0
- package/test/eyelang/conformance/cases/099_materialize_multiple_arities.pl +8 -0
- package/test/eyelang/conformance/cases/100_reusable_builtin_workflow.pl +10 -0
- package/test/eyelang/conformance/expected/001_fact_output.pl +1 -0
- package/test/eyelang/conformance/expected/002_rule_recursion.pl +2 -0
- package/test/eyelang/conformance/expected/003_terms_and_readback.pl +13 -0
- package/test/eyelang/conformance/expected/004_conjunction_and_parentheses.pl +1 -0
- package/test/eyelang/conformance/expected/005_list_deconstruction.pl +2 -0
- package/test/eyelang/conformance/expected/006_comma_formula_data.pl +1 -0
- package/test/eyelang/conformance/expected/007_anonymous_variables.pl +1 -0
- package/test/eyelang/conformance/expected/008_graphic_atoms.pl +3 -0
- package/test/eyelang/conformance/expected/009_comments_and_whitespace.pl +2 -0
- package/test/eyelang/conformance/expected/010_variable_scope_and_reuse.pl +2 -0
- package/test/eyelang/conformance/expected/011_predicate_arity.pl +2 -0
- package/test/eyelang/conformance/expected/012_nested_compound_unification.pl +2 -0
- package/test/eyelang/conformance/expected/013_multiple_clauses_order.pl +2 -0
- package/test/eyelang/conformance/expected/014_failure_filters_answers.pl +1 -0
- package/test/eyelang/conformance/expected/015_improper_list_unification.pl +3 -0
- package/test/eyelang/conformance/expected/016_zero_arity_compound.pl +1 -0
- package/test/eyelang/conformance/expected/017_three_step_recursion.pl +3 -0
- package/test/eyelang/conformance/expected/018_quoted_atom_readback.pl +3 -0
- package/test/eyelang/conformance/expected/019_parenthesized_three_conjuncts.pl +1 -0
- package/test/eyelang/conformance/expected/020_nested_list_terms.pl +2 -0
- package/test/eyelang/conformance/expected/021_repeated_variable_head.pl +2 -0
- package/test/eyelang/conformance/expected/022_rule_head_structure.pl +2 -0
- package/test/eyelang/conformance/expected/023_quoted_escapes_readback.pl +2 -0
- package/test/eyelang/conformance/expected/024_numeric_literal_readback.pl +3 -0
- package/test/eyelang/conformance/expected/025_body_parentheses_with_formula_data.pl +1 -0
- package/test/eyelang/conformance/expected/026_underscore_named_variable_reuse.pl +1 -0
- package/test/eyelang/conformance/expected/028_materialize_focus.pl +1 -0
- package/test/eyelang/conformance/expected/029_arithmetic_and_comparison.pl +9 -0
- package/test/eyelang/conformance/expected/030_strings_and_atoms.pl +2 -0
- package/test/eyelang/conformance/expected/031_lists_aggregation_ordering.pl +9 -0
- package/test/eyelang/conformance/expected/032_holds_parts.pl +3 -0
- package/test/eyelang/conformance/expected/033_negation_once_generators.pl +2 -0
- package/test/eyelang/conformance/expected/034_equality_and_inequality.pl +4 -0
- package/test/eyelang/conformance/expected/035_list_relations.pl +4 -0
- package/test/eyelang/conformance/expected/036_append_splits.pl +3 -0
- package/test/eyelang/conformance/expected/037_matching_and_comparison.pl +5 -0
- package/test/eyelang/conformance/expected/038_memoize_declaration.pl +2 -0
- package/test/eyelang/conformance/expected/039_numeric_functions.pl +7 -0
- package/test/eyelang/conformance/expected/040_between_enumeration.pl +3 -0
- package/test/eyelang/conformance/expected/041_smallest_divisor.pl +1 -0
- package/test/eyelang/conformance/expected/042_negation_filter.pl +2 -0
- package/test/eyelang/conformance/expected/043_once_user_predicate.pl +1 -0
- package/test/eyelang/conformance/expected/044_findall_user_goal.pl +1 -0
- package/test/eyelang/conformance/expected/045_sort_deduplicates_atoms.pl +1 -0
- package/test/eyelang/conformance/expected/046_append_bound_prefix_suffix.pl +2 -0
- package/test/eyelang/conformance/expected/047_nth0_index_generation.pl +1 -0
- package/test/eyelang/conformance/expected/048_set_nth0_edges.pl +2 -0
- package/test/eyelang/conformance/expected/049_select_duplicate_occurrences.pl +2 -0
- package/test/eyelang/conformance/expected/050_not_member_filter.pl +1 -0
- package/test/eyelang/conformance/expected/051_nested_holds_parts.pl +3 -0
- package/test/eyelang/conformance/expected/052_holds_member.pl +2 -0
- package/test/eyelang/conformance/expected/053_materialize_excludes_source_fact.pl +1 -0
- package/test/eyelang/conformance/expected/054_numeric_and_lexical_comparison.pl +3 -0
- package/test/eyelang/conformance/expected/055_string_matching_filters.pl +2 -0
- package/test/eyelang/conformance/expected/056_string_and_atom_concat.pl +1 -0
- package/test/eyelang/conformance/expected/057_countall_empty_and_nonempty.pl +1 -0
- package/test/eyelang/conformance/expected/058_sumall_numeric_template.pl +1 -0
- package/test/eyelang/conformance/expected/059_aggregate_min_template.pl +1 -0
- package/test/eyelang/conformance/expected/060_aggregate_max_compound_key.pl +1 -0
- package/test/eyelang/conformance/expected/061_date_difference.pl +2 -0
- package/test/eyelang/conformance/expected/062_reusable_numeric_builtins.pl +8 -0
- package/test/eyelang/conformance/expected/063_reusable_list_builtins.pl +9 -0
- package/test/eyelang/conformance/expected/064_reusable_string_builtins.pl +10 -0
- package/test/eyelang/conformance/expected/065_reusable_term_control_builtins.pl +6 -0
- package/test/eyelang/conformance/expected/066_numeric_edges.pl +12 -0
- package/test/eyelang/conformance/expected/067_list_edges.pl +8 -0
- package/test/eyelang/conformance/expected/068_list_generation_order.pl +10 -0
- package/test/eyelang/conformance/expected/069_list_summaries_and_sets.pl +7 -0
- package/test/eyelang/conformance/expected/070_matches_named_captures.pl +1 -0
- package/test/eyelang/conformance/expected/071_string_edges.pl +8 -0
- package/test/eyelang/conformance/expected/072_string_conversions.pl +8 -0
- package/test/eyelang/conformance/expected/073_term_introspection_edges.pl +8 -0
- package/test/eyelang/conformance/expected/074_forall_edges.pl +5 -0
- package/test/eyelang/conformance/expected/075_aggregation_edges.pl +7 -0
- package/test/eyelang/conformance/expected/076_composed_reusable_builtins.pl +5 -0
- package/test/eyelang/conformance/expected/077_recursive_path_with_lists.pl +3 -0
- package/test/eyelang/conformance/expected/078_mutual_recursion_with_arithmetic.pl +7 -0
- package/test/eyelang/conformance/expected/079_big_integer_arithmetic.pl +6 -0
- package/test/eyelang/conformance/expected/080_rounding_modes.pl +8 -0
- package/test/eyelang/conformance/expected/081_zero_safe_numeric_functions.pl +7 -0
- package/test/eyelang/conformance/expected/082_comparison_semantics.pl +8 -0
- package/test/eyelang/conformance/expected/083_between_modes_and_empty_ranges.pl +8 -0
- package/test/eyelang/conformance/expected/084_append_and_select_composition.pl +10 -0
- package/test/eyelang/conformance/expected/085_nth_and_update_edges.pl +8 -0
- package/test/eyelang/conformance/expected/086_slicing_pipeline.pl +7 -0
- package/test/eyelang/conformance/expected/087_sort_reverse_length.pl +6 -0
- package/test/eyelang/conformance/expected/088_list_summaries_failures.pl +6 -0
- package/test/eyelang/conformance/expected/089_string_split_join_pipeline.pl +4 -0
- package/test/eyelang/conformance/expected/090_string_substring_replace_edges.pl +7 -0
- package/test/eyelang/conformance/expected/091_string_case_and_trim.pl +5 -0
- package/test/eyelang/conformance/expected/092_scalar_string_conversions.pl +7 -0
- package/test/eyelang/conformance/expected/093_regex_named_captures_context.pl +5 -0
- package/test/eyelang/conformance/expected/094_context_holds_enumeration.pl +8 -0
- package/test/eyelang/conformance/expected/095_term_introspection_roundtrip.pl +6 -0
- package/test/eyelang/conformance/expected/096_functor_scalar_edges.pl +6 -0
- package/test/eyelang/conformance/expected/097_control_negation_once_forall.pl +5 -0
- package/test/eyelang/conformance/expected/098_aggregation_nested_templates.pl +5 -0
- package/test/eyelang/conformance/expected/099_materialize_multiple_arities.pl +4 -0
- package/test/eyelang/conformance/expected/100_reusable_builtin_workflow.pl +6 -0
- package/test/eyelang/run-conformance.mjs +20 -22
- 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 -712
- 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/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/{examples/eyelang/output/socket-family.pl → test/eyelang/conformance/expected/027_default_derived_output.pl} +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
% Context association adapted from Eyeling context-association.n3.
|
|
2
|
-
%
|
|
3
|
-
% This version keeps the original shape: each context is named with log_nameOf
|
|
4
|
-
% and its contents remain quoted formula data. Nothing inside the three formulae
|
|
5
|
-
% is asserted globally unless a rule explicitly projects it.
|
|
6
|
-
|
|
7
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
8
|
-
materialize(log_nameOf, 2).
|
|
9
|
-
materialize(dataGraph, 2).
|
|
10
|
-
materialize(signatureGraph, 2).
|
|
11
|
-
materialize(metadataGraph, 2).
|
|
12
|
-
|
|
13
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
14
|
-
log_nameOf(skolem_g0, foaf_name(bob, "Bob")).
|
|
15
|
-
|
|
16
|
-
log_nameOf(skolem_g1, (
|
|
17
|
-
sec_proof(skolem_g0, dataSignature),
|
|
18
|
-
type(signature1, sec_DataIntegrityProof),
|
|
19
|
-
sec_cryptosuite(signature1, "ecdsa-proof-2019"),
|
|
20
|
-
sec_created(signature1, "2021-11-13T18:19:39Z"),
|
|
21
|
-
sec_verificationMethod(signature1, "https://university.example/issuers/14#key-1"),
|
|
22
|
-
sec_proofPurpose(signature1, "assertionMethod"),
|
|
23
|
-
sec_proofValue(signature1, "z58DAdFfa9SkqZMVPxAQp...jQCrfFPP2oumHKtz"),
|
|
24
|
-
sec_issuer(signature1, university),
|
|
25
|
-
sec_validFrom(signature1, "2024-04-03T00:00:00.000Z"),
|
|
26
|
-
sec_validUntil(signature1, "2025-04-03T00:00:00.000Z")
|
|
27
|
-
)).
|
|
28
|
-
|
|
29
|
-
log_nameOf(g3, (
|
|
30
|
-
sec_proof(skolem_g1, signature2),
|
|
31
|
-
type(signature2, sec_DataIntegrityProof),
|
|
32
|
-
sec_cryptosuite(signature2, "ecdsa-proof-2019"),
|
|
33
|
-
sec_created(signature2, "2021-11-13T18:19:39Z"),
|
|
34
|
-
sec_verificationMethod(signature2, "https://university.example/issuers/14#key-1"),
|
|
35
|
-
sec_proofPurpose(signature2, "assertionMethod"),
|
|
36
|
-
sec_proofValue(signature2, "adad123efv434r5200...dqed2t44v43das")
|
|
37
|
-
)).
|
|
38
|
-
|
|
39
|
-
% A tiny projection shows how a program can inspect a quoted context without
|
|
40
|
-
% making the entire context globally true.
|
|
41
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
42
|
-
context_statement(ContextName, Subject, Predicate, Object) :-
|
|
43
|
-
log_nameOf(ContextName, Context),
|
|
44
|
-
holds(Context, Predicate, [Subject, Object]).
|
|
45
|
-
|
|
46
|
-
dataGraph(association, skolem_g0) :-
|
|
47
|
-
context_statement(skolem_g0, bob, foaf_name, "Bob").
|
|
48
|
-
|
|
49
|
-
signatureGraph(association, skolem_g1) :-
|
|
50
|
-
context_statement(skolem_g1, skolem_g0, sec_proof, dataSignature).
|
|
51
|
-
|
|
52
|
-
metadataGraph(association, g3) :-
|
|
53
|
-
context_statement(g3, skolem_g1, sec_proof, signature2).
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
% Context schema audit.
|
|
2
|
-
%
|
|
3
|
-
% This example needs holds/3 rather than holds/2 because the audit rule does
|
|
4
|
-
% not know the predicate names or arities in advance. It inspects a whole
|
|
5
|
-
% context as data, extracts each member as Name + Args, computes the arity, and
|
|
6
|
-
% checks that shape against an allowed schema.
|
|
7
|
-
|
|
8
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
9
|
-
materialize(context_shape, 3).
|
|
10
|
-
materialize(schema_violation, 3).
|
|
11
|
-
|
|
12
|
-
% Program structure: each message carries heterogeneous context data. The
|
|
13
|
-
% members deliberately use different arities: heartbeat/0, source/1,
|
|
14
|
-
% temperature/2, gps/3, and signature/4.
|
|
15
|
-
message_context(msg_ok, (
|
|
16
|
-
heartbeat,
|
|
17
|
-
source(sensor17),
|
|
18
|
-
temperature(sensor17, 38),
|
|
19
|
-
gps(sensor17, 51, 4),
|
|
20
|
-
signature(sensor17, sha256, "9f86d081", "2026-06-18T09:30:00Z")
|
|
21
|
-
)).
|
|
22
|
-
|
|
23
|
-
message_context(msg_bad, (
|
|
24
|
-
heartbeat,
|
|
25
|
-
source(sensor18),
|
|
26
|
-
temperature(sensor18, 99),
|
|
27
|
-
gps(sensor18, 51),
|
|
28
|
-
tampered(sensor18)
|
|
29
|
-
)).
|
|
30
|
-
|
|
31
|
-
allowed_shape(heartbeat, 0).
|
|
32
|
-
allowed_shape(source, 1).
|
|
33
|
-
allowed_shape(temperature, 2).
|
|
34
|
-
allowed_shape(gps, 3).
|
|
35
|
-
allowed_shape(signature, 4).
|
|
36
|
-
|
|
37
|
-
% Derivation rules: holds/3 exposes arbitrary context members as predicate name
|
|
38
|
-
% plus argument list, so one generic rule can audit mixed-arity data.
|
|
39
|
-
context_shape(Message, Name, Arity) :-
|
|
40
|
-
message_context(Message, Context),
|
|
41
|
-
holds(Context, Name, Args),
|
|
42
|
-
length(Args, Arity).
|
|
43
|
-
|
|
44
|
-
schema_violation(Message, Name, Arity) :-
|
|
45
|
-
context_shape(Message, Name, Arity),
|
|
46
|
-
not(allowed_shape(Name, Arity)).
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
% Control Systems example, adapted from Eyelet's input/control-system.pl.
|
|
2
|
-
%
|
|
3
|
-
% The example combines measurements, observations, targets, logarithmic
|
|
4
|
-
% feedforward compensation, square-root normalization, and nonlinear feedback.
|
|
5
|
-
|
|
6
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
7
|
-
materialize(controlSignal, 2).
|
|
8
|
-
materialize(status, 2).
|
|
9
|
-
materialize(normalizedMeasurement, 2).
|
|
10
|
-
materialize(log10, 2).
|
|
11
|
-
|
|
12
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
13
|
-
measurement(input1, [6, 11]).
|
|
14
|
-
measurement(disturbance2, [45, 39]).
|
|
15
|
-
measurement(input2, true).
|
|
16
|
-
measurement(input3, 56967).
|
|
17
|
-
measurement(disturbance1, 35766).
|
|
18
|
-
measurement(output2, 24).
|
|
19
|
-
|
|
20
|
-
observation(state1, 80).
|
|
21
|
-
observation(state2, false).
|
|
22
|
-
observation(state3, 22).
|
|
23
|
-
|
|
24
|
-
target(output2, 29).
|
|
25
|
-
|
|
26
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
27
|
-
measurement_normalized(I, M) :-
|
|
28
|
-
measurement(I, [M1, M2]),
|
|
29
|
-
lt(M1, M2),
|
|
30
|
-
sub(M2, M1, Delta),
|
|
31
|
-
pow(Delta, 0.5, M).
|
|
32
|
-
|
|
33
|
-
measurement_normalized(I, M1) :-
|
|
34
|
-
measurement(I, [M1, M2]),
|
|
35
|
-
ge(M1, M2).
|
|
36
|
-
|
|
37
|
-
log10(Value, Result) :-
|
|
38
|
-
log(Value, NaturalLog),
|
|
39
|
-
log(10, NaturalLog10),
|
|
40
|
-
div(NaturalLog, NaturalLog10, Result).
|
|
41
|
-
|
|
42
|
-
control(actuator1, C) :-
|
|
43
|
-
measurement_normalized(input1, M1),
|
|
44
|
-
measurement(input2, true),
|
|
45
|
-
measurement(disturbance1, D1),
|
|
46
|
-
mul(M1, 19.6, Proportional),
|
|
47
|
-
log10(D1, Compensation),
|
|
48
|
-
sub(Proportional, Compensation, C).
|
|
49
|
-
|
|
50
|
-
control(actuator2, C) :-
|
|
51
|
-
observation(state3, P3),
|
|
52
|
-
measurement(output2, M4),
|
|
53
|
-
target(output2, T2),
|
|
54
|
-
sub(T2, M4, Error),
|
|
55
|
-
sub(P3, M4, DifferentialError),
|
|
56
|
-
mul(5.8, Error, Proportional),
|
|
57
|
-
div(7.3, Error, NonlinearFactor),
|
|
58
|
-
mul(NonlinearFactor, DifferentialError, Differential),
|
|
59
|
-
add(Proportional, Differential, C).
|
|
60
|
-
|
|
61
|
-
controlSignal(Actuator, C) :-
|
|
62
|
-
control(Actuator, C).
|
|
63
|
-
|
|
64
|
-
status(Actuator, active) :-
|
|
65
|
-
control(Actuator, _C).
|
|
66
|
-
|
|
67
|
-
normalizedMeasurement(input1, M) :-
|
|
68
|
-
measurement_normalized(input1, M).
|
|
69
|
-
|
|
70
|
-
log10(disturbance1, C) :-
|
|
71
|
-
measurement(disturbance1, D),
|
|
72
|
-
log10(D, C).
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
% Cyclic transitive closure. The graph contains a directed cycle, but eyelang's
|
|
2
|
-
% variant loop guard prevents recursive proof search from revisiting the same
|
|
3
|
-
% active subgoal forever.
|
|
4
|
-
|
|
5
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
6
|
-
materialize(path, 2).
|
|
7
|
-
|
|
8
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
9
|
-
arc(a, b).
|
|
10
|
-
arc(b, c).
|
|
11
|
-
arc(c, d).
|
|
12
|
-
arc(d, a).
|
|
13
|
-
|
|
14
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
15
|
-
path(X, Y) :- arc(X, Y).
|
|
16
|
-
path(X, Z) :- arc(X, Y), path(Y, Z).
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
% Eyelet-inspired D3 group example using findall/3 and sort/2.
|
|
2
|
-
% It enumerates subgroups of the dihedral group of order 6.
|
|
3
|
-
|
|
4
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
5
|
-
materialize(subgroups, 2).
|
|
6
|
-
materialize(subgroupCount, 2).
|
|
7
|
-
materialize(reason, 2).
|
|
8
|
-
|
|
9
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
10
|
-
% Six symmetries of an equilateral triangle: identity, rotations, reflections.
|
|
11
|
-
symmetry(identity).
|
|
12
|
-
symmetry(rotation_120).
|
|
13
|
-
symmetry(rotation_240).
|
|
14
|
-
symmetry(reflection_a).
|
|
15
|
-
symmetry(reflection_b).
|
|
16
|
-
symmetry(reflection_c).
|
|
17
|
-
|
|
18
|
-
% Cayley table for D3 composition.
|
|
19
|
-
compose(identity, identity, identity).
|
|
20
|
-
compose(identity, rotation_120, rotation_120).
|
|
21
|
-
compose(identity, rotation_240, rotation_240).
|
|
22
|
-
compose(identity, reflection_a, reflection_a).
|
|
23
|
-
compose(identity, reflection_b, reflection_b).
|
|
24
|
-
compose(identity, reflection_c, reflection_c).
|
|
25
|
-
compose(rotation_120, identity, rotation_120).
|
|
26
|
-
compose(rotation_120, rotation_120, rotation_240).
|
|
27
|
-
compose(rotation_120, rotation_240, identity).
|
|
28
|
-
compose(rotation_120, reflection_a, reflection_b).
|
|
29
|
-
compose(rotation_120, reflection_b, reflection_c).
|
|
30
|
-
compose(rotation_120, reflection_c, reflection_a).
|
|
31
|
-
compose(rotation_240, identity, rotation_240).
|
|
32
|
-
compose(rotation_240, rotation_120, identity).
|
|
33
|
-
compose(rotation_240, rotation_240, rotation_120).
|
|
34
|
-
compose(rotation_240, reflection_a, reflection_c).
|
|
35
|
-
compose(rotation_240, reflection_b, reflection_a).
|
|
36
|
-
compose(rotation_240, reflection_c, reflection_b).
|
|
37
|
-
compose(reflection_a, identity, reflection_a).
|
|
38
|
-
compose(reflection_a, rotation_120, reflection_c).
|
|
39
|
-
compose(reflection_a, rotation_240, reflection_b).
|
|
40
|
-
compose(reflection_a, reflection_a, identity).
|
|
41
|
-
compose(reflection_a, reflection_b, rotation_240).
|
|
42
|
-
compose(reflection_a, reflection_c, rotation_120).
|
|
43
|
-
compose(reflection_b, identity, reflection_b).
|
|
44
|
-
compose(reflection_b, rotation_120, reflection_a).
|
|
45
|
-
compose(reflection_b, rotation_240, reflection_c).
|
|
46
|
-
compose(reflection_b, reflection_a, rotation_120).
|
|
47
|
-
compose(reflection_b, reflection_b, identity).
|
|
48
|
-
compose(reflection_b, reflection_c, rotation_240).
|
|
49
|
-
compose(reflection_c, identity, reflection_c).
|
|
50
|
-
compose(reflection_c, rotation_120, reflection_b).
|
|
51
|
-
compose(reflection_c, rotation_240, reflection_a).
|
|
52
|
-
compose(reflection_c, reflection_a, rotation_240).
|
|
53
|
-
compose(reflection_c, reflection_b, rotation_120).
|
|
54
|
-
compose(reflection_c, reflection_c, identity).
|
|
55
|
-
% Each candidate subgroup must also contain inverses.
|
|
56
|
-
inverse(identity, identity).
|
|
57
|
-
inverse(rotation_120, rotation_240).
|
|
58
|
-
inverse(rotation_240, rotation_120).
|
|
59
|
-
inverse(reflection_a, reflection_a).
|
|
60
|
-
inverse(reflection_b, reflection_b).
|
|
61
|
-
inverse(reflection_c, reflection_c).
|
|
62
|
-
|
|
63
|
-
% Candidate subsets are generated as subsequences of the sorted symmetry list.
|
|
64
|
-
subsequence([], []).
|
|
65
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
66
|
-
subsequence([Head | Tail], [Head | Rest]) :-
|
|
67
|
-
subsequence(Tail, Rest).
|
|
68
|
-
subsequence([_Head | Tail], Rest) :-
|
|
69
|
-
subsequence(Tail, Rest).
|
|
70
|
-
|
|
71
|
-
all_symmetries(Symmetries) :-
|
|
72
|
-
findall(X, symmetry(X), Raw),
|
|
73
|
-
sort(Raw, Symmetries).
|
|
74
|
-
|
|
75
|
-
% A valid subgroup is closed under both composition and inverse.
|
|
76
|
-
closed_under_composition(Group) :-
|
|
77
|
-
not((member(X, Group), member(Y, Group), compose(X, Y, Z), not(member(Z, Group)))).
|
|
78
|
-
|
|
79
|
-
closed_under_inverse(Group) :-
|
|
80
|
-
not((member(X, Group), inverse(X, Y), not(member(Y, Group)))).
|
|
81
|
-
|
|
82
|
-
valid_group(Group) :-
|
|
83
|
-
all_symmetries(All),
|
|
84
|
-
subsequence(All, Group),
|
|
85
|
-
member(identity, Group),
|
|
86
|
-
closed_under_composition(Group),
|
|
87
|
-
closed_under_inverse(Group).
|
|
88
|
-
|
|
89
|
-
all_subgroups(Groups) :-
|
|
90
|
-
findall(G, valid_group(G), Raw),
|
|
91
|
-
sort(Raw, Groups).
|
|
92
|
-
|
|
93
|
-
subgroups(d3_group, Groups) :-
|
|
94
|
-
all_subgroups(Groups).
|
|
95
|
-
|
|
96
|
-
subgroupCount(d3_group, Count) :-
|
|
97
|
-
all_subgroups(Groups),
|
|
98
|
-
length(Groups, Count).
|
|
99
|
-
|
|
100
|
-
reason(d3_group, "findall enumerates candidate subgroups and sort gives canonical subgroup order").
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
% EYE-inspired dairy energy balance case study.
|
|
2
|
-
% Cows are classified from maintenance, milk requirement, and ration supply.
|
|
3
|
-
|
|
4
|
-
% cow(Cow, BodyWeightKg, MilkKgPerDay, RationEnergyMcalPerKgDM, IntakeKgDM).
|
|
5
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
6
|
-
materialize(energyBalance_Mcal, 2).
|
|
7
|
-
materialize(rationSupportedMilk_kg, 2).
|
|
8
|
-
materialize(status, 2).
|
|
9
|
-
materialize(reason, 2).
|
|
10
|
-
materialize(strongestDeficit, 2).
|
|
11
|
-
|
|
12
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
13
|
-
cow(early_lactation, 650, 38, 6.4, 22).
|
|
14
|
-
cow(mid_lactation, 610, 24, 6.5, 26).
|
|
15
|
-
cow(late_lactation, 580, 16, 6.7, 25).
|
|
16
|
-
cow(grazing, 540, 18, 5.8, 21).
|
|
17
|
-
|
|
18
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
19
|
-
maintenance(C, M) :-
|
|
20
|
-
cow(C, Weight, _, _, _),
|
|
21
|
-
mul(Weight, 0.08, M).
|
|
22
|
-
|
|
23
|
-
milk_requirement(C, R) :-
|
|
24
|
-
cow(C, _, Milk, _, _),
|
|
25
|
-
mul(Milk, 5.0, R).
|
|
26
|
-
|
|
27
|
-
ration_supply(C, S) :-
|
|
28
|
-
cow(C, _, _, Density, Intake),
|
|
29
|
-
mul(Density, Intake, S).
|
|
30
|
-
|
|
31
|
-
total_requirement(C, R) :-
|
|
32
|
-
maintenance(C, M),
|
|
33
|
-
milk_requirement(C, MilkR),
|
|
34
|
-
add(M, MilkR, R).
|
|
35
|
-
|
|
36
|
-
energy_balance(C, B) :-
|
|
37
|
-
ration_supply(C, S),
|
|
38
|
-
total_requirement(C, R),
|
|
39
|
-
sub(S, R, B).
|
|
40
|
-
|
|
41
|
-
ration_supported_milk(C, Milk) :-
|
|
42
|
-
ration_supply(C, S),
|
|
43
|
-
maintenance(C, M),
|
|
44
|
-
sub(S, M, AvailableForMilk),
|
|
45
|
-
div(AvailableForMilk, 5.0, Milk).
|
|
46
|
-
|
|
47
|
-
status(C, negative_energy_balance) :-
|
|
48
|
-
energy_balance(C, B),
|
|
49
|
-
lt(B, -5.0).
|
|
50
|
-
|
|
51
|
-
status(C, near_neutral_energy_balance) :-
|
|
52
|
-
energy_balance(C, B),
|
|
53
|
-
ge(B, -5.0),
|
|
54
|
-
le(B, 5.0).
|
|
55
|
-
|
|
56
|
-
status(C, positive_energy_balance) :-
|
|
57
|
-
energy_balance(C, B),
|
|
58
|
-
gt(B, 5.0).
|
|
59
|
-
|
|
60
|
-
energyBalance_Mcal(C, B) :- energy_balance(C, B).
|
|
61
|
-
rationSupportedMilk_kg(C, M) :- ration_supported_milk(C, M).
|
|
62
|
-
reason(dairy_energy_balance, "ration supply minus maintenance and milk energy requirement determines the class").
|
|
63
|
-
strongestDeficit(dairy_energy_balance, early_lactation) :-
|
|
64
|
-
status(early_lactation, negative_energy_balance),
|
|
65
|
-
status(late_lactation, positive_energy_balance).
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
% Data negotiation with policies, adapted from Eyelet input/data-negotiation.pl.
|
|
2
|
-
% The accepted negotiation matches Eyelet output-swipl/data-negotiation.pl.
|
|
3
|
-
|
|
4
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
5
|
-
materialize(negotiate, 2).
|
|
6
|
-
|
|
7
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
8
|
-
% Each agent has local data, desired remote data, and a simple policy.
|
|
9
|
-
hasData(agent1, [data1, data2, data3]).
|
|
10
|
-
hasData(agent2, [data4, data5, data6]).
|
|
11
|
-
|
|
12
|
-
want_negotiate(agent1, [agent2, data4]).
|
|
13
|
-
want_negotiate(agent1, [agent2, data5]).
|
|
14
|
-
want_negotiate(agent1, [agent2, data7]).
|
|
15
|
-
|
|
16
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
17
|
-
policy(agent1, [request, Data]) :-
|
|
18
|
-
member(Data, [data4, data6]).
|
|
19
|
-
policy(agent2, [accept, Data]) :-
|
|
20
|
-
neq(Data, data5).
|
|
21
|
-
|
|
22
|
-
% A request is possible only if A lacks the data and A's policy allows asking for it.
|
|
23
|
-
request_data(AgentA, AgentB, Data) :-
|
|
24
|
-
hasData(AgentA, DataListA),
|
|
25
|
-
hasData(AgentB, DataListB),
|
|
26
|
-
member(Data, DataListB),
|
|
27
|
-
not_member(Data, DataListA),
|
|
28
|
-
policy(AgentA, [request, Data]).
|
|
29
|
-
|
|
30
|
-
% B accepts only requests for data it has and its own policy permits sharing.
|
|
31
|
-
accept_request(AgentB, _AgentA, Data) :-
|
|
32
|
-
hasData(AgentB, DataListB),
|
|
33
|
-
member(Data, DataListB),
|
|
34
|
-
policy(AgentB, [accept, Data]).
|
|
35
|
-
|
|
36
|
-
negotiate(AgentA, [AgentB, Data]) :-
|
|
37
|
-
want_negotiate(AgentA, [AgentB, Data]),
|
|
38
|
-
request_data(AgentA, AgentB, Data),
|
|
39
|
-
accept_request(AgentB, AgentA, Data).
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
% =============================================================================================================================
|
|
2
|
-
% Deep Taxonomy - depth 10 - expanded N3-style eyelang with checkpoint proof accelerators
|
|
3
|
-
%
|
|
4
|
-
% Adjacent rules mirror the Eyeling N3 deep-taxonomy chain. The checkpoint
|
|
5
|
-
% rules are redundant consequences of that chain and are placed first so eyelang
|
|
6
|
-
% can prove terminal/report goals without overflowing the JavaScript call stack.
|
|
7
|
-
% Report/check rules use once/1 so successful checks do not backtrack into a
|
|
8
|
-
% long adjacent-only proof after a shorter checkpoint proof has succeeded.
|
|
9
|
-
% =============================================================================================================================
|
|
10
|
-
|
|
11
|
-
% Output declarations: materialize/2 selects the relations written to this example's golden output.
|
|
12
|
-
materialize(is, 2).
|
|
13
|
-
materialize(answer, 2).
|
|
14
|
-
materialize(reason, 2).
|
|
15
|
-
materialize(result, 2).
|
|
16
|
-
materialize(checkPassed, 2).
|
|
17
|
-
materialize(arc, 2).
|
|
18
|
-
|
|
19
|
-
% Program structure: facts set up the scenario, and rules derive the materialized conclusions.
|
|
20
|
-
% fact
|
|
21
|
-
|
|
22
|
-
a(ind, n0).
|
|
23
|
-
|
|
24
|
-
% terminal rule
|
|
25
|
-
|
|
26
|
-
% Derivation rules: each rule below contributes one logical step toward the displayed results.
|
|
27
|
-
is(test, true) :- once(a(ind, a2)).
|
|
28
|
-
a(X, a2) :- a(X, n10).
|
|
29
|
-
|
|
30
|
-
% Redundant checkpoint accelerators.
|
|
31
|
-
|
|
32
|
-
a(X, n10) :- a(X, n0).
|
|
33
|
-
a(X, n4) :- a(X, n0).
|
|
34
|
-
a(X, n9) :- a(X, n0).
|
|
35
|
-
|
|
36
|
-
% Adjacent N3-style taxonomy rules.
|
|
37
|
-
|
|
38
|
-
a(X, n1) :- a(X, n0).
|
|
39
|
-
a(X, i1) :- a(X, n0).
|
|
40
|
-
a(X, j1) :- a(X, n0).
|
|
41
|
-
a(X, n2) :- a(X, n1).
|
|
42
|
-
a(X, i2) :- a(X, n1).
|
|
43
|
-
a(X, j2) :- a(X, n1).
|
|
44
|
-
a(X, n3) :- a(X, n2).
|
|
45
|
-
a(X, i3) :- a(X, n2).
|
|
46
|
-
a(X, j3) :- a(X, n2).
|
|
47
|
-
a(X, n4) :- a(X, n3).
|
|
48
|
-
a(X, i4) :- a(X, n3).
|
|
49
|
-
a(X, j4) :- a(X, n3).
|
|
50
|
-
a(X, n5) :- a(X, n4).
|
|
51
|
-
a(X, i5) :- a(X, n4).
|
|
52
|
-
a(X, j5) :- a(X, n4).
|
|
53
|
-
a(X, n6) :- a(X, n5).
|
|
54
|
-
a(X, i6) :- a(X, n5).
|
|
55
|
-
a(X, j6) :- a(X, n5).
|
|
56
|
-
a(X, n7) :- a(X, n6).
|
|
57
|
-
a(X, i7) :- a(X, n6).
|
|
58
|
-
a(X, j7) :- a(X, n6).
|
|
59
|
-
a(X, n8) :- a(X, n7).
|
|
60
|
-
a(X, i8) :- a(X, n7).
|
|
61
|
-
a(X, j8) :- a(X, n7).
|
|
62
|
-
a(X, n9) :- a(X, n8).
|
|
63
|
-
a(X, i9) :- a(X, n8).
|
|
64
|
-
a(X, j9) :- a(X, n8).
|
|
65
|
-
a(X, n10) :- a(X, n9).
|
|
66
|
-
a(X, i10) :- a(X, n9).
|
|
67
|
-
a(X, j10) :- a(X, n9).
|
|
68
|
-
|
|
69
|
-
% ARC checks
|
|
70
|
-
|
|
71
|
-
arc(check1, "C1 OK - the starting classification n0 is present.") :-
|
|
72
|
-
once(a(ind, n0)).
|
|
73
|
-
|
|
74
|
-
arc(check2, "C2 OK - the first expansion produced n1 together with side labels i1 and j1.") :-
|
|
75
|
-
once(a(ind, n1)),
|
|
76
|
-
once(a(ind, i1)),
|
|
77
|
-
once(a(ind, j1)).
|
|
78
|
-
|
|
79
|
-
arc(check3, "C3 OK - the chain reaches the midpoint n5 and still carries both side-label branches.") :-
|
|
80
|
-
once(a(ind, n5)),
|
|
81
|
-
once(a(ind, i5)),
|
|
82
|
-
once(a(ind, j5)).
|
|
83
|
-
|
|
84
|
-
arc(check4, "C4 OK - the final taxonomy step from n9 to n10 was completed.") :-
|
|
85
|
-
once(a(ind, n9)),
|
|
86
|
-
once(a(ind, n10)).
|
|
87
|
-
|
|
88
|
-
arc(check5, "C5 OK - once n10 is reached, the terminal class a2 is derived.") :-
|
|
89
|
-
once(a(ind, n10)),
|
|
90
|
-
once(a(ind, a2)).
|
|
91
|
-
|
|
92
|
-
arc(check6, "C6 OK - the success flag is raised only after the terminal class a2 is present.") :-
|
|
93
|
-
once(a(ind, a2)),
|
|
94
|
-
once(is(test, true)).
|
|
95
|
-
|
|
96
|
-
% ARC report
|
|
97
|
-
|
|
98
|
-
answer(report, "The test succeeds: starting from one individual classified as n0, the rules eventually classify it as n10 and then as a2.") :-
|
|
99
|
-
once(is(test, true)).
|
|
100
|
-
|
|
101
|
-
reason(report, "The adjacent rules mirror the Eyeling N3 deep-taxonomy-10 chain. Redundant checkpoint rules are included only as proof accelerators: each shortcut is entailed by the adjacent chain, and once/1 prevents backtracking into the long adjacent-only proof after a check has succeeded.") :-
|
|
102
|
-
once(a(ind, a2)),
|
|
103
|
-
once(is(test, true)).
|
|
104
|
-
|
|
105
|
-
checkPassed(report, Check) :-
|
|
106
|
-
arc(Check, _Message).
|
|
107
|
-
|
|
108
|
-
result(report, success) :-
|
|
109
|
-
once(is(test, true)),
|
|
110
|
-
once(arc(check1, _C1)),
|
|
111
|
-
once(arc(check2, _C2)),
|
|
112
|
-
once(arc(check3, _C3)),
|
|
113
|
-
once(arc(check4, _C4)),
|
|
114
|
-
once(arc(check5, _C5)),
|
|
115
|
-
once(arc(check6, _C6)).
|