eyelang 1.3.8 → 1.4.0

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.
Files changed (219) hide show
  1. package/README.md +19 -14
  2. package/SPEC.md +4 -4
  3. package/conformance/expected/core/001_fact_query.out +0 -8
  4. package/conformance/expected/core/002_rule_recursion.out +0 -41
  5. package/conformance/expected/core/003_terms_and_readback.out +0 -104
  6. package/conformance/expected/core/004_conjunction_and_parentheses.out +0 -25
  7. package/conformance/expected/core/005_list_deconstruction.out +0 -32
  8. package/conformance/expected/core/006_comma_formula_data.out +0 -15
  9. package/conformance/expected/core/007_anonymous_variables.out +0 -19
  10. package/conformance/expected/core/008_graphic_atoms.out +0 -24
  11. package/conformance/expected/core/009_comments_and_whitespace.out +0 -30
  12. package/conformance/expected/core/010_variable_scope_and_reuse.out +0 -52
  13. package/conformance/expected/core/011_predicate_arity.out +0 -30
  14. package/conformance/expected/core/012_nested_compound_unification.out +0 -30
  15. package/conformance/expected/core/013_multiple_clauses_order.out +0 -44
  16. package/conformance/expected/core/014_failure_filters_answers.out +0 -19
  17. package/conformance/expected/core/015_improper_list_unification.out +0 -45
  18. package/conformance/expected/core/016_zero_arity_compound.out +0 -15
  19. package/conformance/expected/core/017_three_step_recursion.out +0 -99
  20. package/conformance/expected/core/018_quoted_atom_readback.out +0 -45
  21. package/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -36
  22. package/conformance/expected/core/020_nested_list_terms.out +0 -30
  23. package/conformance/expected/extension/001_default_derived_output.out +0 -56
  24. package/conformance/expected/extension/002_materialize_focus.out +0 -22
  25. package/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -148
  26. package/conformance/expected/extension/004_strings_and_atoms.out +0 -58
  27. package/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -135
  28. package/conformance/expected/extension/006_formula_terms.out +0 -76
  29. package/conformance/expected/extension/007_negation_once_generators.out +0 -40
  30. package/conformance/expected/extension/008_equality_and_inequality.out +0 -58
  31. package/conformance/expected/extension/009_list_relations.out +0 -73
  32. package/conformance/expected/extension/010_append_splits.out +0 -45
  33. package/conformance/expected/extension/011_matching_and_comparison.out +0 -70
  34. package/conformance/expected/extension/012_memoize_declaration.out +0 -41
  35. package/conformance/expected/extension/013_numeric_functions.out +0 -105
  36. package/conformance/expected/extension/014_between_enumeration.out +0 -45
  37. package/conformance/expected/extension/015_smallest_divisor.out +0 -15
  38. package/conformance/expected/extension/016_negation_filter.out +0 -38
  39. package/conformance/expected/extension/017_once_user_predicate.out +0 -21
  40. package/conformance/expected/extension/018_findall_user_goal.out +0 -15
  41. package/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -15
  42. package/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -30
  43. package/conformance/expected/extension/021_nth0_index_generation.out +0 -15
  44. package/conformance/expected/extension/022_set_nth0_edges.out +0 -30
  45. package/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -30
  46. package/conformance/expected/extension/024_not_member_filter.out +0 -19
  47. package/conformance/expected/extension/025_is_list_filter.out +0 -19
  48. package/conformance/expected/extension/026_nested_formula_terms.out +0 -114
  49. package/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -14
  50. package/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -42
  51. package/conformance/expected/extension/029_string_matching_filters.out +0 -38
  52. package/conformance/expected/extension/030_string_and_atom_concat.out +0 -30
  53. package/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -18
  54. package/conformance/expected/extension/032_sumall_numeric_template.out +0 -8
  55. package/conformance/expected/extension/033_aggregate_min_template.out +0 -8
  56. package/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -8
  57. package/examples/output/access-control-policy.pl +0 -156
  58. package/examples/output/ackermann.pl +0 -1240
  59. package/examples/output/age.pl +0 -69
  60. package/examples/output/aliases-and-namespaces.pl +0 -73
  61. package/examples/output/alignment-demo.pl +0 -862
  62. package/examples/output/allen-interval-calculus.pl +0 -9169
  63. package/examples/output/ancestor.pl +0 -134
  64. package/examples/output/animal.pl +0 -64
  65. package/examples/output/annotation.pl +0 -76
  66. package/examples/output/backward.pl +0 -21
  67. package/examples/output/basic-monadic.pl +0 -22770
  68. package/examples/output/bayes-diagnosis.pl +0 -195
  69. package/examples/output/bayes-therapy.pl +0 -34873
  70. package/examples/output/beam-deflection.pl +0 -222
  71. package/examples/output/blocks-world-planning.pl +0 -1339
  72. package/examples/output/bmi.pl +0 -1903
  73. package/examples/output/braking-safety-worlds.pl +0 -2452
  74. package/examples/output/buck-converter-design.pl +0 -663
  75. package/examples/output/cache-performance.pl +0 -306
  76. package/examples/output/canary-release.pl +0 -167
  77. package/examples/output/cat-koko.pl +0 -83
  78. package/examples/output/clinical-trial-screening.pl +0 -380
  79. package/examples/output/collatz-1000.pl +0 -19000
  80. package/examples/output/combinatorics-findall-sort.pl +0 -56
  81. package/examples/output/competitive-enzyme-kinetics.pl +0 -563
  82. package/examples/output/complex-matrix-stability.pl +0 -250
  83. package/examples/output/complex.pl +0 -653
  84. package/examples/output/composition-of-injective-functions-is-injective.pl +0 -256
  85. package/examples/output/context-association.pl +0 -75
  86. package/examples/output/control-system.pl +0 -328
  87. package/examples/output/cryptarithmetic-send-more-money.pl +0 -168
  88. package/examples/output/cyclic-path.pl +0 -504
  89. package/examples/output/d3-group.pl +0 -56
  90. package/examples/output/dairy-energy-balance.pl +0 -1034
  91. package/examples/output/data-negotiation.pl +0 -75
  92. package/examples/output/deep-taxonomy-10.pl +0 -1235
  93. package/examples/output/deep-taxonomy-100.pl +0 -1235
  94. package/examples/output/deep-taxonomy-1000.pl +0 -1235
  95. package/examples/output/deep-taxonomy-10000.pl +0 -2915
  96. package/examples/output/deep-taxonomy-100000.pl +0 -20240
  97. package/examples/output/delfour.pl +0 -2829
  98. package/examples/output/dense-hamiltonian-cycle.pl +0 -207
  99. package/examples/output/deontic-logic.pl +0 -105
  100. package/examples/output/derived-rule.pl +0 -41
  101. package/examples/output/diamond-property.pl +0 -303
  102. package/examples/output/dijkstra-findall-sort.pl +0 -484
  103. package/examples/output/dijkstra-risk-path.pl +0 -4841
  104. package/examples/output/dijkstra.pl +0 -1336
  105. package/examples/output/dining-philosophers.pl +0 -21646
  106. package/examples/output/dog.pl +0 -30
  107. package/examples/output/drone-corridor-planner.pl +0 -2466
  108. package/examples/output/easter-computus.pl +0 -5690
  109. package/examples/output/electrical-rc-filter.pl +0 -102
  110. package/examples/output/epidemic-policy.pl +0 -760
  111. package/examples/output/equivalence-classes-overlap-implies-same-class.pl +0 -1080
  112. package/examples/output/eulerian-path.pl +0 -383
  113. package/examples/output/ev-range-worlds.pl +0 -2294
  114. package/examples/output/exact-cover-sudoku.pl +0 -396
  115. package/examples/output/existential-rule.pl +0 -38
  116. package/examples/output/exoplanet-validation-worlds.pl +0 -1904
  117. package/examples/output/expression-eval.pl +0 -104
  118. package/examples/output/family-cousins.pl +0 -3852
  119. package/examples/output/fastpow.pl +0 -1064
  120. package/examples/output/fft8-numeric.pl +0 -2556
  121. package/examples/output/fibonacci.pl +0 -2060
  122. package/examples/output/field-nitrogen-balance.pl +0 -1452
  123. package/examples/output/floating-point.pl +0 -151
  124. package/examples/output/four-color-map.pl +0 -191
  125. package/examples/output/fundamental-theorem-arithmetic.pl +0 -1610
  126. package/examples/output/gcd-bezout-identity.pl +0 -1842
  127. package/examples/output/gd-step-certified.pl +0 -32354
  128. package/examples/output/gdpr-compliance.pl +0 -193
  129. package/examples/output/goldbach-1000.pl +0 -17490
  130. package/examples/output/good-cobbler.pl +0 -15
  131. package/examples/output/gps.pl +0 -4166
  132. package/examples/output/graph-reachability.pl +0 -148
  133. package/examples/output/gray-code-counter.pl +0 -835
  134. package/examples/output/greatest-lower-bound-uniqueness.pl +0 -148
  135. package/examples/output/group-inverse-uniqueness.pl +0 -82
  136. package/examples/output/hamiltonian-cycle.pl +0 -102
  137. package/examples/output/hamiltonian-path.pl +0 -14157
  138. package/examples/output/hamming-code.pl +0 -2665
  139. package/examples/output/hanoi.pl +0 -184
  140. package/examples/output/heat-loss.pl +0 -223
  141. package/examples/output/heron-theorem.pl +0 -253
  142. package/examples/output/ideal-gas-law.pl +0 -148
  143. package/examples/output/illegitimate-reasoning.pl +0 -530
  144. package/examples/output/kaprekar.pl +0 -208
  145. package/examples/output/law-of-cosines.pl +0 -165
  146. package/examples/output/least-squares-regression.pl +0 -1447
  147. package/examples/output/list-collection.pl +0 -49
  148. package/examples/output/lldm.pl +0 -17298
  149. package/examples/output/manufacturing-quality-control.pl +0 -562
  150. package/examples/output/matrix.pl +0 -206
  151. package/examples/output/microgrid-dispatch.pl +0 -787
  152. package/examples/output/monkey-bananas.pl +0 -575
  153. package/examples/output/n-queens.pl +0 -2046
  154. package/examples/output/network-sla.pl +0 -282
  155. package/examples/output/newton-raphson.pl +0 -756
  156. package/examples/output/nixon-diamond.pl +0 -176
  157. package/examples/output/odrl-dpv-healthcare-risk-ranked.pl +0 -6148
  158. package/examples/output/odrl-dpv-risk-ranked.pl +0 -12961
  159. package/examples/output/orbital-transfer-design.pl +0 -961
  160. package/examples/output/path-discovery.pl +0 -333
  161. package/examples/output/peano-arithmetic.pl +0 -1432
  162. package/examples/output/peasant.pl +0 -190
  163. package/examples/output/pendulum-period.pl +0 -271
  164. package/examples/output/polynomial.pl +0 -7952
  165. package/examples/output/project-portfolio-optimization.pl +0 -93
  166. package/examples/output/proof-contrapositive.pl +0 -75
  167. package/examples/output/quadratic-formula.pl +0 -454
  168. package/examples/output/quine-mccluskey.pl +0 -188
  169. package/examples/output/radioactive-decay.pl +0 -299
  170. package/examples/output/sat-dpll.pl +0 -121
  171. package/examples/output/security-incident-correlation.pl +0 -267
  172. package/examples/output/service-impact.pl +0 -457
  173. package/examples/output/sieve.pl +0 -19
  174. package/examples/output/skolem-functions.pl +0 -264
  175. package/examples/output/socket-age.pl +0 -31
  176. package/examples/output/socket-family.pl +0 -56
  177. package/examples/output/socrates.pl +0 -36
  178. package/examples/output/statistics-summary.pl +0 -741
  179. package/examples/output/sudoku.pl +0 -38
  180. package/examples/output/superdense-coding.pl +0 -476
  181. package/examples/output/traveling-salesman.pl +0 -284
  182. package/examples/output/turing.pl +0 -2144
  183. package/examples/output/vector-similarity.pl +0 -421
  184. package/examples/output/witch.pl +0 -209
  185. package/examples/output/wolf-goat-cabbage.pl +0 -900
  186. package/examples/output/zebra.pl +0 -401
  187. package/examples/proof/age.pl +71 -0
  188. package/examples/proof/aliases-and-namespaces.pl +78 -0
  189. package/examples/proof/ancestor.pl +140 -0
  190. package/examples/proof/animal.pl +68 -0
  191. package/examples/proof/annotation.pl +80 -0
  192. package/examples/proof/backward.pl +22 -0
  193. package/examples/proof/cat-koko.pl +86 -0
  194. package/examples/proof/data-negotiation.pl +76 -0
  195. package/examples/proof/derived-rule.pl +43 -0
  196. package/examples/proof/dog.pl +31 -0
  197. package/examples/proof/electrical-rc-filter.pl +105 -0
  198. package/examples/proof/existential-rule.pl +40 -0
  199. package/examples/proof/floating-point.pl +160 -0
  200. package/examples/proof/good-cobbler.pl +16 -0
  201. package/examples/proof/group-inverse-uniqueness.pl +84 -0
  202. package/examples/proof/list-collection.pl +52 -0
  203. package/examples/proof/proof-contrapositive.pl +78 -0
  204. package/examples/proof/socket-age.pl +32 -0
  205. package/examples/proof/socket-family.pl +59 -0
  206. package/examples/proof/socrates.pl +38 -0
  207. package/examples/socket-age.pl +4 -4
  208. package/examples/socket-family.pl +4 -4
  209. package/package.json +1 -1
  210. package/playground-worker.mjs +4 -4
  211. package/playground.html +15 -15
  212. package/src/cli.js +10 -10
  213. package/src/index.js +3 -2
  214. package/src/parser.js +130 -1
  215. package/src/program.js +33 -27
  216. package/test/run-all.js +0 -0
  217. package/test/run-conformance.js +0 -0
  218. package/test/run-examples.js +38 -8
  219. package/test/run-regression.js +29 -28
