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,191 +1,3 @@
1
1
  primeImplicants(quine_mccluskey, [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]]).
2
- why(
3
- primeImplicants(quine_mccluskey, [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]]),
4
- proof(
5
- goal(primeImplicants(quine_mccluskey, [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]])),
6
- by(rule("quine-mccluskey.pl", clause(56))),
7
- bindings([binding("Primes", [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]])]),
8
- uses([
9
- proof(
10
- goal(prime_implicants([[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]])),
11
- by(rule("quine-mccluskey.pl", clause(42))),
12
- bindings([binding("Primes", [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]]), binding("Minterms", [1, 3, 7, 11, 15]), binding("DontCares", [0, 2, 5]), binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
13
- uses([
14
- proof(
15
- goal(minterms([1, 3, 7, 11, 15])),
16
- by(rule("quine-mccluskey.pl", clause(49))),
17
- bindings([binding("Minterms", [1, 3, 7, 11, 15]), binding("Raw", [1, 3, 7, 11, 15])]),
18
- uses([
19
- proof(
20
- goal(findall(M, minterm(M), [1, 3, 7, 11, 15])),
21
- by(builtin(findall, 3))
22
- ),
23
- proof(
24
- goal(sort([1, 3, 7, 11, 15], [1, 3, 7, 11, 15])),
25
- by(builtin(sort, 2))
26
- )
27
- ])
28
- ),
29
- proof(
30
- goal(dont_cares([0, 2, 5])),
31
- by(rule("quine-mccluskey.pl", clause(50))),
32
- bindings([binding("DontCares", [0, 2, 5]), binding("Raw", [0, 2, 5])]),
33
- uses([
34
- proof(
35
- goal(findall(D, dont_care(D), [0, 2, 5])),
36
- by(builtin(findall, 3))
37
- ),
38
- proof(
39
- goal(sort([0, 2, 5], [0, 2, 5])),
40
- by(builtin(sort, 2))
41
- )
42
- ])
43
- ),
44
- proof(
45
- goal(bit_table([bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
46
- by(rule("quine-mccluskey.pl", clause(51))),
47
- bindings([binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
48
- uses([
49
- proof(
50
- goal(findall(bit(N, Pattern), bits(N, Pattern), [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
51
- by(builtin(findall, 3))
52
- )
53
- ])
54
- ),
55
- proof(
56
- goal(qm_prime_implicants([1, 3, 7, 11, 15], [0, 2, 5], [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])], [[0, 0, x, x], [0, x, x, 1], [x, x, 1, 1]])),
57
- by(builtin(qm_prime_implicants, 4))
58
- )
59
- ])
60
- )
61
- ])
62
- )
63
- ).
64
-
65
2
  minimalCover(quine_mccluskey, [[0, 0, x, x], [x, x, 1, 1]]).
66
- why(
67
- minimalCover(quine_mccluskey, [[0, 0, x, x], [x, x, 1, 1]]),
68
- proof(
69
- goal(minimalCover(quine_mccluskey, [[0, 0, x, x], [x, x, 1, 1]])),
70
- by(rule("quine-mccluskey.pl", clause(57))),
71
- bindings([binding("Cover", [[0, 0, x, x], [x, x, 1, 1]])]),
72
- uses([
73
- proof(
74
- goal(minimal_cover([[0, 0, x, x], [x, x, 1, 1]])),
75
- by(rule("quine-mccluskey.pl", clause(55))),
76
- bindings([binding("Cover", [[0, 0, x, x], [x, x, 1, 1]]), binding("Minterms", [1, 3, 7, 11, 15]), binding("DontCares", [0, 2, 5]), binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
77
- uses([
78
- proof(
79
- goal(minterms([1, 3, 7, 11, 15])),
80
- by(rule("quine-mccluskey.pl", clause(49))),
81
- bindings([binding("Minterms", [1, 3, 7, 11, 15]), binding("Raw", [1, 3, 7, 11, 15])]),
82
- uses([
83
- proof(
84
- goal(findall(M, minterm(M), [1, 3, 7, 11, 15])),
85
- by(builtin(findall, 3))
86
- ),
87
- proof(
88
- goal(sort([1, 3, 7, 11, 15], [1, 3, 7, 11, 15])),
89
- by(builtin(sort, 2))
90
- )
91
- ])
92
- ),
93
- proof(
94
- goal(dont_cares([0, 2, 5])),
95
- by(rule("quine-mccluskey.pl", clause(50))),
96
- bindings([binding("DontCares", [0, 2, 5]), binding("Raw", [0, 2, 5])]),
97
- uses([
98
- proof(
99
- goal(findall(D, dont_care(D), [0, 2, 5])),
100
- by(builtin(findall, 3))
101
- ),
102
- proof(
103
- goal(sort([0, 2, 5], [0, 2, 5])),
104
- by(builtin(sort, 2))
105
- )
106
- ])
107
- ),
108
- proof(
109
- goal(bit_table([bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
110
- by(rule("quine-mccluskey.pl", clause(51))),
111
- bindings([binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
112
- uses([
113
- proof(
114
- goal(findall(bit(N, Pattern), bits(N, Pattern), [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
115
- by(builtin(findall, 3))
116
- )
117
- ])
118
- ),
119
- proof(
120
- goal(qm_minimal_cover([1, 3, 7, 11, 15], [0, 2, 5], [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])], [[0, 0, x, x], [x, x, 1, 1]])),
121
- by(builtin(qm_minimal_cover, 4))
122
- )
123
- ])
124
- )
125
- ])
126
- )
127
- ).
128
-
129
3
  equation(quine_mccluskey, "f = ~A~B + CD").
130
- why(
131
- equation(quine_mccluskey, "f = ~A~B + CD"),
132
- proof(
133
- goal(equation(quine_mccluskey, "f = ~A~B + CD")),
134
- by(rule("quine-mccluskey.pl", clause(58))),
135
- uses([
136
- proof(
137
- goal(minimal_cover([[0, 0, x, x], [x, x, 1, 1]])),
138
- by(rule("quine-mccluskey.pl", clause(55))),
139
- bindings([binding("Cover", [[0, 0, x, x], [x, x, 1, 1]]), binding("Minterms", [1, 3, 7, 11, 15]), binding("DontCares", [0, 2, 5]), binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
140
- uses([
141
- proof(
142
- goal(minterms([1, 3, 7, 11, 15])),
143
- by(rule("quine-mccluskey.pl", clause(49))),
144
- bindings([binding("Minterms", [1, 3, 7, 11, 15]), binding("Raw", [1, 3, 7, 11, 15])]),
145
- uses([
146
- proof(
147
- goal(findall(M, minterm(M), [1, 3, 7, 11, 15])),
148
- by(builtin(findall, 3))
149
- ),
150
- proof(
151
- goal(sort([1, 3, 7, 11, 15], [1, 3, 7, 11, 15])),
152
- by(builtin(sort, 2))
153
- )
154
- ])
155
- ),
156
- proof(
157
- goal(dont_cares([0, 2, 5])),
158
- by(rule("quine-mccluskey.pl", clause(50))),
159
- bindings([binding("DontCares", [0, 2, 5]), binding("Raw", [0, 2, 5])]),
160
- uses([
161
- proof(
162
- goal(findall(D, dont_care(D), [0, 2, 5])),
163
- by(builtin(findall, 3))
164
- ),
165
- proof(
166
- goal(sort([0, 2, 5], [0, 2, 5])),
167
- by(builtin(sort, 2))
168
- )
169
- ])
170
- ),
171
- proof(
172
- goal(bit_table([bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
173
- by(rule("quine-mccluskey.pl", clause(51))),
174
- bindings([binding("Bits", [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])]),
175
- uses([
176
- proof(
177
- goal(findall(bit(N, Pattern), bits(N, Pattern), [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])])),
178
- by(builtin(findall, 3))
179
- )
180
- ])
181
- ),
182
- proof(
183
- goal(qm_minimal_cover([1, 3, 7, 11, 15], [0, 2, 5], [bit(0, [0, 0, 0, 0]), bit(1, [0, 0, 0, 1]), bit(2, [0, 0, 1, 0]), bit(3, [0, 0, 1, 1]), bit(4, [0, 1, 0, 0]), bit(5, [0, 1, 0, 1]), bit(6, [0, 1, 1, 0]), bit(7, [0, 1, 1, 1]), bit(8, [1, 0, 0, 0]), bit(9, [1, 0, 0, 1]), bit(10, [1, 0, 1, 0]), bit(11, [1, 0, 1, 1]), bit(12, [1, 1, 0, 0]), bit(13, [1, 1, 0, 1]), bit(14, [1, 1, 1, 0]), bit(15, [1, 1, 1, 1])], [[0, 0, x, x], [x, x, 1, 1]])),
184
- by(builtin(qm_minimal_cover, 4))
185
- )
186
- ])
187
- )
188
- ])
189
- )
190
- ).
191
-
@@ -1,304 +1,5 @@
1
1
  halfLivesElapsed(iodine_sample, 2.0).
2
- why(
3
- halfLivesElapsed(iodine_sample, 2.0),
4
- proof(
5
- goal(halfLivesElapsed(iodine_sample, 2.0)),
6
- by(rule("radioactive-decay.pl", clause(15))),
7
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0)]),
8
- uses([
9
- proof(
10
- goal(half_lives(iodine_sample, 2.0)),
11
- by(rule("radioactive-decay.pl", clause(10))),
12
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0), binding("Elapsed", 16.0), binding("HalfLife", 8.0)]),
13
- uses([
14
- proof(
15
- goal(sample(iodine_sample, elapsed_h, 16.0)),
16
- by(fact("radioactive-decay.pl", clause(8)))
17
- ),
18
- proof(
19
- goal(sample(iodine_sample, half_life_h, 8.0)),
20
- by(fact("radioactive-decay.pl", clause(7)))
21
- ),
22
- proof(
23
- goal(div(16.0, 8.0, 2.0)),
24
- by(builtin(div, 3))
25
- )
26
- ])
27
- )
28
- ])
29
- )
30
- ).
31
-
32
2
  remainingActivity_Bq(iodine_sample, 20.0).
33
- why(
34
- remainingActivity_Bq(iodine_sample, 20.0),
35
- proof(
36
- goal(remainingActivity_Bq(iodine_sample, 20.0)),
37
- by(rule("radioactive-decay.pl", clause(16))),
38
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0)]),
39
- uses([
40
- proof(
41
- goal(remaining_activity(iodine_sample, 20.0)),
42
- by(rule("radioactive-decay.pl", clause(12))),
43
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Initial", 80.0), binding("Fraction", 0.25)]),
44
- uses([
45
- proof(
46
- goal(sample(iodine_sample, initial_activity_bq, 80.0)),
47
- by(fact("radioactive-decay.pl", clause(6)))
48
- ),
49
- proof(
50
- goal(remaining_fraction(iodine_sample, 0.25)),
51
- by(rule("radioactive-decay.pl", clause(11))),
52
- bindings([binding("Sample", iodine_sample), binding("Fraction", 0.25), binding("Count", 2.0)]),
53
- uses([
54
- proof(
55
- goal(half_lives(iodine_sample, 2.0)),
56
- by(rule("radioactive-decay.pl", clause(10))),
57
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0), binding("Elapsed", 16.0), binding("HalfLife", 8.0)]),
58
- uses([
59
- proof(
60
- goal(sample(iodine_sample, elapsed_h, 16.0)),
61
- by(fact("radioactive-decay.pl", clause(8)))
62
- ),
63
- proof(
64
- goal(sample(iodine_sample, half_life_h, 8.0)),
65
- by(fact("radioactive-decay.pl", clause(7)))
66
- ),
67
- proof(
68
- goal(div(16.0, 8.0, 2.0)),
69
- by(builtin(div, 3))
70
- )
71
- ])
72
- ),
73
- proof(
74
- goal(pow(0.5, 2.0, 0.25)),
75
- by(builtin(pow, 3))
76
- )
77
- ])
78
- ),
79
- proof(
80
- goal(mul(80.0, 0.25, 20.0)),
81
- by(builtin(mul, 3))
82
- )
83
- ])
84
- )
85
- ])
86
- )
87
- ).
88
-
89
3
  decayedActivity_Bq(iodine_sample, 60.0).
90
- why(
91
- decayedActivity_Bq(iodine_sample, 60.0),
92
- proof(
93
- goal(decayedActivity_Bq(iodine_sample, 60.0)),
94
- by(rule("radioactive-decay.pl", clause(17))),
95
- bindings([binding("Sample", iodine_sample), binding("Decayed", 60.0)]),
96
- uses([
97
- proof(
98
- goal(decayed_activity(iodine_sample, 60.0)),
99
- by(rule("radioactive-decay.pl", clause(13))),
100
- bindings([binding("Sample", iodine_sample), binding("Decayed", 60.0), binding("Initial", 80.0), binding("Remaining", 20.0)]),
101
- uses([
102
- proof(
103
- goal(sample(iodine_sample, initial_activity_bq, 80.0)),
104
- by(fact("radioactive-decay.pl", clause(6)))
105
- ),
106
- proof(
107
- goal(remaining_activity(iodine_sample, 20.0)),
108
- by(rule("radioactive-decay.pl", clause(12))),
109
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Initial", 80.0), binding("Fraction", 0.25)]),
110
- uses([
111
- proof(
112
- goal(sample(iodine_sample, initial_activity_bq, 80.0)),
113
- by(fact("radioactive-decay.pl", clause(6)))
114
- ),
115
- proof(
116
- goal(remaining_fraction(iodine_sample, 0.25)),
117
- by(rule("radioactive-decay.pl", clause(11))),
118
- bindings([binding("Sample", iodine_sample), binding("Fraction", 0.25), binding("Count", 2.0)]),
119
- uses([
120
- proof(
121
- goal(half_lives(iodine_sample, 2.0)),
122
- by(rule("radioactive-decay.pl", clause(10))),
123
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0), binding("Elapsed", 16.0), binding("HalfLife", 8.0)]),
124
- uses([
125
- proof(
126
- goal(sample(iodine_sample, elapsed_h, 16.0)),
127
- by(fact("radioactive-decay.pl", clause(8)))
128
- ),
129
- proof(
130
- goal(sample(iodine_sample, half_life_h, 8.0)),
131
- by(fact("radioactive-decay.pl", clause(7)))
132
- ),
133
- proof(
134
- goal(div(16.0, 8.0, 2.0)),
135
- by(builtin(div, 3))
136
- )
137
- ])
138
- ),
139
- proof(
140
- goal(pow(0.5, 2.0, 0.25)),
141
- by(builtin(pow, 3))
142
- )
143
- ])
144
- ),
145
- proof(
146
- goal(mul(80.0, 0.25, 20.0)),
147
- by(builtin(mul, 3))
148
- )
149
- ])
150
- ),
151
- proof(
152
- goal(sub(80.0, 20.0, 60.0)),
153
- by(builtin(sub, 3))
154
- )
155
- ])
156
- )
157
- ])
158
- )
159
- ).
160
-
161
4
  status(iodine_sample, low_activity).
162
- why(
163
- status(iodine_sample, low_activity),
164
- proof(
165
- goal(status(iodine_sample, low_activity)),
166
- by(rule("radioactive-decay.pl", clause(18))),
167
- bindings([binding("Sample", iodine_sample)]),
168
- uses([
169
- proof(
170
- goal(low_activity(iodine_sample)),
171
- by(rule("radioactive-decay.pl", clause(14))),
172
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Limit", 25.0)]),
173
- uses([
174
- proof(
175
- goal(remaining_activity(iodine_sample, 20.0)),
176
- by(rule("radioactive-decay.pl", clause(12))),
177
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Initial", 80.0), binding("Fraction", 0.25)]),
178
- uses([
179
- proof(
180
- goal(sample(iodine_sample, initial_activity_bq, 80.0)),
181
- by(fact("radioactive-decay.pl", clause(6)))
182
- ),
183
- proof(
184
- goal(remaining_fraction(iodine_sample, 0.25)),
185
- by(rule("radioactive-decay.pl", clause(11))),
186
- bindings([binding("Sample", iodine_sample), binding("Fraction", 0.25), binding("Count", 2.0)]),
187
- uses([
188
- proof(
189
- goal(half_lives(iodine_sample, 2.0)),
190
- by(rule("radioactive-decay.pl", clause(10))),
191
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0), binding("Elapsed", 16.0), binding("HalfLife", 8.0)]),
192
- uses([
193
- proof(
194
- goal(sample(iodine_sample, elapsed_h, 16.0)),
195
- by(fact("radioactive-decay.pl", clause(8)))
196
- ),
197
- proof(
198
- goal(sample(iodine_sample, half_life_h, 8.0)),
199
- by(fact("radioactive-decay.pl", clause(7)))
200
- ),
201
- proof(
202
- goal(div(16.0, 8.0, 2.0)),
203
- by(builtin(div, 3))
204
- )
205
- ])
206
- ),
207
- proof(
208
- goal(pow(0.5, 2.0, 0.25)),
209
- by(builtin(pow, 3))
210
- )
211
- ])
212
- ),
213
- proof(
214
- goal(mul(80.0, 0.25, 20.0)),
215
- by(builtin(mul, 3))
216
- )
217
- ])
218
- ),
219
- proof(
220
- goal(threshold(iodine_sample, low_activity_bq, 25.0)),
221
- by(fact("radioactive-decay.pl", clause(9)))
222
- ),
223
- proof(
224
- goal(lt(20.0, 25.0)),
225
- by(builtin(lt, 2))
226
- )
227
- ])
228
- )
229
- ])
230
- )
231
- ).
232
-
233
5
  reason(iodine_sample, "two half-lives leave one quarter of the initial activity").
