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,903 +1,3 @@
1
1
  solution(puzzle, [goat, nothing, wolf, goat, cabbage, nothing, goat]).
2
- why(
3
- solution(puzzle, [goat, nothing, wolf, goat, cabbage, nothing, goat]),
4
- proof(
5
- goal(solution(puzzle, [goat, nothing, wolf, goat, cabbage, nothing, goat])),
6
- by(rule("wolf-goat-cabbage.pl", clause(16))),
7
- bindings([binding("Moves", [goat, nothing, wolf, goat, cabbage, nothing, goat])]),
8
- uses([
9
- proof(
10
- goal(solution([goat, nothing, wolf, goat, cabbage, nothing, goat])),
11
- by(rule("wolf-goat-cabbage.pl", clause(4))),
12
- bindings([binding("Moves", [goat, nothing, wolf, goat, cabbage, nothing, goat])]),
13
- uses([
14
- proof(
15
- goal(solve([w, w, w, w], [e, e, e, e], [[w, w, w, w]], [goat, nothing, wolf, goat, cabbage, nothing, goat])),
16
- by(rule("wolf-goat-cabbage.pl", clause(6))),
17
- bindings([binding("Config", [w, w, w, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, w, w]]), binding("Move", goat), binding("Rest", [nothing, wolf, goat, cabbage, nothing, goat]), binding("NextConfig", [e, w, e, w])]),
18
- uses([
19
- proof(
20
- goal(move([w, w, w, w], goat, [e, w, e, w])),
21
- by(rule("wolf-goat-cabbage.pl", clause(8))),
22
- bindings([binding("X", w), binding("Wolf", w), binding("Cabbage", w), binding("Y", e)]),
23
- uses([
24
- proof(
25
- goal(change(w, e)),
26
- by(fact("wolf-goat-cabbage.pl", clause(12)))
27
- )
28
- ])
29
- ),
30
- proof(
31
- goal(safe([e, w, e, w])),
32
- by(rule("wolf-goat-cabbage.pl", clause(13))),
33
- bindings([binding("Man", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
34
- uses([
35
- proof(
36
- goal(one_eq(e, e, w)),
37
- by(fact("wolf-goat-cabbage.pl", clause(14))),
38
- bindings([binding("X", e), binding("__anon0", w)])
39
- ),
40
- proof(
41
- goal(one_eq(e, e, w)),
42
- by(fact("wolf-goat-cabbage.pl", clause(14))),
43
- bindings([binding("X", e), binding("__anon0", w)])
44
- )
45
- ])
46
- ),
47
- proof(
48
- goal(not_member([e, w, e, w], [[w, w, w, w]])),
49
- by(builtin(not_member, 2))
50
- ),
51
- proof(
52
- goal(solve([e, w, e, w], [e, e, e, e], [[e, w, e, w], [w, w, w, w]], [nothing, wolf, goat, cabbage, nothing, goat])),
53
- by(rule("wolf-goat-cabbage.pl", clause(6))),
54
- bindings([binding("Config", [e, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [wolf, goat, cabbage, nothing, goat]), binding("NextConfig", [w, w, e, w])]),
55
- uses([
56
- proof(
57
- goal(move([e, w, e, w], nothing, [w, w, e, w])),
58
- by(rule("wolf-goat-cabbage.pl", clause(10))),
59
- bindings([binding("X", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w), binding("Y", w)]),
60
- uses([
61
- proof(
62
- goal(change(e, w)),
63
- by(fact("wolf-goat-cabbage.pl", clause(11)))
64
- )
65
- ])
66
- ),
67
- proof(
68
- goal(safe([w, w, e, w])),
69
- by(rule("wolf-goat-cabbage.pl", clause(13))),
70
- bindings([binding("Man", w), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
71
- uses([
72
- proof(
73
- goal(one_eq(w, e, w)),
74
- by(fact("wolf-goat-cabbage.pl", clause(15))),
75
- bindings([binding("X", w), binding("__anon1", e)])
76
- ),
77
- proof(
78
- goal(one_eq(w, e, w)),
79
- by(fact("wolf-goat-cabbage.pl", clause(15))),
80
- bindings([binding("X", w), binding("__anon1", e)])
81
- )
82
- ])
83
- ),
84
- proof(
85
- goal(not_member([w, w, e, w], [[e, w, e, w], [w, w, w, w]])),
86
- by(builtin(not_member, 2))
87
- ),
88
- proof(
89
- goal(solve([w, w, e, w], [e, e, e, e], [[w, w, e, w], [e, w, e, w], [w, w, w, w]], [wolf, goat, cabbage, nothing, goat])),
90
- by(rule("wolf-goat-cabbage.pl", clause(6))),
91
- bindings([binding("Config", [w, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", wolf), binding("Rest", [goat, cabbage, nothing, goat]), binding("NextConfig", [e, e, e, w])]),
92
- uses([
93
- proof(
94
- goal(move([w, w, e, w], wolf, [e, e, e, w])),
95
- by(rule("wolf-goat-cabbage.pl", clause(7))),
96
- bindings([binding("X", w), binding("Goat", e), binding("Cabbage", w), binding("Y", e)]),
97
- uses([
98
- proof(
99
- goal(change(w, e)),
100
- by(fact("wolf-goat-cabbage.pl", clause(12)))
101
- )
102
- ])
103
- ),
104
- proof(
105
- goal(safe([e, e, e, w])),
106
- by(rule("wolf-goat-cabbage.pl", clause(13))),
107
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", e), binding("Cabbage", w)]),
108
- uses([
109
- proof(
110
- goal(one_eq(e, e, e)),
111
- by(fact("wolf-goat-cabbage.pl", clause(14))),
112
- bindings([binding("X", e), binding("__anon0", e)])
113
- ),
114
- proof(
115
- goal(one_eq(e, e, w)),
116
- by(fact("wolf-goat-cabbage.pl", clause(14))),
117
- bindings([binding("X", e), binding("__anon0", w)])
118
- )
119
- ])
120
- ),
121
- proof(
122
- goal(not_member([e, e, e, w], [[w, w, e, w], [e, w, e, w], [w, w, w, w]])),
123
- by(builtin(not_member, 2))
124
- ),
125
- proof(
126
- goal(solve([e, e, e, w], [e, e, e, e], [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat, cabbage, nothing, goat])),
127
- by(rule("wolf-goat-cabbage.pl", clause(6))),
128
- bindings([binding("Config", [e, e, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", [cabbage, nothing, goat]), binding("NextConfig", [w, e, w, w])]),
129
- uses([
130
- proof(
131
- goal(move([e, e, e, w], goat, [w, e, w, w])),
132
- by(rule("wolf-goat-cabbage.pl", clause(8))),
133
- bindings([binding("X", e), binding("Wolf", e), binding("Cabbage", w), binding("Y", w)]),
134
- uses([
135
- proof(
136
- goal(change(e, w)),
137
- by(fact("wolf-goat-cabbage.pl", clause(11)))
138
- )
139
- ])
140
- ),
141
- proof(
142
- goal(safe([w, e, w, w])),
143
- by(rule("wolf-goat-cabbage.pl", clause(13))),
144
- bindings([binding("Man", w), binding("Wolf", e), binding("Goat", w), binding("Cabbage", w)]),
145
- uses([
146
- proof(
147
- goal(one_eq(w, w, e)),
148
- by(fact("wolf-goat-cabbage.pl", clause(14))),
149
- bindings([binding("X", w), binding("__anon0", e)])
150
- ),
151
- proof(
152
- goal(one_eq(w, w, w)),
153
- by(fact("wolf-goat-cabbage.pl", clause(14))),
154
- bindings([binding("X", w), binding("__anon0", w)])
155
- )
156
- ])
157
- ),
158
- proof(
159
- goal(not_member([w, e, w, w], [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
160
- by(builtin(not_member, 2))
161
- ),
162
- proof(
163
- goal(solve([w, e, w, w], [e, e, e, e], [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [cabbage, nothing, goat])),
164
- by(rule("wolf-goat-cabbage.pl", clause(6))),
165
- bindings([binding("Config", [w, e, w, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", cabbage), binding("Rest", [nothing, goat]), binding("NextConfig", [e, e, w, e])]),
166
- uses([
167
- proof(
168
- goal(move([w, e, w, w], cabbage, [e, e, w, e])),
169
- by(rule("wolf-goat-cabbage.pl", clause(9))),
170
- bindings([binding("X", w), binding("Wolf", e), binding("Goat", w), binding("Y", e)]),
171
- uses([
172
- proof(
173
- goal(change(w, e)),
174
- by(fact("wolf-goat-cabbage.pl", clause(12)))
175
- )
176
- ])
177
- ),
178
- proof(
179
- goal(safe([e, e, w, e])),
180
- by(rule("wolf-goat-cabbage.pl", clause(13))),
181
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
182
- uses([
183
- proof(
184
- goal(one_eq(e, w, e)),
185
- by(fact("wolf-goat-cabbage.pl", clause(15))),
186
- bindings([binding("X", e), binding("__anon1", w)])
187
- ),
188
- proof(
189
- goal(one_eq(e, w, e)),
190
- by(fact("wolf-goat-cabbage.pl", clause(15))),
191
- bindings([binding("X", e), binding("__anon1", w)])
192
- )
193
- ])
194
- ),
195
- proof(
196
- goal(not_member([e, e, w, e], [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
197
- by(builtin(not_member, 2))
198
- ),
199
- proof(
200
- goal(solve([e, e, w, e], [e, e, e, e], [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [nothing, goat])),
201
- by(rule("wolf-goat-cabbage.pl", clause(6))),
202
- bindings([binding("Config", [e, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [goat]), binding("NextConfig", [w, e, w, e])]),
203
- uses([
204
- proof(
205
- goal(move([e, e, w, e], nothing, [w, e, w, e])),
206
- by(rule("wolf-goat-cabbage.pl", clause(10))),
207
- bindings([binding("X", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e), binding("Y", w)]),
208
- uses([
209
- proof(
210
- goal(change(e, w)),
211
- by(fact("wolf-goat-cabbage.pl", clause(11)))
212
- )
213
- ])
214
- ),
215
- proof(
216
- goal(safe([w, e, w, e])),
217
- by(rule("wolf-goat-cabbage.pl", clause(13))),
218
- bindings([binding("Man", w), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
219
- uses([
220
- proof(
221
- goal(one_eq(w, w, e)),
222
- by(fact("wolf-goat-cabbage.pl", clause(14))),
223
- bindings([binding("X", w), binding("__anon0", e)])
224
- ),
225
- proof(
226
- goal(one_eq(w, w, e)),
227
- by(fact("wolf-goat-cabbage.pl", clause(14))),
228
- bindings([binding("X", w), binding("__anon0", e)])
229
- )
230
- ])
231
- ),
232
- proof(
233
- goal(not_member([w, e, w, e], [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
234
- by(builtin(not_member, 2))
235
- ),
236
- proof(
237
- goal(solve([w, e, w, e], [e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat])),
238
- by(rule("wolf-goat-cabbage.pl", clause(6))),
239
- bindings([binding("Config", [w, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", []), binding("NextConfig", [e, e, e, e])]),
240
- uses([
241
- proof(
242
- goal(move([w, e, w, e], goat, [e, e, e, e])),
243
- by(rule("wolf-goat-cabbage.pl", clause(8))),
244
- bindings([binding("X", w), binding("Wolf", e), binding("Cabbage", e), binding("Y", e)]),
245
- uses([
246
- proof(
247
- goal(change(w, e)),
248
- by(fact("wolf-goat-cabbage.pl", clause(12)))
249
- )
250
- ])
251
- ),
252
- proof(
253
- goal(safe([e, e, e, e])),
254
- by(rule("wolf-goat-cabbage.pl", clause(13))),
255
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", e), binding("Cabbage", e)]),
256
- uses([
257
- proof(
258
- goal(one_eq(e, e, e)),
259
- by(fact("wolf-goat-cabbage.pl", clause(14))),
260
- bindings([binding("X", e), binding("__anon0", e)])
261
- ),
262
- proof(
263
- goal(one_eq(e, e, e)),
264
- by(fact("wolf-goat-cabbage.pl", clause(14))),
265
- bindings([binding("X", e), binding("__anon0", e)])
266
- )
267
- ])
268
- ),
269
- proof(
270
- goal(not_member([e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
271
- by(builtin(not_member, 2))
272
- ),
273
- proof(
274
- goal(solve([e, e, e, e], [e, e, e, e], [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [])),
275
- by(fact("wolf-goat-cabbage.pl", clause(5))),
276
- bindings([binding("Config", [e, e, e, e]), binding("_Visited", [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])])
277
- )
278
- ])
279
- )
280
- ])
281
- )
282
- ])
283
- )
284
- ])
285
- )
286
- ])
287
- )
288
- ])
289
- )
290
- ])
291
- ),
292
- proof(
293
- goal(length([goat, nothing, wolf, goat, cabbage, nothing, goat], 7)),
294
- by(builtin(length, 2))
295
- )
296
- ])
297
- )
298
- ])
299
- )
300
- ).
301
-
302
2
  solution(puzzle, [goat, nothing, cabbage, goat, wolf, nothing, goat]).
303
- why(
304
- solution(puzzle, [goat, nothing, cabbage, goat, wolf, nothing, goat]),
305
- proof(
306
- goal(solution(puzzle, [goat, nothing, cabbage, goat, wolf, nothing, goat])),
307
- by(rule("wolf-goat-cabbage.pl", clause(16))),
308
- bindings([binding("Moves", [goat, nothing, cabbage, goat, wolf, nothing, goat])]),
309
- uses([
310
- proof(
311
- goal(solution([goat, nothing, cabbage, goat, wolf, nothing, goat])),
312
- by(rule("wolf-goat-cabbage.pl", clause(4))),
313
- bindings([binding("Moves", [goat, nothing, cabbage, goat, wolf, nothing, goat])]),
314
- uses([
315
- proof(
316
- goal(solve([w, w, w, w], [e, e, e, e], [[w, w, w, w]], [goat, nothing, cabbage, goat, wolf, nothing, goat])),
317
- by(rule("wolf-goat-cabbage.pl", clause(6))),
318
- bindings([binding("Config", [w, w, w, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, w, w]]), binding("Move", goat), binding("Rest", [nothing, cabbage, goat, wolf, nothing, goat]), binding("NextConfig", [e, w, e, w])]),
319
- uses([
320
- proof(
321
- goal(move([w, w, w, w], goat, [e, w, e, w])),
322
- by(rule("wolf-goat-cabbage.pl", clause(8))),
323
- bindings([binding("X", w), binding("Wolf", w), binding("Cabbage", w), binding("Y", e)]),
324
- uses([
325
- proof(
326
- goal(change(w, e)),
327
- by(fact("wolf-goat-cabbage.pl", clause(12)))
328
- )
329
- ])
330
- ),
331
- proof(
332
- goal(safe([e, w, e, w])),
333
- by(rule("wolf-goat-cabbage.pl", clause(13))),
334
- bindings([binding("Man", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
335
- uses([
336
- proof(
337
- goal(one_eq(e, e, w)),
338
- by(fact("wolf-goat-cabbage.pl", clause(14))),
339
- bindings([binding("X", e), binding("__anon0", w)])
340
- ),
341
- proof(
342
- goal(one_eq(e, e, w)),
343
- by(fact("wolf-goat-cabbage.pl", clause(14))),
344
- bindings([binding("X", e), binding("__anon0", w)])
345
- )
346
- ])
347
- ),
348
- proof(
349
- goal(not_member([e, w, e, w], [[w, w, w, w]])),
350
- by(builtin(not_member, 2))
351
- ),
352
- proof(
353
- goal(solve([e, w, e, w], [e, e, e, e], [[e, w, e, w], [w, w, w, w]], [nothing, cabbage, goat, wolf, nothing, goat])),
354
- by(rule("wolf-goat-cabbage.pl", clause(6))),
355
- bindings([binding("Config", [e, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [cabbage, goat, wolf, nothing, goat]), binding("NextConfig", [w, w, e, w])]),
356
- uses([
357
- proof(
358
- goal(move([e, w, e, w], nothing, [w, w, e, w])),
359
- by(rule("wolf-goat-cabbage.pl", clause(10))),
360
- bindings([binding("X", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w), binding("Y", w)]),
361
- uses([
362
- proof(
363
- goal(change(e, w)),
364
- by(fact("wolf-goat-cabbage.pl", clause(11)))
365
- )
366
- ])
367
- ),
368
- proof(
369
- goal(safe([w, w, e, w])),
370
- by(rule("wolf-goat-cabbage.pl", clause(13))),
371
- bindings([binding("Man", w), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
372
- uses([
373
- proof(
374
- goal(one_eq(w, e, w)),
375
- by(fact("wolf-goat-cabbage.pl", clause(15))),
376
- bindings([binding("X", w), binding("__anon1", e)])
377
- ),
378
- proof(
379
- goal(one_eq(w, e, w)),
380
- by(fact("wolf-goat-cabbage.pl", clause(15))),
381
- bindings([binding("X", w), binding("__anon1", e)])
382
- )
383
- ])
384
- ),
385
- proof(
386
- goal(not_member([w, w, e, w], [[e, w, e, w], [w, w, w, w]])),
387
- by(builtin(not_member, 2))
388
- ),
389
- proof(
390
- goal(solve([w, w, e, w], [e, e, e, e], [[w, w, e, w], [e, w, e, w], [w, w, w, w]], [cabbage, goat, wolf, nothing, goat])),
391
- by(rule("wolf-goat-cabbage.pl", clause(6))),
392
- bindings([binding("Config", [w, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", cabbage), binding("Rest", [goat, wolf, nothing, goat]), binding("NextConfig", [e, w, e, e])]),
393
- uses([
394
- proof(
395
- goal(move([w, w, e, w], cabbage, [e, w, e, e])),
396
- by(rule("wolf-goat-cabbage.pl", clause(9))),
397
- bindings([binding("X", w), binding("Wolf", w), binding("Goat", e), binding("Y", e)]),
398
- uses([
399
- proof(
400
- goal(change(w, e)),
401
- by(fact("wolf-goat-cabbage.pl", clause(12)))
402
- )
403
- ])
404
- ),
405
- proof(
406
- goal(safe([e, w, e, e])),
407
- by(rule("wolf-goat-cabbage.pl", clause(13))),
408
- bindings([binding("Man", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", e)]),
409
- uses([
410
- proof(
411
- goal(one_eq(e, e, w)),
412
- by(fact("wolf-goat-cabbage.pl", clause(14))),
413
- bindings([binding("X", e), binding("__anon0", w)])
414
- ),
415
- proof(
416
- goal(one_eq(e, e, e)),
417
- by(fact("wolf-goat-cabbage.pl", clause(14))),
418
- bindings([binding("X", e), binding("__anon0", e)])
419
- )
420
- ])
421
- ),
422
- proof(
423
- goal(not_member([e, w, e, e], [[w, w, e, w], [e, w, e, w], [w, w, w, w]])),
424
- by(builtin(not_member, 2))
425
- ),
426
- proof(
427
- goal(solve([e, w, e, e], [e, e, e, e], [[e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat, wolf, nothing, goat])),
428
- by(rule("wolf-goat-cabbage.pl", clause(6))),
429
- bindings([binding("Config", [e, w, e, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", [wolf, nothing, goat]), binding("NextConfig", [w, w, w, e])]),
430
- uses([
431
- proof(
432
- goal(move([e, w, e, e], goat, [w, w, w, e])),
433
- by(rule("wolf-goat-cabbage.pl", clause(8))),
434
- bindings([binding("X", e), binding("Wolf", w), binding("Cabbage", e), binding("Y", w)]),
435
- uses([
436
- proof(
437
- goal(change(e, w)),
438
- by(fact("wolf-goat-cabbage.pl", clause(11)))
439
- )
440
- ])
441
- ),
442
- proof(
443
- goal(safe([w, w, w, e])),
444
- by(rule("wolf-goat-cabbage.pl", clause(13))),
445
- bindings([binding("Man", w), binding("Wolf", w), binding("Goat", w), binding("Cabbage", e)]),
446
- uses([
447
- proof(
448
- goal(one_eq(w, w, w)),
449
- by(fact("wolf-goat-cabbage.pl", clause(14))),
450
- bindings([binding("X", w), binding("__anon0", w)])
451
- ),
452
- proof(
453
- goal(one_eq(w, w, e)),
454
- by(fact("wolf-goat-cabbage.pl", clause(14))),
455
- bindings([binding("X", w), binding("__anon0", e)])
456
- )
457
- ])
458
- ),
459
- proof(
460
- goal(not_member([w, w, w, e], [[e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
461
- by(builtin(not_member, 2))
462
- ),
463
- proof(
464
- goal(solve([w, w, w, e], [e, e, e, e], [[w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [wolf, nothing, goat])),
465
- by(rule("wolf-goat-cabbage.pl", clause(6))),
466
- bindings([binding("Config", [w, w, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", wolf), binding("Rest", [nothing, goat]), binding("NextConfig", [e, e, w, e])]),
467
- uses([
468
- proof(
469
- goal(move([w, w, w, e], wolf, [e, e, w, e])),
470
- by(rule("wolf-goat-cabbage.pl", clause(7))),
471
- bindings([binding("X", w), binding("Goat", w), binding("Cabbage", e), binding("Y", e)]),
472
- uses([
473
- proof(
474
- goal(change(w, e)),
475
- by(fact("wolf-goat-cabbage.pl", clause(12)))
476
- )
477
- ])
478
- ),
479
- proof(
480
- goal(safe([e, e, w, e])),
481
- by(rule("wolf-goat-cabbage.pl", clause(13))),
482
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
483
- uses([
484
- proof(
485
- goal(one_eq(e, w, e)),
486
- by(fact("wolf-goat-cabbage.pl", clause(15))),
487
- bindings([binding("X", e), binding("__anon1", w)])
488
- ),
489
- proof(
490
- goal(one_eq(e, w, e)),
491
- by(fact("wolf-goat-cabbage.pl", clause(15))),
492
- bindings([binding("X", e), binding("__anon1", w)])
493
- )
494
- ])
495
- ),
496
- proof(
497
- goal(not_member([e, e, w, e], [[w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
498
- by(builtin(not_member, 2))
499
- ),
500
- proof(
501
- goal(solve([e, e, w, e], [e, e, e, e], [[e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [nothing, goat])),
502
- by(rule("wolf-goat-cabbage.pl", clause(6))),
503
- bindings([binding("Config", [e, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [goat]), binding("NextConfig", [w, e, w, e])]),
504
- uses([
505
- proof(
506
- goal(move([e, e, w, e], nothing, [w, e, w, e])),
507
- by(rule("wolf-goat-cabbage.pl", clause(10))),
508
- bindings([binding("X", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e), binding("Y", w)]),
509
- uses([
510
- proof(
511
- goal(change(e, w)),
512
- by(fact("wolf-goat-cabbage.pl", clause(11)))
513
- )
514
- ])
515
- ),
516
- proof(
517
- goal(safe([w, e, w, e])),
518
- by(rule("wolf-goat-cabbage.pl", clause(13))),
519
- bindings([binding("Man", w), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
520
- uses([
521
- proof(
522
- goal(one_eq(w, w, e)),
523
- by(fact("wolf-goat-cabbage.pl", clause(14))),
524
- bindings([binding("X", w), binding("__anon0", e)])
525
- ),
526
- proof(
527
- goal(one_eq(w, w, e)),
528
- by(fact("wolf-goat-cabbage.pl", clause(14))),
529
- bindings([binding("X", w), binding("__anon0", e)])
530
- )
531
- ])
532
- ),
533
- proof(
534
- goal(not_member([w, e, w, e], [[e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
535
- by(builtin(not_member, 2))
536
- ),
537
- proof(
538
- goal(solve([w, e, w, e], [e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat])),
539
- by(rule("wolf-goat-cabbage.pl", clause(6))),
540
- bindings([binding("Config", [w, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, e, w, e], [e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", []), binding("NextConfig", [e, e, e, e])]),
541
- uses([
542
- proof(
543
- goal(move([w, e, w, e], goat, [e, e, e, e])),
544
- by(rule("wolf-goat-cabbage.pl", clause(8))),
545
- bindings([binding("X", w), binding("Wolf", e), binding("Cabbage", e), binding("Y", e)]),
546
- uses([
547
- proof(
548
- goal(change(w, e)),
549
- by(fact("wolf-goat-cabbage.pl", clause(12)))
550
- )
551
- ])
552
- ),
553
- proof(
554
- goal(safe([e, e, e, e])),
555
- by(rule("wolf-goat-cabbage.pl", clause(13))),
556
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", e), binding("Cabbage", e)]),
557
- uses([
558
- proof(
559
- goal(one_eq(e, e, e)),
560
- by(fact("wolf-goat-cabbage.pl", clause(14))),
561
- bindings([binding("X", e), binding("__anon0", e)])
562
- ),
563
- proof(
564
- goal(one_eq(e, e, e)),
565
- by(fact("wolf-goat-cabbage.pl", clause(14))),
566
- bindings([binding("X", e), binding("__anon0", e)])
567
- )
568
- ])
569
- ),
570
- proof(
571
- goal(not_member([e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
572
- by(builtin(not_member, 2))
573
- ),
574
- proof(
575
- goal(solve([e, e, e, e], [e, e, e, e], [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [])),
576
- by(fact("wolf-goat-cabbage.pl", clause(5))),
577
- bindings([binding("Config", [e, e, e, e]), binding("_Visited", [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, w, w, e], [e, w, e, e], [w, w, e, w], [e, w, e, w], [w, w, w, w]])])
578
- )
579
- ])
580
- )
581
- ])
582
- )
583
- ])
584
- )
585
- ])
586
- )
587
- ])
588
- )
589
- ])
590
- )
591
- ])
592
- ),
593
- proof(
594
- goal(length([goat, nothing, cabbage, goat, wolf, nothing, goat], 7)),
595
- by(builtin(length, 2))
596
- )
597
- ])
598
- )
599
- ])
600
- )
601
- ).
602
-
603
3
  solved(puzzle, true).
604
- why(
605
- solved(puzzle, true),
606
- proof(
607
- goal(solved(puzzle, true)),
608
- by(rule("wolf-goat-cabbage.pl", clause(17))),
609
- bindings([binding("_Moves", [goat, nothing, wolf, goat, cabbage, nothing, goat])]),
610
- uses([
611
- proof(
612
- goal(solution([goat, nothing, wolf, goat, cabbage, nothing, goat])),
613
- by(rule("wolf-goat-cabbage.pl", clause(4))),
614
- bindings([binding("Moves", [goat, nothing, wolf, goat, cabbage, nothing, goat])]),
615
- uses([
616
- proof(
617
- goal(solve([w, w, w, w], [e, e, e, e], [[w, w, w, w]], [goat, nothing, wolf, goat, cabbage, nothing, goat])),
618
- by(rule("wolf-goat-cabbage.pl", clause(6))),
619
- bindings([binding("Config", [w, w, w, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, w, w]]), binding("Move", goat), binding("Rest", [nothing, wolf, goat, cabbage, nothing, goat]), binding("NextConfig", [e, w, e, w])]),
620
- uses([
621
- proof(
622
- goal(move([w, w, w, w], goat, [e, w, e, w])),
623
- by(rule("wolf-goat-cabbage.pl", clause(8))),
624
- bindings([binding("X", w), binding("Wolf", w), binding("Cabbage", w), binding("Y", e)]),
625
- uses([
626
- proof(
627
- goal(change(w, e)),
628
- by(fact("wolf-goat-cabbage.pl", clause(12)))
629
- )
630
- ])
631
- ),
632
- proof(
633
- goal(safe([e, w, e, w])),
634
- by(rule("wolf-goat-cabbage.pl", clause(13))),
635
- bindings([binding("Man", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
636
- uses([
637
- proof(
638
- goal(one_eq(e, e, w)),
639
- by(fact("wolf-goat-cabbage.pl", clause(14))),
640
- bindings([binding("X", e), binding("__anon0", w)])
641
- ),
642
- proof(
643
- goal(one_eq(e, e, w)),
644
- by(fact("wolf-goat-cabbage.pl", clause(14))),
645
- bindings([binding("X", e), binding("__anon0", w)])
646
- )
647
- ])
648
- ),
649
- proof(
650
- goal(not_member([e, w, e, w], [[w, w, w, w]])),
651
- by(builtin(not_member, 2))
652
- ),
653
- proof(
654
- goal(solve([e, w, e, w], [e, e, e, e], [[e, w, e, w], [w, w, w, w]], [nothing, wolf, goat, cabbage, nothing, goat])),
655
- by(rule("wolf-goat-cabbage.pl", clause(6))),
656
- bindings([binding("Config", [e, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [wolf, goat, cabbage, nothing, goat]), binding("NextConfig", [w, w, e, w])]),
657
- uses([
658
- proof(
659
- goal(move([e, w, e, w], nothing, [w, w, e, w])),
660
- by(rule("wolf-goat-cabbage.pl", clause(10))),
661
- bindings([binding("X", e), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w), binding("Y", w)]),
662
- uses([
663
- proof(
664
- goal(change(e, w)),
665
- by(fact("wolf-goat-cabbage.pl", clause(11)))
666
- )
667
- ])
668
- ),
669
- proof(
670
- goal(safe([w, w, e, w])),
671
- by(rule("wolf-goat-cabbage.pl", clause(13))),
672
- bindings([binding("Man", w), binding("Wolf", w), binding("Goat", e), binding("Cabbage", w)]),
673
- uses([
674
- proof(
675
- goal(one_eq(w, e, w)),
676
- by(fact("wolf-goat-cabbage.pl", clause(15))),
677
- bindings([binding("X", w), binding("__anon1", e)])
678
- ),
679
- proof(
680
- goal(one_eq(w, e, w)),
681
- by(fact("wolf-goat-cabbage.pl", clause(15))),
682
- bindings([binding("X", w), binding("__anon1", e)])
683
- )
684
- ])
685
- ),
686
- proof(
687
- goal(not_member([w, w, e, w], [[e, w, e, w], [w, w, w, w]])),
688
- by(builtin(not_member, 2))
689
- ),
690
- proof(
691
- goal(solve([w, w, e, w], [e, e, e, e], [[w, w, e, w], [e, w, e, w], [w, w, w, w]], [wolf, goat, cabbage, nothing, goat])),
692
- by(rule("wolf-goat-cabbage.pl", clause(6))),
693
- bindings([binding("Config", [w, w, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", wolf), binding("Rest", [goat, cabbage, nothing, goat]), binding("NextConfig", [e, e, e, w])]),
694
- uses([
695
- proof(
696
- goal(move([w, w, e, w], wolf, [e, e, e, w])),
697
- by(rule("wolf-goat-cabbage.pl", clause(7))),
698
- bindings([binding("X", w), binding("Goat", e), binding("Cabbage", w), binding("Y", e)]),
699
- uses([
700
- proof(
701
- goal(change(w, e)),
702
- by(fact("wolf-goat-cabbage.pl", clause(12)))
703
- )
704
- ])
705
- ),
706
- proof(
707
- goal(safe([e, e, e, w])),
708
- by(rule("wolf-goat-cabbage.pl", clause(13))),
709
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", e), binding("Cabbage", w)]),
710
- uses([
711
- proof(
712
- goal(one_eq(e, e, e)),
713
- by(fact("wolf-goat-cabbage.pl", clause(14))),
714
- bindings([binding("X", e), binding("__anon0", e)])
715
- ),
716
- proof(
717
- goal(one_eq(e, e, w)),
718
- by(fact("wolf-goat-cabbage.pl", clause(14))),
719
- bindings([binding("X", e), binding("__anon0", w)])
720
- )
721
- ])
722
- ),
723
- proof(
724
- goal(not_member([e, e, e, w], [[w, w, e, w], [e, w, e, w], [w, w, w, w]])),
725
- by(builtin(not_member, 2))
726
- ),
727
- proof(
728
- goal(solve([e, e, e, w], [e, e, e, e], [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat, cabbage, nothing, goat])),
729
- by(rule("wolf-goat-cabbage.pl", clause(6))),
730
- bindings([binding("Config", [e, e, e, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", [cabbage, nothing, goat]), binding("NextConfig", [w, e, w, w])]),
731
- uses([
732
- proof(
733
- goal(move([e, e, e, w], goat, [w, e, w, w])),
734
- by(rule("wolf-goat-cabbage.pl", clause(8))),
735
- bindings([binding("X", e), binding("Wolf", e), binding("Cabbage", w), binding("Y", w)]),
736
- uses([
737
- proof(
738
- goal(change(e, w)),
739
- by(fact("wolf-goat-cabbage.pl", clause(11)))
740
- )
741
- ])
742
- ),
743
- proof(
744
- goal(safe([w, e, w, w])),
745
- by(rule("wolf-goat-cabbage.pl", clause(13))),
746
- bindings([binding("Man", w), binding("Wolf", e), binding("Goat", w), binding("Cabbage", w)]),
747
- uses([
748
- proof(
749
- goal(one_eq(w, w, e)),
750
- by(fact("wolf-goat-cabbage.pl", clause(14))),
751
- bindings([binding("X", w), binding("__anon0", e)])
752
- ),
753
- proof(
754
- goal(one_eq(w, w, w)),
755
- by(fact("wolf-goat-cabbage.pl", clause(14))),
756
- bindings([binding("X", w), binding("__anon0", w)])
757
- )
758
- ])
759
- ),
760
- proof(
761
- goal(not_member([w, e, w, w], [[e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
762
- by(builtin(not_member, 2))
763
- ),
764
- proof(
765
- goal(solve([w, e, w, w], [e, e, e, e], [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [cabbage, nothing, goat])),
766
- by(rule("wolf-goat-cabbage.pl", clause(6))),
767
- bindings([binding("Config", [w, e, w, w]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", cabbage), binding("Rest", [nothing, goat]), binding("NextConfig", [e, e, w, e])]),
768
- uses([
769
- proof(
770
- goal(move([w, e, w, w], cabbage, [e, e, w, e])),
771
- by(rule("wolf-goat-cabbage.pl", clause(9))),
772
- bindings([binding("X", w), binding("Wolf", e), binding("Goat", w), binding("Y", e)]),
773
- uses([
774
- proof(
775
- goal(change(w, e)),
776
- by(fact("wolf-goat-cabbage.pl", clause(12)))
777
- )
778
- ])
779
- ),
780
- proof(
781
- goal(safe([e, e, w, e])),
782
- by(rule("wolf-goat-cabbage.pl", clause(13))),
783
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
784
- uses([
785
- proof(
786
- goal(one_eq(e, w, e)),
787
- by(fact("wolf-goat-cabbage.pl", clause(15))),
788
- bindings([binding("X", e), binding("__anon1", w)])
789
- ),
790
- proof(
791
- goal(one_eq(e, w, e)),
792
- by(fact("wolf-goat-cabbage.pl", clause(15))),
793
- bindings([binding("X", e), binding("__anon1", w)])
794
- )
795
- ])
796
- ),
797
- proof(
798
- goal(not_member([e, e, w, e], [[w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
799
- by(builtin(not_member, 2))
800
- ),
801
- proof(
802
- goal(solve([e, e, w, e], [e, e, e, e], [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [nothing, goat])),
803
- by(rule("wolf-goat-cabbage.pl", clause(6))),
804
- bindings([binding("Config", [e, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", nothing), binding("Rest", [goat]), binding("NextConfig", [w, e, w, e])]),
805
- uses([
806
- proof(
807
- goal(move([e, e, w, e], nothing, [w, e, w, e])),
808
- by(rule("wolf-goat-cabbage.pl", clause(10))),
809
- bindings([binding("X", e), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e), binding("Y", w)]),
810
- uses([
811
- proof(
812
- goal(change(e, w)),
813
- by(fact("wolf-goat-cabbage.pl", clause(11)))
814
- )
815
- ])
816
- ),
817
- proof(
818
- goal(safe([w, e, w, e])),
819
- by(rule("wolf-goat-cabbage.pl", clause(13))),
820
- bindings([binding("Man", w), binding("Wolf", e), binding("Goat", w), binding("Cabbage", e)]),
821
- uses([
822
- proof(
823
- goal(one_eq(w, w, e)),
824
- by(fact("wolf-goat-cabbage.pl", clause(14))),
825
- bindings([binding("X", w), binding("__anon0", e)])
826
- ),
827
- proof(
828
- goal(one_eq(w, w, e)),
829
- by(fact("wolf-goat-cabbage.pl", clause(14))),
830
- bindings([binding("X", w), binding("__anon0", e)])
831
- )
832
- ])
833
- ),
834
- proof(
835
- goal(not_member([w, e, w, e], [[e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
836
- by(builtin(not_member, 2))
837
- ),
838
- proof(
839
- goal(solve([w, e, w, e], [e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [goat])),
840
- by(rule("wolf-goat-cabbage.pl", clause(6))),
841
- bindings([binding("Config", [w, e, w, e]), binding("Goal", [e, e, e, e]), binding("Visited", [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]]), binding("Move", goat), binding("Rest", []), binding("NextConfig", [e, e, e, e])]),
842
- uses([
843
- proof(
844
- goal(move([w, e, w, e], goat, [e, e, e, e])),
845
- by(rule("wolf-goat-cabbage.pl", clause(8))),
846
- bindings([binding("X", w), binding("Wolf", e), binding("Cabbage", e), binding("Y", e)]),
847
- uses([
848
- proof(
849
- goal(change(w, e)),
850
- by(fact("wolf-goat-cabbage.pl", clause(12)))
851
- )
852
- ])
853
- ),
854
- proof(
855
- goal(safe([e, e, e, e])),
856
- by(rule("wolf-goat-cabbage.pl", clause(13))),
857
- bindings([binding("Man", e), binding("Wolf", e), binding("Goat", e), binding("Cabbage", e)]),
858
- uses([
859
- proof(
860
- goal(one_eq(e, e, e)),
861
- by(fact("wolf-goat-cabbage.pl", clause(14))),
862
- bindings([binding("X", e), binding("__anon0", e)])
863
- ),
864
- proof(
865
- goal(one_eq(e, e, e)),
866
- by(fact("wolf-goat-cabbage.pl", clause(14))),
867
- bindings([binding("X", e), binding("__anon0", e)])
868
- )
869
- ])
870
- ),
871
- proof(
872
- goal(not_member([e, e, e, e], [[w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])),
873
- by(builtin(not_member, 2))
874
- ),
875
- proof(
876
- goal(solve([e, e, e, e], [e, e, e, e], [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]], [])),
877
- by(fact("wolf-goat-cabbage.pl", clause(5))),
878
- bindings([binding("Config", [e, e, e, e]), binding("_Visited", [[e, e, e, e], [w, e, w, e], [e, e, w, e], [w, e, w, w], [e, e, e, w], [w, w, e, w], [e, w, e, w], [w, w, w, w]])])
879
- )
880
- ])
881
- )
882
- ])
883
- )
884
- ])
885
- )
886
- ])
887
- )
888
- ])
889
- )
890
- ])
891
- )
892
- ])
893
- ),
894
- proof(
895
- goal(length([goat, nothing, wolf, goat, cabbage, nothing, goat], 7)),
896
- by(builtin(length, 2))
897
- )
898
- ])
899
- )
900
- ])
901
- )
902
- ).
903
-