@@ -1,1352 +1,16 @@
1
1
  edge([b, a], 4).
2
- why(
3
- edge([b, a], 4),
4
- proof(
5
- goal(edge([b, a], 4)),
6
- by(rule("dijkstra.pl", clause(9))),
7
- bindings([binding("B", b), binding("A", a), binding("Cost", 4)]),
8
- uses([
9
- proof(
10
- goal(base_link(a, b, 4)),
11
- by(rule("dijkstra.pl", clause(4))),
12
- bindings([binding("A", a), binding("B", b), binding("Cost", 4), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
13
- uses([
14
- proof(
15
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
16
- by(fact("dijkstra.pl", clause(3)))
17
- ),
18
- proof(
19
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(b, 4))),
20
- by(builtin(formula_binary, 4))
21
- )
22
- ])
23
- )
24
- ])
25
- )
26
- ).
27
-
28
2
  edge([c, a], 2).
29
- why(
30
- edge([c, a], 2),
31
- proof(
32
- goal(edge([c, a], 2)),
33
- by(rule("dijkstra.pl", clause(9))),
34
- bindings([binding("B", c), binding("A", a), binding("Cost", 2)]),
35
- uses([
36
- proof(
37
- goal(base_link(a, c, 2)),
38
- by(rule("dijkstra.pl", clause(4))),
39
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
40
- uses([
41
- proof(
42
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
43
- by(fact("dijkstra.pl", clause(3)))
44
- ),
45
- proof(
46
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
47
- by(builtin(formula_binary, 4))
48
- )
49
- ])
50
- )
51
- ])
52
- )
53
- ).
54
-
55
3
  edge([c, b], 1).