234
- why(
235
- reason(iodine_sample, "two half-lives leave one quarter of the initial activity"),
236
- proof(
237
- goal(reason(iodine_sample, "two half-lives leave one quarter of the initial activity")),
238
- by(rule("radioactive-decay.pl", clause(19))),
239
- bindings([binding("Sample", iodine_sample)]),
240
- uses([
241
- proof(
242
- goal(low_activity(iodine_sample)),
243
- by(rule("radioactive-decay.pl", clause(14))),
244
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Limit", 25.0)]),
245
- uses([
246
- proof(
247
- goal(remaining_activity(iodine_sample, 20.0)),
248
- by(rule("radioactive-decay.pl", clause(12))),
249
- bindings([binding("Sample", iodine_sample), binding("Remaining", 20.0), binding("Initial", 80.0), binding("Fraction", 0.25)]),
250
- uses([
251
- proof(
252
- goal(sample(iodine_sample, initial_activity_bq, 80.0)),
253
- by(fact("radioactive-decay.pl", clause(6)))
254
- ),
255
- proof(
256
- goal(remaining_fraction(iodine_sample, 0.25)),
257
- by(rule("radioactive-decay.pl", clause(11))),
258
- bindings([binding("Sample", iodine_sample), binding("Fraction", 0.25), binding("Count", 2.0)]),
259
- uses([
260
- proof(
261
- goal(half_lives(iodine_sample, 2.0)),
262
- by(rule("radioactive-decay.pl", clause(10))),
263
- bindings([binding("Sample", iodine_sample), binding("Count", 2.0), binding("Elapsed", 16.0), binding("HalfLife", 8.0)]),
264
- uses([
265
- proof(
266
- goal(sample(iodine_sample, elapsed_h, 16.0)),
267
- by(fact("radioactive-decay.pl", clause(8)))
268
- ),
269
- proof(
270
- goal(sample(iodine_sample, half_life_h, 8.0)),
271
- by(fact("radioactive-decay.pl", clause(7)))
272
- ),
273
- proof(
274
- goal(div(16.0, 8.0, 2.0)),
275
- by(builtin(div, 3))
276
- )
277
- ])
278
- ),
279
- proof(
280
- goal(pow(0.5, 2.0, 0.25)),
281
- by(builtin(pow, 3))
282
- )
283
- ])
284
- ),
285
- proof(
286
- goal(mul(80.0, 0.25, 20.0)),
287
- by(builtin(mul, 3))
288
- )
289
- ])
290
- ),
291
- proof(
292
- goal(threshold(iodine_sample, low_activity_bq, 25.0)),
293
- by(fact("radioactive-decay.pl", clause(9)))
294
- ),
295
- proof(
296
- goal(lt(20.0, 25.0)),
297
- by(builtin(lt, 2))
298
- )
299
- ])
300
- )
301
- ])
302
- )
303
- ).
304
-
@@ -1,126 +1,5 @@
1
1
  status(sat_instance, satisfiable).
