eyeling 1.24.0 → 1.24.1
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 +4 -4
- package/package.json +1 -1
- package/see/README.md +10 -11
- package/see/examples/age.js +10 -10
- package/see/examples/annotation.js +10 -10
- package/see/examples/backward.js +10 -10
- package/see/examples/backward_recursion.js +10 -10
- package/see/examples/bayes_diagnosis.js +10 -10
- package/see/examples/bayes_therapy.js +10 -10
- package/see/examples/bmi.js +10 -10
- package/see/examples/builtin_coverage.js +10 -10
- package/see/examples/collection.js +10 -10
- package/see/examples/complex.js +10 -10
- package/see/examples/complex_matrix_stability.js +10 -10
- package/see/examples/composition_of_injective_functions_is_injective.js +10 -10
- package/see/examples/control_system.js +10 -10
- package/see/examples/crypto_builtins_tests.js +10 -10
- package/see/examples/delfour.js +10 -10
- package/see/examples/digital_product_passport.js +10 -10
- package/see/examples/dijkstra.js +10 -10
- package/see/examples/dijkstra_risk_path.js +10 -10
- package/see/examples/doc/age.md +1 -1
- package/see/examples/doc/annotation.md +1 -1
- package/see/examples/doc/backward.md +1 -1
- package/see/examples/doc/backward_recursion.md +1 -1
- package/see/examples/doc/bayes_diagnosis.md +1 -1
- package/see/examples/doc/bayes_therapy.md +1 -1
- package/see/examples/doc/bmi.md +1 -1
- package/see/examples/doc/builtin_coverage.md +1 -1
- package/see/examples/doc/collection.md +1 -1
- package/see/examples/doc/complex.md +1 -1
- package/see/examples/doc/complex_matrix_stability.md +1 -1
- package/see/examples/doc/composition_of_injective_functions_is_injective.md +1 -1
- package/see/examples/doc/control_system.md +1 -1
- package/see/examples/doc/crypto_builtins_tests.md +1 -1
- package/see/examples/doc/delfour.md +1 -1
- package/see/examples/doc/digital_product_passport.md +1 -1
- package/see/examples/doc/dijkstra.md +1 -1
- package/see/examples/doc/dijkstra_risk_path.md +1 -1
- package/see/examples/doc/dog.md +1 -1
- package/see/examples/doc/eco_route_insight.md +1 -1
- package/see/examples/doc/equals.md +1 -1
- package/see/examples/doc/equivalence_classes_overlap_implies_same_class.md +1 -1
- package/see/examples/doc/euler_identity.md +1 -1
- package/see/examples/doc/ev_roundtrip_planner.md +1 -1
- package/see/examples/doc/existential_rule.md +1 -1
- package/see/examples/doc/expression_eval.md +1 -1
- package/see/examples/doc/family_cousins.md +1 -1
- package/see/examples/doc/fastpow.md +1 -1
- package/see/examples/doc/fibonacci.md +1 -1
- package/see/examples/doc/french_cities.md +1 -1
- package/see/examples/doc/fundamental_theorem_arithmetic.md +1 -1
- package/see/examples/doc/genetic_knapsack_selection.md +1 -1
- package/see/examples/doc/goldbach_1000.md +1 -1
- package/see/examples/doc/good_cobbler.md +1 -1
- package/see/examples/doc/gps.md +1 -1
- package/see/examples/doc/gray_code_counter.md +1 -1
- package/see/examples/doc/greatest_lower_bound_uniqueness.md +1 -1
- package/see/examples/doc/group_inverse_uniqueness.md +1 -1
- package/see/examples/doc/hadamard_approx.md +1 -1
- package/see/examples/doc/hanoi.md +1 -1
- package/see/examples/doc/odrl_dpv_risk_ranked.md +1 -1
- package/see/examples/doc/path_discovery.md +1 -1
- package/see/examples/doc/rc_discharge_envelope.md +1 -1
- package/see/examples/doc/rdf_message_flow.md +1 -1
- package/see/examples/doc/rdf_messages.md +1 -1
- package/see/examples/doc/school_placement_audit.md +1 -1
- package/see/examples/doc/smoke_arithmetic.md +1 -1
- package/see/examples/doc/socrates.md +1 -1
- package/see/examples/doc/wind_turbine.md +1 -1
- package/see/examples/doc/witch.md +1 -1
- package/see/examples/dog.js +10 -10
- package/see/examples/eco_route_insight.js +10 -10
- package/see/examples/equals.js +10 -10
- package/see/examples/equivalence_classes_overlap_implies_same_class.js +10 -10
- package/see/examples/euler_identity.js +10 -10
- package/see/examples/ev_roundtrip_planner.js +10 -10
- package/see/examples/existential_rule.js +10 -10
- package/see/examples/expression_eval.js +10 -10
- package/see/examples/family_cousins.js +10 -10
- package/see/examples/fastpow.js +10 -10
- package/see/examples/fibonacci.js +10 -10
- package/see/examples/french_cities.js +10 -10
- package/see/examples/fundamental_theorem_arithmetic.js +10 -10
- package/see/examples/genetic_knapsack_selection.js +10 -10
- package/see/examples/goldbach_1000.js +10 -10
- package/see/examples/good_cobbler.js +10 -10
- package/see/examples/gps.js +10 -10
- package/see/examples/gray_code_counter.js +10 -10
- package/see/examples/greatest_lower_bound_uniqueness.js +10 -10
- package/see/examples/group_inverse_uniqueness.js +10 -10
- package/see/examples/hadamard_approx.js +10 -10
- package/see/examples/hanoi.js +10 -10
- package/see/examples/odrl_dpv_risk_ranked.js +10 -10
- package/see/examples/output/age.md +3 -3
- package/see/examples/output/annotation.md +4 -4
- package/see/examples/output/backward.md +3 -3
- package/see/examples/output/backward_recursion.md +3 -3
- package/see/examples/output/bayes_diagnosis.md +1 -1
- package/see/examples/output/bayes_therapy.md +1 -1
- package/see/examples/output/bmi.md +1 -1
- package/see/examples/output/builtin_coverage.md +3 -3
- package/see/examples/output/collection.md +3 -3
- package/see/examples/output/complex.md +4 -4
- package/see/examples/output/complex_matrix_stability.md +1 -1
- package/see/examples/output/composition_of_injective_functions_is_injective.md +3 -3
- package/see/examples/output/control_system.md +3 -3
- package/see/examples/output/crypto_builtins_tests.md +3 -3
- package/see/examples/output/delfour.md +1 -1
- package/see/examples/output/digital_product_passport.md +1 -1
- package/see/examples/output/dijkstra.md +3 -3
- package/see/examples/output/dijkstra_risk_path.md +1 -1
- package/see/examples/output/dog.md +3 -3
- package/see/examples/output/eco_route_insight.md +1 -1
- package/see/examples/output/equals.md +3 -3
- package/see/examples/output/equivalence_classes_overlap_implies_same_class.md +3 -3
- package/see/examples/output/euler_identity.md +3 -3
- package/see/examples/output/ev_roundtrip_planner.md +1 -1
- package/see/examples/output/existential_rule.md +3 -3
- package/see/examples/output/expression_eval.md +3 -3
- package/see/examples/output/family_cousins.md +3 -3
- package/see/examples/output/fastpow.md +1 -1
- package/see/examples/output/fibonacci.md +1 -1
- package/see/examples/output/french_cities.md +3 -3
- package/see/examples/output/fundamental_theorem_arithmetic.md +1 -1
- package/see/examples/output/genetic_knapsack_selection.md +1 -1
- package/see/examples/output/goldbach_1000.md +1 -1
- package/see/examples/output/good_cobbler.md +4 -4
- package/see/examples/output/gps.md +1 -1
- package/see/examples/output/gray_code_counter.md +1 -1
- package/see/examples/output/greatest_lower_bound_uniqueness.md +3 -3
- package/see/examples/output/group_inverse_uniqueness.md +3 -3
- package/see/examples/output/hadamard_approx.md +3 -3
- package/see/examples/output/hanoi.md +3 -3
- package/see/examples/output/odrl_dpv_risk_ranked.md +3 -3
- package/see/examples/output/path_discovery.md +3 -3
- package/see/examples/output/rc_discharge_envelope.md +1 -1
- package/see/examples/output/rdf_message_flow.md +1 -1
- package/see/examples/output/rdf_messages.md +1 -1
- package/see/examples/output/school_placement_audit.md +1 -1
- package/see/examples/output/smoke_arithmetic.md +1 -1
- package/see/examples/output/socrates.md +3 -3
- package/see/examples/output/wind_turbine.md +1 -1
- package/see/examples/output/witch.md +3 -3
- package/see/examples/path_discovery.js +10 -10
- package/see/examples/rc_discharge_envelope.js +10 -10
- package/see/examples/rdf_message_flow.js +10 -10
- package/see/examples/rdf_messages.js +10 -10
- package/see/examples/school_placement_audit.js +10 -10
- package/see/examples/smoke_arithmetic.js +10 -10
- package/see/examples/socrates.js +10 -10
- package/see/examples/wind_turbine.js +10 -10
- package/see/examples/witch.js +10 -10
- package/see/see.js +381 -93
|
@@ -1040,19 +1040,19 @@ function renderStructuredOutput({ title, graph, queries = [], rules = [], initia
|
|
|
1040
1040
|
const lines = [];
|
|
1041
1041
|
lines.push('# ' + title);
|
|
1042
1042
|
lines.push('');
|
|
1043
|
-
lines.push('##
|
|
1043
|
+
lines.push('## Entailment');
|
|
1044
1044
|
if (mode === 'query') {
|
|
1045
1045
|
lines.push('The compiled query selected ' + selected.length + ' fact(s) after the rule closure was computed.');
|
|
1046
1046
|
} else if (mode === 'formula') {
|
|
1047
|
-
lines.push('The derivation produced ' + selected.length + ' formula-valued
|
|
1047
|
+
lines.push('The derivation produced ' + selected.length + ' formula-valued entailment(s).');
|
|
1048
1048
|
} else {
|
|
1049
1049
|
lines.push('The derivation produced ' + derived.length + ' new fact(s) from ' + initialFacts.length + ' stated fact(s).');
|
|
1050
1050
|
}
|
|
1051
|
-
if (keyFact) lines.push('Main
|
|
1051
|
+
if (keyFact) lines.push('Main entailment: **' + factSentence(keyFact) + '**');
|
|
1052
1052
|
const bullets = selected.slice(-6).reverse();
|
|
1053
1053
|
if (bullets.length) {
|
|
1054
1054
|
lines.push('');
|
|
1055
|
-
lines.push('Selected
|
|
1055
|
+
lines.push('Selected entailments:');
|
|
1056
1056
|
for (const fact of bullets) lines.push('- ' + codeFact(fact));
|
|
1057
1057
|
}
|
|
1058
1058
|
lines.push('');
|
|
@@ -1114,15 +1114,15 @@ function dedupeExplanationHeadings(text) {
|
|
|
1114
1114
|
function normalizePublicReport(markdown, title) {
|
|
1115
1115
|
let text = String(markdown || '').trimEnd();
|
|
1116
1116
|
if (!/^\s*#\s+/m.test(text)) text = '# ' + title + '\n\n' + text;
|
|
1117
|
-
if (!/^##\s+
|
|
1118
|
-
text = text.replace(/^(#\s+[^\n]+\n*)/, '$1\n##
|
|
1117
|
+
if (!/^##\s+Entailment\s*$/mi.test(text)) {
|
|
1118
|
+
text = text.replace(/^(#\s+[^\n]+\n*)/, '$1\n## Entailment\n');
|
|
1119
1119
|
}
|
|
1120
1120
|
if (!/^##\s+Explanation\s*$/mi.test(text)) {
|
|
1121
1121
|
text += '\n\n## Explanation\nNo additional explanation was provided by the generated output.';
|
|
1122
1122
|
}
|
|
1123
1123
|
text = text.replace(/^##\s+([^\n]+?)\s*$/gm, (line, heading) => {
|
|
1124
1124
|
const normalized = heading.trim().toLowerCase();
|
|
1125
|
-
if (normalized === 'insight' || normalized === 'explanation') return '## ' + (normalized === '
|
|
1125
|
+
if (normalized === 'insight' || normalized === 'conclusion' || normalized === 'entailment' || normalized === 'explanation') return '## ' + (normalized === 'explanation' ? 'Explanation' : 'Entailment');
|
|
1126
1126
|
return '**' + heading.trim() + '**';
|
|
1127
1127
|
});
|
|
1128
1128
|
text = dedupeExplanationHeadings(text);
|
|
@@ -1131,13 +1131,13 @@ function normalizePublicReport(markdown, title) {
|
|
|
1131
1131
|
function markdownize(raw, title) {
|
|
1132
1132
|
let text = String(raw || '');
|
|
1133
1133
|
text = text
|
|
1134
|
-
.replace(/===\s*Answer\s*===/g, '##
|
|
1134
|
+
.replace(/===\s*Answer\s*===/g, '## Entailment')
|
|
1135
1135
|
.replace(/===\s*Reason\s+Why\s*===/gi, '## Explanation')
|
|
1136
1136
|
.replace(/===\s*Explanation\s*===/gi, '## Explanation')
|
|
1137
1137
|
.replace(/===\s*([^=]+?)\s*===/g, (_, h) => '**' + h.trim() + '**');
|
|
1138
1138
|
text = text.replace(/^C(\d+)\s+OK\s*-\s*/gm, 'C$1: ');
|
|
1139
1139
|
text = dedupeExplanationHeadings(text);
|
|
1140
|
-
if (!text.trim()) text = '##
|
|
1140
|
+
if (!text.trim()) text = '## Entailment\nNo log:outputString facts were derived.\n\n## Explanation\nThe compiled derivation did not produce authored report text.';
|
|
1141
1141
|
return normalizePublicReport(text, title);
|
|
1142
1142
|
}
|
|
1143
1143
|
function authoredSupportAppendix(graph, queries, rules, initialFacts, trace) {
|
|
@@ -5003,7 +5003,7 @@ const QUERIES = [
|
|
|
5003
5003
|
]
|
|
5004
5004
|
}
|
|
5005
5005
|
];
|
|
5006
|
-
const DOC_MARKDOWN = "# ODRL + DPV risk assessment with ranked, explainable output.\n\nGenerated by `see.js` from a Notation3 source file.\n\nWhat this file does\n- Models an agreement as an ODRL policy (odrl:Policy) containing permissions,\nprohibitions, duties, and constraints. ODRL is expressive enough to encode the\nnormative “may/must/must-not” structure of TOS clauses as RDF.\n- Links each ODRL rule to a clause resource (:Clause) to keep human-readable text\nwhile preserving machine-readable structure for reasoning.\n- Uses N3 rules with log:includes / log:notIncludes to detect missing safeguards\n(e.g., missing notice constraints, missing inform duties, missing consent constraints).\n- Generates DPV risks (dpv:Risk) and classifies them using DPV-RISK concepts:\nrisk:hasRiskSource, dpv:hasConsequence, dpv:hasImpact, dpv:hasSeverity, dpv:hasRiskLevel.\n- Produces mitigations as dpv:RiskMitigationMeasure resources and attaches them\nto risks with dpv:isMitigatedByMeasure.\n- Computes a numeric score for each risk and prints a ranked, explainable report.\nRanking / output\n- Output strings are emitted as log:outputString triples.\n- When running with Eyeling “strings” mode (-r), strings are printed in deterministic\norder based on their subject key. The program encodes ranking via an “inverse score”\nkey (e.g., 1000 - score) so higher-risk items appear first.\nReferences\n- N3 spec: https://w3c.github.io/N3/spec/\n- Eyeling builtins: https://eyereasoner.github.io/eyeling/HANDBOOK#ch11\n- ODRL vocab: https://www.w3.org/TR/odrl-vocab/\n- DPV risk module: https://dev.dpvcg.org/dpv/modules/risk\n- DPV-RISK: https://w3id.org/dpv/risk\n\n## Compilation summary\n\n- Example name: `odrl_dpv_risk_ranked`\n- Input facts emitted: 38\n- Forward rules compiled: 9\n- Backward predicate rules compiled: 0\n- Fuses compiled: 0\n- Predicate count: 32\n\n## Built-ins used\n\n- `log:includes`\n- `log:notIncludes`\n- `log:outputString`\n- `math:difference`\n- `math:greaterThan`\n- `math:lessThan`\n- `math:notLessThan`\n- `math:sum`\n- `string:format`\n\n## Runtime model\n\nThe generated `examples/odrl_dpv_risk_ranked.js` is a specialized JavaScript derivation program. For ordinary sources, `see.js` emits the source facts as `examples/input/odrl_dpv_risk_ranked.trig`. For rules-only sources, generation can reuse an existing external evidence file such as `examples/input/odrl-dpv-risk-ranked.trig` or `examples/input/odrl_dpv_risk_ranked.trig`. The runner reads that TriG evidence directly and performs a local fixpoint derivation; it does not parse the program source or call an external reasoner.\n\n## Output model\n\nRunning `node examples/odrl_dpv_risk_ranked.js` produces a SEE-style Markdown report with an **
|
|
5006
|
+
const DOC_MARKDOWN = "# ODRL + DPV risk assessment with ranked, explainable output.\n\nGenerated by `see.js` from a Notation3 source file.\n\nWhat this file does\n- Models an agreement as an ODRL policy (odrl:Policy) containing permissions,\nprohibitions, duties, and constraints. ODRL is expressive enough to encode the\nnormative “may/must/must-not” structure of TOS clauses as RDF.\n- Links each ODRL rule to a clause resource (:Clause) to keep human-readable text\nwhile preserving machine-readable structure for reasoning.\n- Uses N3 rules with log:includes / log:notIncludes to detect missing safeguards\n(e.g., missing notice constraints, missing inform duties, missing consent constraints).\n- Generates DPV risks (dpv:Risk) and classifies them using DPV-RISK concepts:\nrisk:hasRiskSource, dpv:hasConsequence, dpv:hasImpact, dpv:hasSeverity, dpv:hasRiskLevel.\n- Produces mitigations as dpv:RiskMitigationMeasure resources and attaches them\nto risks with dpv:isMitigatedByMeasure.\n- Computes a numeric score for each risk and prints a ranked, explainable report.\nRanking / output\n- Output strings are emitted as log:outputString triples.\n- When running with Eyeling “strings” mode (-r), strings are printed in deterministic\norder based on their subject key. The program encodes ranking via an “inverse score”\nkey (e.g., 1000 - score) so higher-risk items appear first.\nReferences\n- N3 spec: https://w3c.github.io/N3/spec/\n- Eyeling builtins: https://eyereasoner.github.io/eyeling/HANDBOOK#ch11\n- ODRL vocab: https://www.w3.org/TR/odrl-vocab/\n- DPV risk module: https://dev.dpvcg.org/dpv/modules/risk\n- DPV-RISK: https://w3id.org/dpv/risk\n\n## Compilation summary\n\n- Example name: `odrl_dpv_risk_ranked`\n- Input facts emitted: 38\n- Forward rules compiled: 9\n- Backward predicate rules compiled: 0\n- Fuses compiled: 0\n- Predicate count: 32\n\n## Built-ins used\n\n- `log:includes`\n- `log:notIncludes`\n- `log:outputString`\n- `math:difference`\n- `math:greaterThan`\n- `math:lessThan`\n- `math:notLessThan`\n- `math:sum`\n- `string:format`\n\n## Runtime model\n\nThe generated `examples/odrl_dpv_risk_ranked.js` is a specialized JavaScript derivation program. For ordinary sources, `see.js` emits the source facts as `examples/input/odrl_dpv_risk_ranked.trig`. For rules-only sources, generation can reuse an existing external evidence file such as `examples/input/odrl-dpv-risk-ranked.trig` or `examples/input/odrl_dpv_risk_ranked.trig`. The runner reads that TriG evidence directly and performs a local fixpoint derivation; it does not parse the program source or call an external reasoner.\n\n## Output model\n\nRunning `node examples/odrl_dpv_risk_ranked.js` produces a SEE-style Markdown report with an **Entailment** section, an **Explanation** section, and a **Formal TriG Output** section containing the selected derived/query facts.\n";
|
|
5007
5007
|
function seeMetadata(data) { return (data && data.__see) || {}; }
|
|
5008
5008
|
function trustedDerivation(data) { const meta = seeMetadata(data); const facts = data && Array.isArray(data.facts) ? data.facts : []; const expectedFacts = EXPECTED_INPUT_FACTS || Number(meta.InputFacts || 0); if (meta.SourceSHA256 && meta.SourceSHA256 !== "e3360556d6e82bda9f502d362cc110e2cd681608ae1388cf8071660f6fbe6200") throw new Error('input evidence does not match the N3 source compiled into this example'); const result = saturate(facts, RULES); const rawOutput = renderRawOutput(result.graph, QUERIES, RULES, facts); fail('Compiled N3 derivation failed', { 'input evidence metadata is present and matches compiled source': meta.SourceSHA256 === "e3360556d6e82bda9f502d362cc110e2cd681608ae1388cf8071660f6fbe6200", 'input evidence facts were loaded': expectedFacts > 0 ? facts.length === expectedFacts : facts.length >= 0, 'compiled rules were loaded': RULES.length === 9, 'compiled query directives were loaded': QUERIES.length === 3, 'a derivation fixpoint was reached': result.graph.facts.length >= facts.length, 'query or output facts were produced': rawOutput.length > 0 }); return { ...result, rawOutput, inputFacts: facts }; }
|
|
5009
5009
|
function snapshotMarkdown(markdown) { return markdown.split(/\n/).map((line) => line ? line + ' \n' : '\n').join(''); }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Age checker
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 1 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:test is true.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :test :is true .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Annotation
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
The derivation produced 1 formula-valued
|
|
5
|
-
Main
|
|
3
|
+
## Entailment
|
|
4
|
+
The derivation produced 1 formula-valued entailment(s).
|
|
5
|
+
Main entailment: **:t log:nameOf { :a :name "Alice" }.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :t log:nameOf { :a :name "Alice" } .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Backward rule example
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 1 new fact(s) from 0 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **5 :isIndeedMoreInterestingThan 3.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- 5 :isIndeedMoreInterestingThan 3 .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Backward recursion coverage
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:a :reaches :c.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :a :reaches :c .
|
|
9
9
|
- :a :reaches :b .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Builtin coverage smoke
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 29 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:assurance :member "c".**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :assurance :member "c" .
|
|
9
9
|
- :assurance :member "b" .
|
|
10
10
|
- :assurance :formula { :x :p :y . :a :b :c } .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Collection
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 0 new fact(s) from 2 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **_:b2 :p :q.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- _:b2 :p :q .
|
|
9
9
|
- (1 _:b2 (2)) :p2 :q2 .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Complex numbers
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
The derivation produced 1 formula-valued
|
|
5
|
-
Main
|
|
3
|
+
## Entailment
|
|
4
|
+
The derivation produced 1 formula-valued entailment(s).
|
|
5
|
+
Main entailment: **:test is { ((-1 0) (0.5 0)) complex:exponentiation (-3.49148133884313e-15 1) . ((2.71828182845905 0) (0 3.14159265358979)) complex:exponentiation (-1 3.23108914886517e-15) . ((0 1) (0 1)) complex:exponentiation (0.207879576350761 0) . ((2.71828182845905 0) (-1.57079632679 0)) complex:exponentiation (0.207879576351779 0) . (2 0) complex:asin (1.5707963267949 1.31695789692482) . (2 0) complex:acos (0 -1.31695789692482) }.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :test :is { ((-1 0) (0.5 0)) complex:exponentiation (-3.49148133884313e-15 1) . ((2.71828182845905 0) (0 3.14159265358979)) complex:exponentiation (-1 3.23108914886517e-15) . ((0 1) (0 1)) complex:exponentiation (0.207879576350761 0) . ((2.71828182845905 0) (-1.57079632679 0)) complex:exponentiation (0.207879576351779 0) . (2 0) complex:asin (1.5707963267949 1.31695789692482) . (2 0) complex:acos (0 -1.31695789692482) } .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Complex Matrix Stability
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
A_unstable = [[(1,1),(0,0)],[(0,0),(2,0)]] has spectral radius 2 and is unstable. A_stable = [[(1,0),(0,0)],[(0,0),(-1,0)]] has spectral radius 1 and is marginally stable. A_damped = [[(0,0),(0,0)],[(0,0),(0,0)]] has spectral radius 0 and is damped.
|
|
5
5
|
|
|
6
6
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Composition of injective functions is injective.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :sameInputByCompositeInjectivity (:h :b :a).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :sameInputByCompositeInjectivity (:h :b :a) .
|
|
9
9
|
- :result :sameInputByCompositeInjectivity (:h :a :b) .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Control System
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:actuator2 :control1 26.08.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :actuator2 :control1 26.08 .
|
|
9
9
|
- :actuator1 :control1 39.2734619867828 .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# crypto builtins tests
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 4 new fact(s) from 0 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:ok_crypto_sha512_1 is a :Pass.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :ok_crypto_sha512_1 rdf:type :Pass .
|
|
9
9
|
- :ok_crypto_sha256_1 rdf:type :Pass .
|
|
10
10
|
- :ok_crypto_md5_1 rdf:type :Pass .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Dijkstra's algorithm to find the shortest path
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 9 new fact(s) from 9 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **(:f :e) :edge 3.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- (:f :e) :edge 3 .
|
|
9
9
|
- (:f :d) :edge 6 .
|
|
10
10
|
- (:e :d) :edge 2 .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Dog license example
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 1 new fact(s) from 7 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:alice :mustHave :dogLicense.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :alice :mustHave :dogLicense .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Equals test
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 1 new fact(s) from 1 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:test is true.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :test :is true .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# If two equivalence classes share an element, they are the same class.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 18 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :sameClassBecauseOfSharedMember (:a :b :c).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :sameClassBecauseOfSharedMember (:a :b :c) .
|
|
9
9
|
- :result :sameClassBecauseOfSharedMember (:a :c :c) .
|
|
10
10
|
- :result :sameClassBecauseOfSharedMember (:c :b :a) .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Euler identity (exact, certificate-friendly):
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 6 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :identityHolds true.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :identityHolds true .
|
|
9
9
|
- :result :phaseModSqIsOne true .
|
|
10
10
|
- :result :phaseModSq 1 .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Existential rule
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 2 new fact(s) from 2 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:Plato is _:B.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :Plato :is _:B .
|
|
9
9
|
- :Socrates :is _:B .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# A tiny expression evaluator in N3
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 1 new fact(s) from 17 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:Root :result 12.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :Root :result 12 .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Family cousins
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 25 new fact(s) from 15 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:Judy :cousin :Ivan.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :Judy :cousin :Ivan .
|
|
9
9
|
- :Judy :cousin :Heidi .
|
|
10
10
|
- :Ivan :cousin :Judy .
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fibonacci Example (Big)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The Fibonacci number for index 10000 is:
|
|
5
5
|
33644764876431783266621612005107543310302148460680063906564769974680081442166662368155595513633734025582065332680836159373734790483865268263040892463056431887354544369559827491606602099884183933864652731300088830269235673613135117579297437854413752130520504347701602264758318906527890855154366159582987279682987510631200575428783453215515103870818298969791613127856265033195487140214287532698187962046936097879900350962302291026368131493195275630227837628441540360584402572114334961180023091208287046088923962328835461505776583271252546093591128203925285393434620904245248929403901706233888991085841065183173360437470737908552631764325733993712871937587746897479926305837065742830161637408969178426378624212835258112820516370298089332099905707920064367426202389783111470054074998459250360633560933883831923386783056136435351892133279732908133732642652633989763922723407882928177953580570993691049175470808931841056146322338217465637321248226383092103297701648054726243842374862411453093812206564914032751086643394517512161526545361333111314042436854805106765843493523836959653428071768775328348234345557366719731392746273629108210679280784718035329131176778924659089938635459327894523777674406192240337638674004021330343297496902028328145933418826817683893072003634795623117103101291953169794607632737589253530772552375943788434504067715555779056450443016640119462580972216729758615026968443146952034614932291105970676243268515992834709891284706740862008587135016260312071903172086094081298321581077282076353186624611278245537208532365305775956430072517744315051539600905168603220349163222640885248852433158051534849622434848299380905070483482449327453732624567755879089187190803662058009594743150052402532709746995318770724376825907419939632265984147498193609285223945039707165443156421328157688908058783183404917434556270520223564846495196112460268313970975069382648706613264507665074611512677522748621598642530711298441182622661057163515069260029861704945425047491378115154139941550671256271197133252763631939606902895650288268608362241082050562430701794976171121233066073310059947366875
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# French cities — graph path traversal.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 1 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:paris :path :nantes.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :paris :path :nantes .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Good cobbler
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
The derivation produced 1 formula-valued
|
|
5
|
-
Main
|
|
3
|
+
## Entailment
|
|
4
|
+
The derivation produced 1 formula-valued entailment(s).
|
|
5
|
+
Main entailment: **:test is { :joe :is (:good :Cobbler) }.**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :test :is { :joe :is (:good :Cobbler) } .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# In a partial order, a greatest lower bound is unique.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :sameGreatestLowerBound (:a :b :g2 :g1).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :sameGreatestLowerBound (:a :b :g2 :g1) .
|
|
9
9
|
- :result :sameGreatestLowerBound (:a :b :g1 :g2) .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# In a group, the inverse of an element is unique.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :sameInverse (:x :j :i).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :sameInverse (:x :j :i) .
|
|
9
9
|
- :result :sameInverse (:x :i :j) .
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Hadamard gate approximation
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 441 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:result :HMidpointEntry (20 1 1 -0.707106733683605 0).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :result :HMidpointEntry (20 1 1 -0.707106733683605 0) .
|
|
9
9
|
- :result :HMidpointEntry (20 1 0 0.707106733683605 0) .
|
|
10
10
|
- :result :HMidpointEntry (20 0 1 0.707106733683605 0) .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Towers of Hanoi
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 1 new fact(s) from 0 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **3 :answer ((:left :right) (:left :center) (:right :center) (:left :right) (:center :left) (:center :right) (:left :right)).**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- 3 :answer ((:left :right) (:left :center) (:right :center) (:left :right) (:center :left) (:center :right) (:left :right)) .
|
|
9
9
|
|
|
10
10
|
## Explanation
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# ODRL + DPV risk assessment with ranked, explainable output.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The compiled query selected 65 fact(s) after the rule closure was computed.
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **(:Agreement1 :ConsumerExample 1 930 "C4" 1 _:risk4 _:m14) log:outputString " - mitigation for clause C4: Add a permission allowing data export (or remove the prohibition) to support portability.\n".**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- (:Agreement1 :ConsumerExample 1 930 "C4" 1 _:risk4 _:m14) log:outputString " - mitigation for clause C4: Add a permission allowing data export (or remove the prohibition) to support portability.\n" .
|
|
9
9
|
- (:Agreement1 :ConsumerExample 1 930 "C3" 1 _:risk4 _:m14) log:outputString " - mitigation for clause C3: Add a permission allowing data export (or remove the prohibition) to support portability.\n" .
|
|
10
10
|
- (:Agreement1 :ConsumerExample 1 930 "C2" 1 _:risk4 _:m14) log:outputString " - mitigation for clause C2: Add a permission allowing data export (or remove the prohibition) to support portability.\n" .
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Path Discovery
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Entailment
|
|
4
4
|
The derivation produced 3 new fact(s) from 96420 stated fact(s).
|
|
5
|
-
Main
|
|
5
|
+
Main entailment: **:discovered :airroute ("Ostend-Bruges International Airport" "Liège Airport" "Palma De Mallorca Airport" "Václav Havel Airport Prague").**
|
|
6
6
|
|
|
7
|
-
Selected
|
|
7
|
+
Selected entailments:
|
|
8
8
|
- :discovered :airroute ("Ostend-Bruges International Airport" "Liège Airport" "Palma De Mallorca Airport" "Václav Havel Airport Prague") .
|
|
9
9
|
- :discovered :airroute ("Ostend-Bruges International Airport" "Liège Airport" "Diagoras Airport" "Václav Havel Airport Prague") .
|
|
10
10
|
- :discovered :airroute ("Ostend-Bruges International Airport" "Liège Airport" "Heraklion International Nikos Kazantzakis Airport" "Václav Havel Airport Prague") .
|