56
- why(
57
- edge([c, b], 1),
58
- proof(
59
- goal(edge([c, b], 1)),
60
- by(rule("dijkstra.pl", clause(9))),
61
- bindings([binding("B", c), binding("A", b), binding("Cost", 1)]),
62
- uses([
63
- proof(
64
- goal(base_link(b, c, 1)),
65
- by(rule("dijkstra.pl", clause(4))),
66
- bindings([binding("A", b), binding("B", c), binding("Cost", 1), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
67
- uses([
68
- proof(
69
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
70
- by(fact("dijkstra.pl", clause(3)))
71
- ),
72
- proof(
73
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(c, 1))),
74
- by(builtin(formula_binary, 4))
75
- )
76
- ])
77
- )
78
- ])
79
- )
80
- ).
81
-
82
4
  edge([d, b], 5).
83
- why(
84
- edge([d, b], 5),
85
- proof(
86
- goal(edge([d, b], 5)),
87
- by(rule("dijkstra.pl", clause(9))),
88
- bindings([binding("B", d), binding("A", b), binding("Cost", 5)]),
89
- uses([
90
- proof(
91
- goal(base_link(b, d, 5)),
92
- by(rule("dijkstra.pl", clause(4))),
93
- bindings([binding("A", b), binding("B", d), binding("Cost", 5), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
94
- uses([
95
- proof(
96
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
97
- by(fact("dijkstra.pl", clause(3)))
98
- ),
99
- proof(
100
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(d, 5))),
101
- by(builtin(formula_binary, 4))
102
- )
103
- ])
104
- )
105
- ])
106
- )
107
- ).
108
-
109
5
  edge([d, c], 8).
110
- why(
111
- edge([d, c], 8),
112
- proof(
113
- goal(edge([d, c], 8)),
114
- by(rule("dijkstra.pl", clause(9))),
115
- bindings([binding("B", d), binding("A", c), binding("Cost", 8)]),
116
- uses([
117
- proof(
118
- goal(base_link(c, d, 8)),
119
- by(rule("dijkstra.pl", clause(4))),
120
- bindings([binding("A", c), binding("B", d), binding("Cost", 8), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
121
- uses([
122
- proof(
123
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
124
- by(fact("dijkstra.pl", clause(3)))
125
- ),
126
- proof(
127
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), c, edge, arc(d, 8))),
128
- by(builtin(formula_binary, 4))
129
- )
130
- ])
131
- )
132
- ])
133
- )
134
- ).
135
-
136
6
  edge([e, c], 10).
137
- why(
138
- edge([e, c], 10),
139
- proof(
140
- goal(edge([e, c], 10)),
141
- by(rule("dijkstra.pl", clause(9))),
142
- bindings([binding("B", e), binding("A", c), binding("Cost", 10)]),
143
- uses([
144
- proof(
145
- goal(base_link(c, e, 10)),
146
- by(rule("dijkstra.pl", clause(4))),
147
- bindings([binding("A", c), binding("B", e), binding("Cost", 10), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
148
- uses([
149
- proof(
150
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
151
- by(fact("dijkstra.pl", clause(3)))
152
- ),
153
- proof(
154
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), c, edge, arc(e, 10))),
155
- by(builtin(formula_binary, 4))
156
- )
157
- ])
158
- )
159
- ])
160
- )
161
- ).
162
-
163
7
  edge([e, d], 2).
164
- why(
165
- edge([e, d], 2),
166
- proof(
167
- goal(edge([e, d], 2)),
168
- by(rule("dijkstra.pl", clause(9))),
169
- bindings([binding("B", e), binding("A", d), binding("Cost", 2)]),
170
- uses([
171
- proof(
172
- goal(base_link(d, e, 2)),
173
- by(rule("dijkstra.pl", clause(4))),
174
- bindings([binding("A", d), binding("B", e), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
175
- uses([
176
- proof(
177
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
178
- by(fact("dijkstra.pl", clause(3)))
179
- ),
180
- proof(
181
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(e, 2))),
182
- by(builtin(formula_binary, 4))
183
- )
184
- ])
185
- )
186
- ])
187
- )
188
- ).
189
-
190
8
  edge([f, d], 6).
191
- why(
192
- edge([f, d], 6),
193
- proof(
194
- goal(edge([f, d], 6)),
195
- by(rule("dijkstra.pl", clause(9))),
196
- bindings([binding("B", f), binding("A", d), binding("Cost", 6)]),
197
- uses([
198
- proof(
199
- goal(base_link(d, f, 6)),
200
- by(rule("dijkstra.pl", clause(4))),
201
- bindings([binding("A", d), binding("B", f), binding("Cost", 6), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
202
- uses([
203
- proof(
204
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
205
- by(fact("dijkstra.pl", clause(3)))
206
- ),
207
- proof(
208
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(f, 6))),
209
- by(builtin(formula_binary, 4))
210
- )
211
- ])
212
- )
213
- ])
214
- )
215
- ).
216
-
217
9
  edge([f, e], 3).
218
- why(
219
- edge([f, e], 3),
220
- proof(
221
- goal(edge([f, e], 3)),
222
- by(rule("dijkstra.pl", clause(9))),
223
- bindings([binding("B", f), binding("A", e), binding("Cost", 3)]),
224
- uses([
225
- proof(
226
- goal(base_link(e, f, 3)),
227
- by(rule("dijkstra.pl", clause(4))),
228
- bindings([binding("A", e), binding("B", f), binding("Cost", 3), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
229
- uses([
230
- proof(
231
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
232
- by(fact("dijkstra.pl", clause(3)))
233
- ),
234
- proof(
235
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), e, edge, arc(f, 3))),
236
- by(builtin(formula_binary, 4))
237
- )
238
- ])
239
- )
240
- ])
241
- )
242
- ).
243
-
244
10
  path([a, f], [[a, b, d, e, f], 14]).