2
- why(
3
- status(sat_instance, satisfiable),
4
- proof(
5
- goal(status(sat_instance, satisfiable)),
6
- by(rule("sat-dpll.pl", clause(19))),
7
- bindings([binding("_Assignment", [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])]),
8
- uses([
9
- proof(
10
- goal(once(model(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]))),
11
- by(builtin(once, 1)),
12
- uses([
13
- proof(
14
- goal(model(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])),
15
- by(rule("sat-dpll.pl", clause(18))),
16
- bindings([binding("Name", sat_instance), binding("Assignment", [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]), binding("Variables", [a, b, c, d, e, f, g, h]), binding("Clauses", [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])]),
17
- uses([
18
- proof(
19
- goal(problem(sat_instance, [a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])),
20
- by(fact("sat-dpll.pl", clause(7)))
21
- ),
22
- proof(
23
- goal(cnf_model([a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]], [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])),
24
- by(builtin(cnf_model, 3))
25
- )
26
- ])
27
- )
28
- ])
29
- )
30
- ])
31
- )
32
- ).
33
-
34
2
  witness(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]).
35
- why(
36
- witness(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]),
37
- proof(
38
- goal(witness(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])),
39
- by(rule("sat-dpll.pl", clause(20))),
40
- bindings([binding("Assignment", [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])]),
41
- uses([
42
- proof(
43
- goal(once(model(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]))),
44
- by(builtin(once, 1)),
45
- uses([
46
- proof(
47
- goal(model(sat_instance, [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])),
48
- by(rule("sat-dpll.pl", clause(18))),
49
- bindings([binding("Name", sat_instance), binding("Assignment", [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)]), binding("Variables", [a, b, c, d, e, f, g, h]), binding("Clauses", [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])]),
50
- uses([
51
- proof(
52
- goal(problem(sat_instance, [a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])),
53
- by(fact("sat-dpll.pl", clause(7)))
54
- ),
55
- proof(
56
- goal(cnf_model([a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]], [value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)])),
57
- by(builtin(cnf_model, 3))
58
- )
59
- ])
60
- )
61
- ])
62
- )
63
- ])
64
- )
65
- ).
66
-
67
3
  modelCount(sat_instance, 18).