245
- why(
246
- path([a, f], [[a, b, d, e, f], 14]),
247
- proof(
248
- goal(path([a, f], [[a, b, d, e, f], 14])),
249
- by(rule("dijkstra.pl", clause(10))),
250
- bindings([binding("Path", [a, b, d, e, f]), binding("Cost", 14)]),
251
- uses([
252
- proof(
253
- goal(path(a, f, [a], [a, b, d, e, f], 14)),
254
- by(rule("dijkstra.pl", clause(8))),
255
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [b, d, e, f]), binding("Cost", 14), binding("Next", b), binding("StepCost", 4), binding("RestCost", 10)]),
256
- uses([
257
- proof(
258
- goal(link(a, b, 4)),
259
- by(rule("dijkstra.pl", clause(5))),
260
- bindings([binding("A", a), binding("B", b), binding("Cost", 4)]),
261
- uses([
262
- proof(
263
- goal(base_link(a, b, 4)),
264
- by(rule("dijkstra.pl", clause(4))),
265
- bindings([binding("A", a), binding("B", b), binding("Cost", 4), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
266
- uses([
267
- proof(
268
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
269
- by(fact("dijkstra.pl", clause(3)))
270
- ),
271
- proof(
272
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(b, 4))),
273
- by(builtin(formula_binary, 4))
274
- )
275
- ])
276
- )
277
- ])
278
- ),
279
- proof(
280
- goal(not_member(b, [a])),
281
- by(builtin(not_member, 2))
282
- ),
283
- proof(
284
- goal(path(b, f, [b, a], [b, d, e, f], 10)),
285
- by(rule("dijkstra.pl", clause(8))),
286
- bindings([binding("Node", b), binding("Goal", f), binding("Visited", [b, a]), binding("Path", [d, e, f]), binding("Cost", 10), binding("Next", d), binding("StepCost", 5), binding("RestCost", 5)]),
287
- uses([
288
- proof(
289
- goal(link(b, d, 5)),
290
- by(rule("dijkstra.pl", clause(5))),
291
- bindings([binding("A", b), binding("B", d), binding("Cost", 5)]),
292
- uses([
293
- proof(
294
- goal(base_link(b, d, 5)),
295
- by(rule("dijkstra.pl", clause(4))),
296
- bindings([binding("A", b), binding("B", d), binding("Cost", 5), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
297
- uses([
298
- proof(
299
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
300
- by(fact("dijkstra.pl", clause(3)))
301
- ),
302
- proof(
303
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(d, 5))),
304
- by(builtin(formula_binary, 4))
305
- )
306
- ])
307
- )
308
- ])
309
- ),
310
- proof(
311
- goal(not_member(d, [b, a])),
312
- by(builtin(not_member, 2))
313
- ),
314
- proof(
315
- goal(path(d, f, [d, b, a], [d, e, f], 5)),
316
- by(rule("dijkstra.pl", clause(8))),
317
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, b, a]), binding("Path", [e, f]), binding("Cost", 5), binding("Next", e), binding("StepCost", 2), binding("RestCost", 3)]),
318
- uses([
319
- proof(
320
- goal(link(d, e, 2)),
321
- by(rule("dijkstra.pl", clause(5))),
322
- bindings([binding("A", d), binding("B", e), binding("Cost", 2)]),
323
- uses([
324
- proof(
325
- goal(base_link(d, e, 2)),
326
- by(rule("dijkstra.pl", clause(4))),
327
- bindings([binding("A", d), binding("B", e), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
328
- uses([
329
- proof(
330
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
331
- by(fact("dijkstra.pl", clause(3)))
332
- ),
333
- proof(
334
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(e, 2))),
335
- by(builtin(formula_binary, 4))
336
- )
337
- ])
338
- )
339
- ])
340
- ),
341
- proof(
342
- goal(not_member(e, [d, b, a])),
343
- by(builtin(not_member, 2))
344
- ),
345
- proof(
346
- goal(path(e, f, [e, d, b, a], [e, f], 3)),
347
- by(rule("dijkstra.pl", clause(8))),
348
- bindings([binding("Node", e), binding("Goal", f), binding("Visited", [e, d, b, a]), binding("Path", [f]), binding("Cost", 3), binding("Next", f), binding("StepCost", 3), binding("RestCost", 0)]),
349
- uses([
350
- proof(
351
- goal(link(e, f, 3)),
352
- by(rule("dijkstra.pl", clause(5))),
353
- bindings([binding("A", e), binding("B", f), binding("Cost", 3)]),
354
- uses([
355
- proof(
356
- goal(base_link(e, f, 3)),
357
- by(rule("dijkstra.pl", clause(4))),
358
- bindings([binding("A", e), binding("B", f), binding("Cost", 3), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
359
- uses([
360
- proof(
361
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
362
- by(fact("dijkstra.pl", clause(3)))
363
- ),
364
- proof(
365
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), e, edge, arc(f, 3))),
366
- by(builtin(formula_binary, 4))
367
- )
368
- ])
369
- )
370
- ])
371
- ),
372
- proof(
373
- goal(not_member(f, [e, d, b, a])),
374
- by(builtin(not_member, 2))
375
- ),
376
- proof(
377
- goal(path(f, f, [f, e, d, b, a], [f], 0)),
378
- by(fact("dijkstra.pl", clause(7))),
379
- bindings([binding("Goal", f), binding("_Visited", [f, e, d, b, a])])
380
- ),
381
- proof(
382
- goal(add(3, 0, 3)),
383
- by(builtin(add, 3))
384
- )
385
- ])
386
- ),
387
- proof(
388
- goal(add(2, 3, 5)),
389
- by(builtin(add, 3))
390
- )
391
- ])
392
- ),
393
- proof(
394
- goal(add(5, 5, 10)),
395
- by(builtin(add, 3))
396
- )
397
- ])
398
- ),
399
- proof(
400
- goal(add(4, 10, 14)),
401
- by(builtin(add, 3))
402
- )
403
- ])
404
- ),
405
- proof(
406
- goal(le(14, 16)),
407
- by(builtin(le, 2))
408
- )
409
- ])
410
- )
411
- ).
412
-
413
11
  path([a, f], [[a, b, d, f], 15]).
414
- why(
415
- path([a, f], [[a, b, d, f], 15]),
416
- proof(
417
- goal(path([a, f], [[a, b, d, f], 15])),
418
- by(rule("dijkstra.pl", clause(10))),
419
- bindings([binding("Path", [a, b, d, f]), binding("Cost", 15)]),
420
- uses([
421
- proof(
422
- goal(path(a, f, [a], [a, b, d, f], 15)),
423
- by(rule("dijkstra.pl", clause(8))),
424
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [b, d, f]), binding("Cost", 15), binding("Next", b), binding("StepCost", 4), binding("RestCost", 11)]),
425
- uses([
426
- proof(
427
- goal(link(a, b, 4)),
428
- by(rule("dijkstra.pl", clause(5))),
429
- bindings([binding("A", a), binding("B", b), binding("Cost", 4)]),
430
- uses([
431
- proof(
432
- goal(base_link(a, b, 4)),
433
- by(rule("dijkstra.pl", clause(4))),
434
- bindings([binding("A", a), binding("B", b), binding("Cost", 4), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
435
- uses([
436
- proof(
437
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
438
- by(fact("dijkstra.pl", clause(3)))
439
- ),
440
- proof(
441
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(b, 4))),
442
- by(builtin(formula_binary, 4))
443
- )
444
- ])
445
- )
446
- ])
447
- ),
448
- proof(
449
- goal(not_member(b, [a])),
450
- by(builtin(not_member, 2))
451
- ),
452
- proof(
453
- goal(path(b, f, [b, a], [b, d, f], 11)),
454
- by(rule("dijkstra.pl", clause(8))),
455
- bindings([binding("Node", b), binding("Goal", f), binding("Visited", [b, a]), binding("Path", [d, f]), binding("Cost", 11), binding("Next", d), binding("StepCost", 5), binding("RestCost", 6)]),
456
- uses([
457
- proof(
458
- goal(link(b, d, 5)),
459
- by(rule("dijkstra.pl", clause(5))),
460
- bindings([binding("A", b), binding("B", d), binding("Cost", 5)]),
461
- uses([
462
- proof(
463
- goal(base_link(b, d, 5)),
464
- by(rule("dijkstra.pl", clause(4))),
465
- bindings([binding("A", b), binding("B", d), binding("Cost", 5), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
466
- uses([
467
- proof(
468
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
469
- by(fact("dijkstra.pl", clause(3)))
470
- ),
471
- proof(
472
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(d, 5))),
473
- by(builtin(formula_binary, 4))
474
- )
475
- ])
476
- )
477
- ])
478
- ),
479
- proof(
480
- goal(not_member(d, [b, a])),
481
- by(builtin(not_member, 2))
482
- ),
483
- proof(
484
- goal(path(d, f, [d, b, a], [d, f], 6)),
485
- by(rule("dijkstra.pl", clause(8))),
486
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, b, a]), binding("Path", [f]), binding("Cost", 6), binding("Next", f), binding("StepCost", 6), binding("RestCost", 0)]),
487
- uses([
488
- proof(
489
- goal(link(d, f, 6)),
490
- by(rule("dijkstra.pl", clause(5))),
491
- bindings([binding("A", d), binding("B", f), binding("Cost", 6)]),
492
- uses([
493
- proof(
494
- goal(base_link(d, f, 6)),
495
- by(rule("dijkstra.pl", clause(4))),
496
- bindings([binding("A", d), binding("B", f), binding("Cost", 6), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
497
- uses([
498
- proof(
499
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
500
- by(fact("dijkstra.pl", clause(3)))
501
- ),
502
- proof(
503
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(f, 6))),
504
- by(builtin(formula_binary, 4))
505
- )
506
- ])
507
- )
508
- ])
509
- ),
510
- proof(
511
- goal(not_member(f, [d, b, a])),
512
- by(builtin(not_member, 2))
513
- ),
514
- proof(
515
- goal(path(f, f, [f, d, b, a], [f], 0)),
516
- by(fact("dijkstra.pl", clause(7))),
517
- bindings([binding("Goal", f), binding("_Visited", [f, d, b, a])])
518
- ),
519
- proof(
520
- goal(add(6, 0, 6)),
521
- by(builtin(add, 3))
522
- )
523
- ])
524
- ),
525
- proof(
526
- goal(add(5, 6, 11)),
527
- by(builtin(add, 3))
528
- )
529
- ])
530
- ),
531
- proof(
532
- goal(add(4, 11, 15)),
533
- by(builtin(add, 3))
534
- )
535
- ])
536
- ),
537
- proof(
538
- goal(le(15, 16)),
539
- by(builtin(le, 2))
540
- )
541
- ])
542
- )
543
- ).
544
-
545
12
  path([a, f], [[a, c, d, e, f], 15]).
546
- why(
547
- path([a, f], [[a, c, d, e, f], 15]),
548
- proof(
549
- goal(path([a, f], [[a, c, d, e, f], 15])),
550
- by(rule("dijkstra.pl", clause(10))),
551
- bindings([binding("Path", [a, c, d, e, f]), binding("Cost", 15)]),
552
- uses([
553
- proof(
554
- goal(path(a, f, [a], [a, c, d, e, f], 15)),
555
- by(rule("dijkstra.pl", clause(8))),
556
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [c, d, e, f]), binding("Cost", 15), binding("Next", c), binding("StepCost", 2), binding("RestCost", 13)]),
557
- uses([
558
- proof(
559
- goal(link(a, c, 2)),
560
- by(rule("dijkstra.pl", clause(5))),
561
- bindings([binding("A", a), binding("B", c), binding("Cost", 2)]),
562
- uses([
563
- proof(
564
- goal(base_link(a, c, 2)),
565
- by(rule("dijkstra.pl", clause(4))),
566
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
567
- uses([
568
- proof(
569
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
570
- by(fact("dijkstra.pl", clause(3)))
571
- ),
572
- proof(
573
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
574
- by(builtin(formula_binary, 4))
575
- )
576
- ])
577
- )
578
- ])
579
- ),
580
- proof(
581
- goal(not_member(c, [a])),
582
- by(builtin(not_member, 2))
583
- ),
584
- proof(
585
- goal(path(c, f, [c, a], [c, d, e, f], 13)),
586
- by(rule("dijkstra.pl", clause(8))),
587
- bindings([binding("Node", c), binding("Goal", f), binding("Visited", [c, a]), binding("Path", [d, e, f]), binding("Cost", 13), binding("Next", d), binding("StepCost", 8), binding("RestCost", 5)]),
588
- uses([
589
- proof(
590
- goal(link(c, d, 8)),
591
- by(rule("dijkstra.pl", clause(5))),
592
- bindings([binding("A", c), binding("B", d), binding("Cost", 8)]),
593
- uses([
594
- proof(
595
- goal(base_link(c, d, 8)),
596
- by(rule("dijkstra.pl", clause(4))),
597
- bindings([binding("A", c), binding("B", d), binding("Cost", 8), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
598
- uses([
599
- proof(
600
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
601
- by(fact("dijkstra.pl", clause(3)))
602
- ),
603
- proof(
604
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), c, edge, arc(d, 8))),
605
- by(builtin(formula_binary, 4))
606
- )
607
- ])
608
- )
609
- ])
610
- ),
611
- proof(
612
- goal(not_member(d, [c, a])),
613
- by(builtin(not_member, 2))
614
- ),
615
- proof(
616
- goal(path(d, f, [d, c, a], [d, e, f], 5)),
617
- by(rule("dijkstra.pl", clause(8))),
618
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, c, a]), binding("Path", [e, f]), binding("Cost", 5), binding("Next", e), binding("StepCost", 2), binding("RestCost", 3)]),
619
- uses([
620
- proof(
621
- goal(link(d, e, 2)),
622
- by(rule("dijkstra.pl", clause(5))),
623
- bindings([binding("A", d), binding("B", e), binding("Cost", 2)]),
624
- uses([
625
- proof(
626
- goal(base_link(d, e, 2)),
627
- by(rule("dijkstra.pl", clause(4))),
628
- bindings([binding("A", d), binding("B", e), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
629
- uses([
630
- proof(
631
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
632
- by(fact("dijkstra.pl", clause(3)))
633
- ),
634
- proof(
635
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(e, 2))),
636
- by(builtin(formula_binary, 4))
637
- )
638
- ])
639
- )
640
- ])
641
- ),
642
- proof(
643
- goal(not_member(e, [d, c, a])),
644
- by(builtin(not_member, 2))
645
- ),
646
- proof(
647
- goal(path(e, f, [e, d, c, a], [e, f], 3)),
648
- by(rule("dijkstra.pl", clause(8))),
649
- bindings([binding("Node", e), binding("Goal", f), binding("Visited", [e, d, c, a]), binding("Path", [f]), binding("Cost", 3), binding("Next", f), binding("StepCost", 3), binding("RestCost", 0)]),
650
- uses([
651
- proof(
652
- goal(link(e, f, 3)),
653
- by(rule("dijkstra.pl", clause(5))),
654
- bindings([binding("A", e), binding("B", f), binding("Cost", 3)]),
655
- uses([
656
- proof(
657
- goal(base_link(e, f, 3)),
658
- by(rule("dijkstra.pl", clause(4))),
659
- bindings([binding("A", e), binding("B", f), binding("Cost", 3), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
660
- uses([
661
- proof(
662
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
663
- by(fact("dijkstra.pl", clause(3)))
664
- ),
665
- proof(
666
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), e, edge, arc(f, 3))),
667
- by(builtin(formula_binary, 4))
668
- )
669
- ])
670
- )
671
- ])
672
- ),
673
- proof(
674
- goal(not_member(f, [e, d, c, a])),
675
- by(builtin(not_member, 2))
676
- ),
677
- proof(
678
- goal(path(f, f, [f, e, d, c, a], [f], 0)),
679
- by(fact("dijkstra.pl", clause(7))),
680
- bindings([binding("Goal", f), binding("_Visited", [f, e, d, c, a])])
681
- ),
682
- proof(
683
- goal(add(3, 0, 3)),
684
- by(builtin(add, 3))
685
- )
686
- ])
687
- ),
688
- proof(
689
- goal(add(2, 3, 5)),
690
- by(builtin(add, 3))
691
- )
692
- ])
693
- ),
694
- proof(
695
- goal(add(8, 5, 13)),
696
- by(builtin(add, 3))
697
- )
698
- ])
699
- ),
700
- proof(
701
- goal(add(2, 13, 15)),
702
- by(builtin(add, 3))
703
- )
704
- ])
705
- ),
706
- proof(
707
- goal(le(15, 16)),
708
- by(builtin(le, 2))
709
- )
710
- ])
711
- )
712
- ).
713
-
714
13
  path([a, f], [[a, c, d, f], 16]).