68
- why(
69
- modelCount(sat_instance, 18),
70
- proof(
71
- goal(modelCount(sat_instance, 18)),
72
- by(rule("sat-dpll.pl", clause(21))),
73
- bindings([binding("Count", 18), binding("Models", [[value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)], [value(a, true), value(b, false), value(c, true), value(d, false), value(e, true), value(f, false), value(g, true), value(h, false)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)]])]),
74
- uses([
75
- proof(
76
- goal(findall(Assignment, model(sat_instance, Assignment), [[value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)], [value(a, true), value(b, false), value(c, true), value(d, false), value(e, true), value(f, false), value(g, true), value(h, false)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)]])),
77
- by(builtin(findall, 3))
78
- ),
79
- proof(
80
- goal(length([[value(a, false), value(b, true), value(c, false), value(d, true), value(e, false), value(f, true), value(g, false), value(h, true)], [value(a, true), value(b, false), value(c, true), value(d, false), value(e, true), value(f, false), value(g, true), value(h, false)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)], [value(a, true), value(b, true), value(c, true), value(d, true), value(e, true), value(f, true), value(g, true), value(h, true)]], 18)),
81
- by(builtin(length, 2))
82
- )
83
- ])
84
- )
85
- ).
86
-
87
4
  variableCount(sat_instance, 8).