715
- why(
716
- path([a, f], [[a, c, d, f], 16]),
717
- proof(
718
- goal(path([a, f], [[a, c, d, f], 16])),
719
- by(rule("dijkstra.pl", clause(10))),
720
- bindings([binding("Path", [a, c, d, f]), binding("Cost", 16)]),
721
- uses([
722
- proof(
723
- goal(path(a, f, [a], [a, c, d, f], 16)),
724
- by(rule("dijkstra.pl", clause(8))),
725
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [c, d, f]), binding("Cost", 16), binding("Next", c), binding("StepCost", 2), binding("RestCost", 14)]),
726
- uses([
727
- proof(
728
- goal(link(a, c, 2)),
729
- by(rule("dijkstra.pl", clause(5))),
730
- bindings([binding("A", a), binding("B", c), binding("Cost", 2)]),
731
- uses([
732
- proof(
733
- goal(base_link(a, c, 2)),
734
- by(rule("dijkstra.pl", clause(4))),
735
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
736
- uses([
737
- proof(
738
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
739
- by(fact("dijkstra.pl", clause(3)))
740
- ),
741
- proof(
742
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
743
- by(builtin(formula_binary, 4))
744
- )
745
- ])
746
- )
747
- ])
748
- ),
749
- proof(
750
- goal(not_member(c, [a])),
751
- by(builtin(not_member, 2))
752
- ),
753
- proof(
754
- goal(path(c, f, [c, a], [c, d, f], 14)),
755
- by(rule("dijkstra.pl", clause(8))),
756
- bindings([binding("Node", c), binding("Goal", f), binding("Visited", [c, a]), binding("Path", [d, f]), binding("Cost", 14), binding("Next", d), binding("StepCost", 8), binding("RestCost", 6)]),
757
- uses([
758
- proof(
759
- goal(link(c, d, 8)),
760
- by(rule("dijkstra.pl", clause(5))),
761
- bindings([binding("A", c), binding("B", d), binding("Cost", 8)]),
762
- uses([
763
- proof(
764
- goal(base_link(c, d, 8)),
765
- by(rule("dijkstra.pl", clause(4))),
766
- bindings([binding("A", c), binding("B", d), binding("Cost", 8), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
767
- uses([
768
- proof(
769
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
770
- by(fact("dijkstra.pl", clause(3)))
771
- ),
772
- proof(
773
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), c, edge, arc(d, 8))),
774
- by(builtin(formula_binary, 4))
775
- )
776
- ])
777
- )
778
- ])
779
- ),
780
- proof(
781
- goal(not_member(d, [c, a])),
782
- by(builtin(not_member, 2))
783
- ),
784
- proof(
785
- goal(path(d, f, [d, c, a], [d, f], 6)),
786
- by(rule("dijkstra.pl", clause(8))),
787
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, c, a]), binding("Path", [f]), binding("Cost", 6), binding("Next", f), binding("StepCost", 6), binding("RestCost", 0)]),
788
- uses([
789
- proof(
790
- goal(link(d, f, 6)),
791
- by(rule("dijkstra.pl", clause(5))),
792
- bindings([binding("A", d), binding("B", f), binding("Cost", 6)]),
793
- uses([
794
- proof(
795
- goal(base_link(d, f, 6)),
796
- by(rule("dijkstra.pl", clause(4))),
797
- bindings([binding("A", d), binding("B", f), binding("Cost", 6), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
798
- uses([
799
- proof(
800
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
801
- by(fact("dijkstra.pl", clause(3)))
802
- ),
803
- proof(
804
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(f, 6))),
805
- by(builtin(formula_binary, 4))
806
- )
807
- ])
808
- )
809
- ])
810
- ),
811
- proof(
812
- goal(not_member(f, [d, c, a])),
813
- by(builtin(not_member, 2))
814
- ),
815
- proof(
816
- goal(path(f, f, [f, d, c, a], [f], 0)),
817
- by(fact("dijkstra.pl", clause(7))),
818
- bindings([binding("Goal", f), binding("_Visited", [f, d, c, a])])
819
- ),
820
- proof(
821
- goal(add(6, 0, 6)),
822
- by(builtin(add, 3))
823
- )
824
- ])
825
- ),
826
- proof(
827
- goal(add(8, 6, 14)),
828
- by(builtin(add, 3))
829
- )
830
- ])
831
- ),
832
- proof(
833
- goal(add(2, 14, 16)),
834
- by(builtin(add, 3))
835
- )
836
- ])
837
- ),
838
- proof(
839
- goal(le(16, 16)),
840
- by(builtin(le, 2))
841
- )
842
- ])
843
- )
844
- ).
845
-
846
14
  path([a, f], [[a, c, e, f], 15]).
847
- why(
848
- path([a, f], [[a, c, e, f], 15]),
849
- proof(
850
- goal(path([a, f], [[a, c, e, f], 15])),
851
- by(rule("dijkstra.pl", clause(10))),
852
- bindings([binding("Path", [a, c, e, f]), binding("Cost", 15)]),
853
- uses([
854
- proof(
855
- goal(path(a, f, [a], [a, c, e, f], 15)),
856
- by(rule("dijkstra.pl", clause(8))),
857
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [c, e, f]), binding("Cost", 15), binding("Next", c), binding("StepCost", 2), binding("RestCost", 13)]),
858
- uses([
859
- proof(
860
- goal(link(a, c, 2)),
861
- by(rule("dijkstra.pl", clause(5))),
862
- bindings([binding("A", a), binding("B", c), binding("Cost", 2)]),
863
- uses([
864
- proof(
865
- goal(base_link(a, c, 2)),
866
- by(rule("dijkstra.pl", clause(4))),
867
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
868
- uses([
869
- proof(
870
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
871
- by(fact("dijkstra.pl", clause(3)))
872
- ),
873
- proof(
874
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
875
- by(builtin(formula_binary, 4))
876
- )
877
- ])
878
- )
879
- ])
880
- ),
881
- proof(
882
- goal(not_member(c, [a])),
883
- by(builtin(not_member, 2))
884
- ),
885
- proof(
886
- goal(path(c, f, [c, a], [c, e, f], 13)),
887
- by(rule("dijkstra.pl", clause(8))),
888
- bindings([binding("Node", c), binding("Goal", f), binding("Visited", [c, a]), binding("Path", [e, f]), binding("Cost", 13), binding("Next", e), binding("StepCost", 10), binding("RestCost", 3)]),
889
- uses([
890
- proof(
891
- goal(link(c, e, 10)),
892
- by(rule("dijkstra.pl", clause(5))),
893
- bindings([binding("A", c), binding("B", e), binding("Cost", 10)]),
894
- uses([
895
- proof(
896
- goal(base_link(c, e, 10)),
897
- by(rule("dijkstra.pl", clause(4))),
898
- bindings([binding("A", c), binding("B", e), binding("Cost", 10), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
899
- uses([
900
- proof(
901
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
902
- by(fact("dijkstra.pl", clause(3)))
903
- ),
904
- proof(
905
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), c, edge, arc(e, 10))),
906
- by(builtin(formula_binary, 4))
907
- )
908
- ])
909
- )
910
- ])
911
- ),
912
- proof(
913
- goal(not_member(e, [c, a])),
914
- by(builtin(not_member, 2))
915
- ),
916
- proof(
917
- goal(path(e, f, [e, c, a], [e, f], 3)),
918
- by(rule("dijkstra.pl", clause(8))),
919
- bindings([binding("Node", e), binding("Goal", f), binding("Visited", [e, c, a]), binding("Path", [f]), binding("Cost", 3), binding("Next", f), binding("StepCost", 3), binding("RestCost", 0)]),
920
- uses([
921
- proof(
922
- goal(link(e, f, 3)),
923
- by(rule("dijkstra.pl", clause(5))),
924
- bindings([binding("A", e), binding("B", f), binding("Cost", 3)]),
925
- uses([
926
- proof(
927
- goal(base_link(e, f, 3)),
928
- by(rule("dijkstra.pl", clause(4))),
929
- bindings([binding("A", e), binding("B", f), binding("Cost", 3), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
930
- uses([
931
- proof(
932
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
933
- by(fact("dijkstra.pl", clause(3)))
934
- ),
935
- proof(
936
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), e, edge, arc(f, 3))),
937
- by(builtin(formula_binary, 4))
938
- )
939
- ])
940
- )
941
- ])
942
- ),
943
- proof(
944
- goal(not_member(f, [e, c, a])),
945
- by(builtin(not_member, 2))
946
- ),
947
- proof(
948
- goal(path(f, f, [f, e, c, a], [f], 0)),
949
- by(fact("dijkstra.pl", clause(7))),
950
- bindings([binding("Goal", f), binding("_Visited", [f, e, c, a])])
951
- ),
952
- proof(
953
- goal(add(3, 0, 3)),
954
- by(builtin(add, 3))
955
- )
956
- ])
957
- ),
958
- proof(
959
- goal(add(10, 3, 13)),
960
- by(builtin(add, 3))
961
- )
962
- ])
963
- ),
964
- proof(
965
- goal(add(2, 13, 15)),
966
- by(builtin(add, 3))
967
- )
968
- ])
969
- ),
970
- proof(
971
- goal(le(15, 16)),
972
- by(builtin(le, 2))
973
- )
974
- ])
975
- )
976
- ).
977
-
978
15
  path([a, f], [[a, c, b, d, e, f], 13]).
979
- why(
980
- path([a, f], [[a, c, b, d, e, f], 13]),
981
- proof(
982
- goal(path([a, f], [[a, c, b, d, e, f], 13])),
983
- by(rule("dijkstra.pl", clause(10))),
984
- bindings([binding("Path", [a, c, b, d, e, f]), binding("Cost", 13)]),
985
- uses([
986
- proof(
987
- goal(path(a, f, [a], [a, c, b, d, e, f], 13)),
988
- by(rule("dijkstra.pl", clause(8))),
989
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [c, b, d, e, f]), binding("Cost", 13), binding("Next", c), binding("StepCost", 2), binding("RestCost", 11)]),
990
- uses([
991
- proof(
992
- goal(link(a, c, 2)),
993
- by(rule("dijkstra.pl", clause(5))),
994
- bindings([binding("A", a), binding("B", c), binding("Cost", 2)]),
995
- uses([
996
- proof(
997
- goal(base_link(a, c, 2)),
998
- by(rule("dijkstra.pl", clause(4))),
999
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1000
- uses([
1001
- proof(
1002
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1003
- by(fact("dijkstra.pl", clause(3)))
1004
- ),
1005
- proof(
1006
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
1007
- by(builtin(formula_binary, 4))
1008
- )
1009
- ])
1010
- )
1011
- ])
1012
- ),
1013
- proof(
1014
- goal(not_member(c, [a])),
1015
- by(builtin(not_member, 2))
1016
- ),
1017
- proof(
1018
- goal(path(c, f, [c, a], [c, b, d, e, f], 11)),
1019
- by(rule("dijkstra.pl", clause(8))),
1020
- bindings([binding("Node", c), binding("Goal", f), binding("Visited", [c, a]), binding("Path", [b, d, e, f]), binding("Cost", 11), binding("Next", b), binding("StepCost", 1), binding("RestCost", 10)]),
1021
- uses([
1022
- proof(
1023
- goal(link(c, b, 1)),
1024
- by(rule("dijkstra.pl", clause(6))),
1025
- bindings([binding("B", c), binding("A", b), binding("Cost", 1)]),
1026
- uses([
1027
- proof(
1028
- goal(base_link(b, c, 1)),
1029
- by(rule("dijkstra.pl", clause(4))),
1030
- bindings([binding("A", b), binding("B", c), binding("Cost", 1), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1031
- uses([
1032
- proof(
1033
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1034
- by(fact("dijkstra.pl", clause(3)))
1035
- ),
1036
- proof(
1037
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(c, 1))),
1038
- by(builtin(formula_binary, 4))
1039
- )
1040
- ])
1041
- )
1042
- ])
1043
- ),
1044
- proof(
1045
- goal(not_member(b, [c, a])),
1046
- by(builtin(not_member, 2))
1047
- ),
1048
- proof(
1049
- goal(path(b, f, [b, c, a], [b, d, e, f], 10)),
1050
- by(rule("dijkstra.pl", clause(8))),
1051
- bindings([binding("Node", b), binding("Goal", f), binding("Visited", [b, c, a]), binding("Path", [d, e, f]), binding("Cost", 10), binding("Next", d), binding("StepCost", 5), binding("RestCost", 5)]),
1052
- uses([
1053
- proof(
1054
- goal(link(b, d, 5)),
1055
- by(rule("dijkstra.pl", clause(5))),
1056
- bindings([binding("A", b), binding("B", d), binding("Cost", 5)]),
1057
- uses([
1058
- proof(
1059
- goal(base_link(b, d, 5)),
1060
- by(rule("dijkstra.pl", clause(4))),
1061
- bindings([binding("A", b), binding("B", d), binding("Cost", 5), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1062
- uses([
1063
- proof(
1064
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1065
- by(fact("dijkstra.pl", clause(3)))
1066
- ),
1067
- proof(
1068
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(d, 5))),
1069
- by(builtin(formula_binary, 4))
1070
- )
1071
- ])
1072
- )
1073
- ])
1074
- ),
1075
- proof(
1076
- goal(not_member(d, [b, c, a])),
1077
- by(builtin(not_member, 2))
1078
- ),
1079
- proof(
1080
- goal(path(d, f, [d, b, c, a], [d, e, f], 5)),
1081
- by(rule("dijkstra.pl", clause(8))),
1082
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, b, c, a]), binding("Path", [e, f]), binding("Cost", 5), binding("Next", e), binding("StepCost", 2), binding("RestCost", 3)]),
1083
- uses([
1084
- proof(
1085
- goal(link(d, e, 2)),
1086
- by(rule("dijkstra.pl", clause(5))),
1087
- bindings([binding("A", d), binding("B", e), binding("Cost", 2)]),
1088
- uses([
1089
- proof(
1090
- goal(base_link(d, e, 2)),
1091
- by(rule("dijkstra.pl", clause(4))),
1092
- bindings([binding("A", d), binding("B", e), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1093
- uses([
1094
- proof(
1095
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1096
- by(fact("dijkstra.pl", clause(3)))
1097
- ),
1098
- proof(
1099
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(e, 2))),
1100
- by(builtin(formula_binary, 4))
1101
- )
1102
- ])
1103
- )
1104
- ])
1105
- ),
1106
- proof(
1107
- goal(not_member(e, [d, b, c, a])),
1108
- by(builtin(not_member, 2))
1109
- ),
1110
- proof(
1111
- goal(path(e, f, [e, d, b, c, a], [e, f], 3)),
1112
- by(rule("dijkstra.pl", clause(8))),
1113
- bindings([binding("Node", e), binding("Goal", f), binding("Visited", [e, d, b, c, a]), binding("Path", [f]), binding("Cost", 3), binding("Next", f), binding("StepCost", 3), binding("RestCost", 0)]),
1114
- uses([
1115
- proof(
1116
- goal(link(e, f, 3)),
1117
- by(rule("dijkstra.pl", clause(5))),
1118
- bindings([binding("A", e), binding("B", f), binding("Cost", 3)]),
1119
- uses([
1120
- proof(
1121
- goal(base_link(e, f, 3)),
1122
- by(rule("dijkstra.pl", clause(4))),
1123
- bindings([binding("A", e), binding("B", f), binding("Cost", 3), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1124
- uses([
1125
- proof(
1126
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1127
- by(fact("dijkstra.pl", clause(3)))
1128
- ),
1129
- proof(
1130
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), e, edge, arc(f, 3))),
1131
- by(builtin(formula_binary, 4))
1132
- )
1133
- ])
1134
- )
1135
- ])
1136
- ),
1137
- proof(
1138
- goal(not_member(f, [e, d, b, c, a])),
1139
- by(builtin(not_member, 2))
1140
- ),
1141
- proof(
1142
- goal(path(f, f, [f, e, d, b, c, a], [f], 0)),
1143
- by(fact("dijkstra.pl", clause(7))),
1144
- bindings([binding("Goal", f), binding("_Visited", [f, e, d, b, c, a])])
1145
- ),
1146
- proof(
1147
- goal(add(3, 0, 3)),
1148
- by(builtin(add, 3))
1149
- )
1150
- ])
1151
- ),
1152
- proof(
1153
- goal(add(2, 3, 5)),
1154
- by(builtin(add, 3))
1155
- )
1156
- ])
1157
- ),
1158
- proof(
1159
- goal(add(5, 5, 10)),
1160
- by(builtin(add, 3))
1161
- )
1162
- ])
1163
- ),
1164
- proof(
1165
- goal(add(1, 10, 11)),
1166
- by(builtin(add, 3))
1167
- )
1168
- ])
1169
- ),
1170
- proof(
1171
- goal(add(2, 11, 13)),
1172
- by(builtin(add, 3))
1173
- )
1174
- ])
1175
- ),
1176
- proof(
1177
- goal(le(13, 16)),
1178
- by(builtin(le, 2))
1179
- )
1180
- ])
1181
- )
1182
- ).
1183
-
1184
16
  path([a, f], [[a, c, b, d, f], 14]).