88
- why(
89
- variableCount(sat_instance, 8),
90
- proof(
91
- goal(variableCount(sat_instance, 8)),
92
- by(rule("sat-dpll.pl", clause(22))),
93
- bindings([binding("Count", 8), binding("Variables", [a, b, c, d, e, f, g, h]), binding("_Clauses", [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])]),
94
- uses([
95
- proof(
96
- goal(problem(sat_instance, [a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])),
97
- by(fact("sat-dpll.pl", clause(7)))
98
- ),
99
- proof(
100
- goal(length([a, b, c, d, e, f, g, h], 8)),
101
- by(builtin(length, 2))
102
- )
103
- ])
104
- )
105
- ).
106
-
107
5
  clauseCount(sat_instance, 12).
108
- why(
109
- clauseCount(sat_instance, 12),
110
- proof(
111
- goal(clauseCount(sat_instance, 12)),
112
- by(rule("sat-dpll.pl", clause(23))),
113
- bindings([binding("Count", 12), binding("_Variables", [a, b, c, d, e, f, g, h]), binding("Clauses", [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])]),
114
- uses([
115
- proof(
116
- goal(problem(sat_instance, [a, b, c, d, e, f, g, h], [[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]])),
117
- by(fact("sat-dpll.pl", clause(7)))
118
- ),
119
- proof(
120
- goal(length([[pos(a), pos(b)], [neg(a), pos(c)], [neg(b), pos(d)], [pos(c), pos(d)], [neg(c), pos(e)], [neg(d), pos(f)], [pos(e), pos(f)], [neg(e), pos(g)], [neg(f), pos(h)], [pos(g), pos(h)], [neg(g), pos(a)], [neg(h), pos(b)]], 12)),
121
- by(builtin(length, 2))
122
- )
123
- ])
124
- )
125
- ).
126
-