1185
- why(
1186
- path([a, f], [[a, c, b, d, f], 14]),
1187
- proof(
1188
- goal(path([a, f], [[a, c, b, d, f], 14])),
1189
- by(rule("dijkstra.pl", clause(10))),
1190
- bindings([binding("Path", [a, c, b, d, f]), binding("Cost", 14)]),
1191
- uses([
1192
- proof(
1193
- goal(path(a, f, [a], [a, c, b, d, f], 14)),
1194
- by(rule("dijkstra.pl", clause(8))),
1195
- bindings([binding("Node", a), binding("Goal", f), binding("Visited", [a]), binding("Path", [c, b, d, f]), binding("Cost", 14), binding("Next", c), binding("StepCost", 2), binding("RestCost", 12)]),
1196
- uses([
1197
- proof(
1198
- goal(link(a, c, 2)),
1199
- by(rule("dijkstra.pl", clause(5))),
1200
- bindings([binding("A", a), binding("B", c), binding("Cost", 2)]),
1201
- uses([
1202
- proof(
1203
- goal(base_link(a, c, 2)),
1204
- by(rule("dijkstra.pl", clause(4))),
1205
- bindings([binding("A", a), binding("B", c), binding("Cost", 2), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1206
- uses([
1207
- proof(
1208
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1209
- by(fact("dijkstra.pl", clause(3)))
1210
- ),
1211
- proof(
1212
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), a, edge, arc(c, 2))),
1213
- by(builtin(formula_binary, 4))
1214
- )
1215
- ])
1216
- )
1217
- ])
1218
- ),
1219
- proof(
1220
- goal(not_member(c, [a])),
1221
- by(builtin(not_member, 2))
1222
- ),
1223
- proof(
1224
- goal(path(c, f, [c, a], [c, b, d, f], 12)),
1225
- by(rule("dijkstra.pl", clause(8))),
1226
- bindings([binding("Node", c), binding("Goal", f), binding("Visited", [c, a]), binding("Path", [b, d, f]), binding("Cost", 12), binding("Next", b), binding("StepCost", 1), binding("RestCost", 11)]),
1227
- uses([
1228
- proof(
1229
- goal(link(c, b, 1)),
1230
- by(rule("dijkstra.pl", clause(6))),
1231
- bindings([binding("B", c), binding("A", b), binding("Cost", 1)]),
1232
- uses([
1233
- proof(
1234
- goal(base_link(b, c, 1)),
1235
- by(rule("dijkstra.pl", clause(4))),
1236
- bindings([binding("A", b), binding("B", c), binding("Cost", 1), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1237
- uses([
1238
- proof(
1239
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1240
- by(fact("dijkstra.pl", clause(3)))
1241
- ),
1242
- proof(
1243
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(c, 1))),
1244
- by(builtin(formula_binary, 4))
1245
- )
1246
- ])
1247
- )
1248
- ])
1249
- ),
1250
- proof(
1251
- goal(not_member(b, [c, a])),
1252
- by(builtin(not_member, 2))
1253
- ),
1254
- proof(
1255
- goal(path(b, f, [b, c, a], [b, d, f], 11)),
1256
- by(rule("dijkstra.pl", clause(8))),
1257
- bindings([binding("Node", b), binding("Goal", f), binding("Visited", [b, c, a]), binding("Path", [d, f]), binding("Cost", 11), binding("Next", d), binding("StepCost", 5), binding("RestCost", 6)]),
1258
- uses([
1259
- proof(
1260
- goal(link(b, d, 5)),
1261
- by(rule("dijkstra.pl", clause(5))),
1262
- bindings([binding("A", b), binding("B", d), binding("Cost", 5)]),
1263
- uses([
1264
- proof(
1265
- goal(base_link(b, d, 5)),
1266
- by(rule("dijkstra.pl", clause(4))),
1267
- bindings([binding("A", b), binding("B", d), binding("Cost", 5), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1268
- uses([
1269
- proof(
1270
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1271
- by(fact("dijkstra.pl", clause(3)))
1272
- ),
1273
- proof(
1274
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), b, edge, arc(d, 5))),
1275
- by(builtin(formula_binary, 4))
1276
- )
1277
- ])
1278
- )
1279
- ])
1280
- ),
1281
- proof(
1282
- goal(not_member(d, [b, c, a])),
1283
- by(builtin(not_member, 2))
1284
- ),
1285
- proof(
1286
- goal(path(d, f, [d, b, c, a], [d, f], 6)),
1287
- by(rule("dijkstra.pl", clause(8))),
1288
- bindings([binding("Node", d), binding("Goal", f), binding("Visited", [d, b, c, a]), binding("Path", [f]), binding("Cost", 6), binding("Next", f), binding("StepCost", 6), binding("RestCost", 0)]),
1289
- uses([
1290
- proof(
1291
- goal(link(d, f, 6)),
1292
- by(rule("dijkstra.pl", clause(5))),
1293
- bindings([binding("A", d), binding("B", f), binding("Cost", 6)]),
1294
- uses([
1295
- proof(
1296
- goal(base_link(d, f, 6)),
1297
- by(rule("dijkstra.pl", clause(4))),
1298
- bindings([binding("A", d), binding("B", f), binding("Cost", 6), binding("Formula", (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))]),
1299
- uses([
1300
- proof(
1301
- goal(weighted_graph(dijkstraGraph, (edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))))),
1302
- by(fact("dijkstra.pl", clause(3)))
1303
- ),
1304
- proof(
1305
- goal(formula_binary((edge(a, arc(b, 4)), edge(a, arc(c, 2)), edge(b, arc(c, 1)), edge(b, arc(d, 5)), edge(c, arc(d, 8)), edge(c, arc(e, 10)), edge(d, arc(e, 2)), edge(d, arc(f, 6)), edge(e, arc(f, 3))), d, edge, arc(f, 6))),
1306
- by(builtin(formula_binary, 4))
1307
- )
1308
- ])
1309
- )
1310
- ])
1311
- ),
1312
- proof(
1313
- goal(not_member(f, [d, b, c, a])),
1314
- by(builtin(not_member, 2))
1315
- ),
1316
- proof(
1317
- goal(path(f, f, [f, d, b, c, a], [f], 0)),
1318
- by(fact("dijkstra.pl", clause(7))),
1319
- bindings([binding("Goal", f), binding("_Visited", [f, d, b, c, a])])
1320
- ),
1321
- proof(
1322
- goal(add(6, 0, 6)),
1323
- by(builtin(add, 3))
1324
- )
1325
- ])
1326
- ),
1327
- proof(
1328
- goal(add(5, 6, 11)),
1329
- by(builtin(add, 3))
1330
- )
1331
- ])
1332
- ),
1333
- proof(
1334
- goal(add(1, 11, 12)),
1335
- by(builtin(add, 3))
1336
- )
1337
- ])
1338
- ),
1339
- proof(
1340
- goal(add(2, 12, 14)),
1341
- by(builtin(add, 3))
1342
- )
1343
- ])
1344
- ),
1345
- proof(
1346
- goal(le(14, 16)),
1347
- by(builtin(le, 2))
1348
- )
1349
- ])
1350
- )
1351
- ).
1352
-