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,669 +1,6 @@
1
1
  dutyCycle(regulator1, 0.20833333333333334).
2
- why(
3
- dutyCycle(regulator1, 0.20833333333333334),
4
- proof(
5
- goal(dutyCycle(regulator1, 0.20833333333333334)),
6
- by(rule("buck-converter-design.pl", clause(20))),
7
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334)]),
8
- uses([
9
- proof(
10
- goal(duty_cycle(regulator1, 0.20833333333333334)),
11
- by(rule("buck-converter-design.pl", clause(15))),
12
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
13
- uses([
14
- proof(
15
- goal(converter(regulator1, outputVoltage_V, 5.0)),
16
- by(fact("buck-converter-design.pl", clause(8)))
17
- ),
18
- proof(
19
- goal(converter(regulator1, inputVoltage_V, 24.0)),
20
- by(fact("buck-converter-design.pl", clause(7)))
21
- ),
22
- proof(
23
- goal(div(5.0, 24.0, 0.20833333333333334)),
24
- by(builtin(div, 3))
25
- )
26
- ])
27
- )
28
- ])
29
- )
30
- ).
31
-
32
2
  inductorRipple_A(regulator1, 0.35984848484848486).
33
- why(
34
- inductorRipple_A(regulator1, 0.35984848484848486),
35
- proof(
36
- goal(inductorRipple_A(regulator1, 0.35984848484848486)),
37
- by(rule("buck-converter-design.pl", clause(21))),
38
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486)]),
39
- uses([
40
- proof(
41
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
42
- by(rule("buck-converter-design.pl", clause(16))),
43
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
44
- uses([
45
- proof(
46
- goal(converter(regulator1, inputVoltage_V, 24.0)),
47
- by(fact("buck-converter-design.pl", clause(7)))
48
- ),
49
- proof(
50
- goal(converter(regulator1, outputVoltage_V, 5.0)),
51
- by(fact("buck-converter-design.pl", clause(8)))
52
- ),
53
- proof(
54
- goal(converter(regulator1, inductance_H, 0.000022)),
55
- by(fact("buck-converter-design.pl", clause(11)))
56
- ),
57
- proof(
58
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
59
- by(fact("buck-converter-design.pl", clause(10)))
60
- ),
61
- proof(
62
- goal(duty_cycle(regulator1, 0.20833333333333334)),
63
- by(rule("buck-converter-design.pl", clause(15))),
64
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
65
- uses([
66
- proof(
67
- goal(converter(regulator1, outputVoltage_V, 5.0)),
68
- by(fact("buck-converter-design.pl", clause(8)))
69
- ),
70
- proof(
71
- goal(converter(regulator1, inputVoltage_V, 24.0)),
72
- by(fact("buck-converter-design.pl", clause(7)))
73
- ),
74
- proof(
75
- goal(div(5.0, 24.0, 0.20833333333333334)),
76
- by(builtin(div, 3))
77
- )
78
- ])
79
- ),
80
- proof(
81
- goal(sub(24.0, 5.0, 19.0)),
82
- by(builtin(sub, 3))
83
- ),
84
- proof(
85
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
86
- by(builtin(mul, 3))
87
- ),
88
- proof(
89
- goal(mul(0.000022, 500000.0, 11.0)),
90
- by(builtin(mul, 3))
91
- ),
92
- proof(
93
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
94
- by(builtin(div, 3))
95
- )
96
- ])
97
- )
98
- ])
99
- )
100
- ).
101
-
102
3
  rippleRatio(regulator1, 0.17992424242424243).
103
- why(
104
- rippleRatio(regulator1, 0.17992424242424243),
105
- proof(
106
- goal(rippleRatio(regulator1, 0.17992424242424243)),
107
- by(rule("buck-converter-design.pl", clause(22))),
108
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243)]),
109
- uses([
110
- proof(
111
- goal(ripple_ratio(regulator1, 0.17992424242424243)),
112
- by(rule("buck-converter-design.pl", clause(17))),
113
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243), binding("RippleCurrent", 0.35984848484848486), binding("LoadCurrent", 2.0)]),
114
- uses([
115
- proof(
116
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
117
- by(rule("buck-converter-design.pl", clause(16))),
118
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
119
- uses([
120
- proof(
121
- goal(converter(regulator1, inputVoltage_V, 24.0)),
122
- by(fact("buck-converter-design.pl", clause(7)))
123
- ),
124
- proof(
125
- goal(converter(regulator1, outputVoltage_V, 5.0)),
126
- by(fact("buck-converter-design.pl", clause(8)))
127
- ),
128
- proof(
129
- goal(converter(regulator1, inductance_H, 0.000022)),
130
- by(fact("buck-converter-design.pl", clause(11)))
131
- ),
132
- proof(
133
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
134
- by(fact("buck-converter-design.pl", clause(10)))
135
- ),
136
- proof(
137
- goal(duty_cycle(regulator1, 0.20833333333333334)),
138
- by(rule("buck-converter-design.pl", clause(15))),
139
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
140
- uses([
141
- proof(
142
- goal(converter(regulator1, outputVoltage_V, 5.0)),
143
- by(fact("buck-converter-design.pl", clause(8)))
144
- ),
145
- proof(
146
- goal(converter(regulator1, inputVoltage_V, 24.0)),
147
- by(fact("buck-converter-design.pl", clause(7)))
148
- ),
149
- proof(
150
- goal(div(5.0, 24.0, 0.20833333333333334)),
151
- by(builtin(div, 3))
152
- )
153
- ])
154
- ),
155
- proof(
156
- goal(sub(24.0, 5.0, 19.0)),
157
- by(builtin(sub, 3))
158
- ),
159
- proof(
160
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
161
- by(builtin(mul, 3))
162
- ),
163
- proof(
164
- goal(mul(0.000022, 500000.0, 11.0)),
165
- by(builtin(mul, 3))
166
- ),
167
- proof(
168
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
169
- by(builtin(div, 3))
170
- )
171
- ])
172
- ),
173
- proof(
174
- goal(converter(regulator1, loadCurrent_A, 2.0)),
175
- by(fact("buck-converter-design.pl", clause(9)))
176
- ),
177
- proof(
178
- goal(div(0.35984848484848486, 2.0, 0.17992424242424243)),
179
- by(builtin(div, 3))
180
- )
181
- ])
182
- )
183
- ])
184
- )
185
- ).
186
-
187
4
  capacitorRipple_V(regulator1, 0.0019140876853642812).
188
- why(
189
- capacitorRipple_V(regulator1, 0.0019140876853642812),
190
- proof(
191
- goal(capacitorRipple_V(regulator1, 0.0019140876853642812)),
192
- by(rule("buck-converter-design.pl", clause(23))),
193
- bindings([binding("Converter", regulator1), binding("RippleVoltage", 0.0019140876853642812)]),
194
- uses([
195
- proof(
196
- goal(capacitor_ripple_voltage(regulator1, 0.0019140876853642812)),
197
- by(rule("buck-converter-design.pl", clause(18))),
198
- bindings([binding("Converter", regulator1), binding("RippleVoltage", 0.0019140876853642812), binding("RippleCurrent", 0.35984848484848486), binding("Frequency", 500000.0), binding("Capacitance", 0.000047), binding("EightF", 4000000.0), binding("Denominator", 188.0)]),
199
- uses([
200
- proof(
201
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
202
- by(rule("buck-converter-design.pl", clause(16))),
203
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
204
- uses([
205
- proof(
206
- goal(converter(regulator1, inputVoltage_V, 24.0)),
207
- by(fact("buck-converter-design.pl", clause(7)))
208
- ),
209
- proof(
210
- goal(converter(regulator1, outputVoltage_V, 5.0)),
211
- by(fact("buck-converter-design.pl", clause(8)))
212
- ),
213
- proof(
214
- goal(converter(regulator1, inductance_H, 0.000022)),
215
- by(fact("buck-converter-design.pl", clause(11)))
216
- ),
217
- proof(
218
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
219
- by(fact("buck-converter-design.pl", clause(10)))
220
- ),
221
- proof(
222
- goal(duty_cycle(regulator1, 0.20833333333333334)),
223
- by(rule("buck-converter-design.pl", clause(15))),
224
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
225
- uses([
226
- proof(
227
- goal(converter(regulator1, outputVoltage_V, 5.0)),
228
- by(fact("buck-converter-design.pl", clause(8)))
229
- ),
230
- proof(
231
- goal(converter(regulator1, inputVoltage_V, 24.0)),
232
- by(fact("buck-converter-design.pl", clause(7)))
233
- ),
234
- proof(
235
- goal(div(5.0, 24.0, 0.20833333333333334)),
236
- by(builtin(div, 3))
237
- )
238
- ])
239
- ),
240
- proof(
241
- goal(sub(24.0, 5.0, 19.0)),
242
- by(builtin(sub, 3))
243
- ),
244
- proof(
245
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
246
- by(builtin(mul, 3))
247
- ),
248
- proof(
249
- goal(mul(0.000022, 500000.0, 11.0)),
250
- by(builtin(mul, 3))
251
- ),
252
- proof(
253
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
254
- by(builtin(div, 3))
255
- )
256
- ])
257
- ),
258
- proof(
259
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
260
- by(fact("buck-converter-design.pl", clause(10)))
261
- ),
262
- proof(
263
- goal(converter(regulator1, capacitance_F, 0.000047)),
264
- by(fact("buck-converter-design.pl", clause(12)))
265
- ),
266
- proof(
267
- goal(mul(8.0, 500000.0, 4000000.0)),
268
- by(builtin(mul, 3))
269
- ),
270
- proof(
271
- goal(mul(4000000.0, 0.000047, 188.0)),
272
- by(builtin(mul, 3))
273
- ),
274
- proof(
275
- goal(div(0.35984848484848486, 188.0, 0.0019140876853642812)),
276
- by(builtin(div, 3))
277
- )
278
- ])
279
- )
280
- ])
281
- )
282
- ).
283
-
284
5
  status(regulator1, stable_ripple_design).
285
- why(
286
- status(regulator1, stable_ripple_design),
287
- proof(
288
- goal(status(regulator1, stable_ripple_design)),
289
- by(rule("buck-converter-design.pl", clause(24))),
290
- bindings([binding("Converter", regulator1)]),
291
- uses([
292
- proof(
293
- goal(within_ripple_limits(regulator1)),
294
- by(rule("buck-converter-design.pl", clause(19))),
295
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243), binding("MaxRatio", 0.30), binding("RippleVoltage", 0.0019140876853642812), binding("MaxRippleVoltage", 0.05)]),
296
- uses([
297
- proof(
298
- goal(ripple_ratio(regulator1, 0.17992424242424243)),
299
- by(rule("buck-converter-design.pl", clause(17))),
300
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243), binding("RippleCurrent", 0.35984848484848486), binding("LoadCurrent", 2.0)]),
301
- uses([
302
- proof(
303
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
304
- by(rule("buck-converter-design.pl", clause(16))),
305
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
306
- uses([
307
- proof(
308
- goal(converter(regulator1, inputVoltage_V, 24.0)),
309
- by(fact("buck-converter-design.pl", clause(7)))
310
- ),
311
- proof(
312
- goal(converter(regulator1, outputVoltage_V, 5.0)),
313
- by(fact("buck-converter-design.pl", clause(8)))
314
- ),
315
- proof(
316
- goal(converter(regulator1, inductance_H, 0.000022)),
317
- by(fact("buck-converter-design.pl", clause(11)))
318
- ),
319
- proof(
320
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
321
- by(fact("buck-converter-design.pl", clause(10)))
322
- ),
323
- proof(
324
- goal(duty_cycle(regulator1, 0.20833333333333334)),
325
- by(rule("buck-converter-design.pl", clause(15))),
326
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
327
- uses([
328
- proof(
329
- goal(converter(regulator1, outputVoltage_V, 5.0)),
330
- by(fact("buck-converter-design.pl", clause(8)))
331
- ),
332
- proof(
333
- goal(converter(regulator1, inputVoltage_V, 24.0)),
334
- by(fact("buck-converter-design.pl", clause(7)))
335
- ),
336
- proof(
337
- goal(div(5.0, 24.0, 0.20833333333333334)),
338
- by(builtin(div, 3))
339
- )
340
- ])
341
- ),
342
- proof(
343
- goal(sub(24.0, 5.0, 19.0)),
344
- by(builtin(sub, 3))
345
- ),
346
- proof(
347
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
348
- by(builtin(mul, 3))
349
- ),
350
- proof(
351
- goal(mul(0.000022, 500000.0, 11.0)),
352
- by(builtin(mul, 3))
353
- ),
354
- proof(
355
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
356
- by(builtin(div, 3))
357
- )
358
- ])
359
- ),
360
- proof(
361
- goal(converter(regulator1, loadCurrent_A, 2.0)),
362
- by(fact("buck-converter-design.pl", clause(9)))
363
- ),
364
- proof(
365
- goal(div(0.35984848484848486, 2.0, 0.17992424242424243)),
366
- by(builtin(div, 3))
367
- )
368
- ])
369
- ),
370
- proof(
371
- goal(limit(regulator1, maxRippleRatio, 0.30)),
372
- by(fact("buck-converter-design.pl", clause(13)))
373
- ),
374
- proof(
375
- goal(lt(0.17992424242424243, 0.30)),
376
- by(builtin(lt, 2))
377
- ),
378
- proof(
379
- goal(capacitor_ripple_voltage(regulator1, 0.0019140876853642812)),
380
- by(rule("buck-converter-design.pl", clause(18))),
381
- bindings([binding("Converter", regulator1), binding("RippleVoltage", 0.0019140876853642812), binding("RippleCurrent", 0.35984848484848486), binding("Frequency", 500000.0), binding("Capacitance", 0.000047), binding("EightF", 4000000.0), binding("Denominator", 188.0)]),
382
- uses([
383
- proof(
384
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
385
- by(rule("buck-converter-design.pl", clause(16))),
386
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
387
- uses([
388
- proof(
389
- goal(converter(regulator1, inputVoltage_V, 24.0)),
390
- by(fact("buck-converter-design.pl", clause(7)))
391
- ),
392
- proof(
393
- goal(converter(regulator1, outputVoltage_V, 5.0)),
394
- by(fact("buck-converter-design.pl", clause(8)))
395
- ),
396
- proof(
397
- goal(converter(regulator1, inductance_H, 0.000022)),
398
- by(fact("buck-converter-design.pl", clause(11)))
399
- ),
400
- proof(
401
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
402
- by(fact("buck-converter-design.pl", clause(10)))
403
- ),
404
- proof(
405
- goal(duty_cycle(regulator1, 0.20833333333333334)),
406
- by(rule("buck-converter-design.pl", clause(15))),
407
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
408
- uses([
409
- proof(
410
- goal(converter(regulator1, outputVoltage_V, 5.0)),
411
- by(fact("buck-converter-design.pl", clause(8)))
412
- ),
413
- proof(
414
- goal(converter(regulator1, inputVoltage_V, 24.0)),
415
- by(fact("buck-converter-design.pl", clause(7)))
416
- ),
417
- proof(
418
- goal(div(5.0, 24.0, 0.20833333333333334)),
419
- by(builtin(div, 3))
420
- )
421
- ])
422
- ),
423
- proof(
424
- goal(sub(24.0, 5.0, 19.0)),
425
- by(builtin(sub, 3))
426
- ),
427
- proof(
428
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
429
- by(builtin(mul, 3))
430
- ),
431
- proof(
432
- goal(mul(0.000022, 500000.0, 11.0)),
433
- by(builtin(mul, 3))
434
- ),
435
- proof(
436
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
437
- by(builtin(div, 3))
438
- )
439
- ])
440
- ),
441
- proof(
442
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
443
- by(fact("buck-converter-design.pl", clause(10)))
444
- ),
445
- proof(
446
- goal(converter(regulator1, capacitance_F, 0.000047)),
447
- by(fact("buck-converter-design.pl", clause(12)))
448
- ),
449
- proof(
450
- goal(mul(8.0, 500000.0, 4000000.0)),
451
- by(builtin(mul, 3))
452
- ),
453
- proof(
454
- goal(mul(4000000.0, 0.000047, 188.0)),
455
- by(builtin(mul, 3))
456
- ),
457
- proof(
458
- goal(div(0.35984848484848486, 188.0, 0.0019140876853642812)),
459
- by(builtin(div, 3))
460
- )
461
- ])
462
- ),
463
- proof(
464
- goal(limit(regulator1, maxOutputRipple_V, 0.05)),
465
- by(fact("buck-converter-design.pl", clause(14)))
466
- ),
467
- proof(
468
- goal(lt(0.0019140876853642812, 0.05)),
469
- by(builtin(lt, 2))
470
- )
471
- ])
472
- )
473
- ])
474
- )
475
- ).
476
-
477
6
  reason(regulator1, "inductor-current and output-voltage ripple are below design limits").
478
- why(
479
- reason(regulator1, "inductor-current and output-voltage ripple are below design limits"),
480
- proof(
481
- goal(reason(regulator1, "inductor-current and output-voltage ripple are below design limits")),
482
- by(rule("buck-converter-design.pl", clause(25))),
483
- bindings([binding("Converter", regulator1)]),
484
- uses([
485
- proof(
486
- goal(within_ripple_limits(regulator1)),
487
- by(rule("buck-converter-design.pl", clause(19))),
488
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243), binding("MaxRatio", 0.30), binding("RippleVoltage", 0.0019140876853642812), binding("MaxRippleVoltage", 0.05)]),
489
- uses([
490
- proof(
491
- goal(ripple_ratio(regulator1, 0.17992424242424243)),
492
- by(rule("buck-converter-design.pl", clause(17))),
493
- bindings([binding("Converter", regulator1), binding("Ratio", 0.17992424242424243), binding("RippleCurrent", 0.35984848484848486), binding("LoadCurrent", 2.0)]),
494
- uses([
495
- proof(
496
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
497
- by(rule("buck-converter-design.pl", clause(16))),
498
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
499
- uses([
500
- proof(
501
- goal(converter(regulator1, inputVoltage_V, 24.0)),
502
- by(fact("buck-converter-design.pl", clause(7)))
503
- ),
504
- proof(
505
- goal(converter(regulator1, outputVoltage_V, 5.0)),
506
- by(fact("buck-converter-design.pl", clause(8)))
507
- ),
508
- proof(
509
- goal(converter(regulator1, inductance_H, 0.000022)),
510
- by(fact("buck-converter-design.pl", clause(11)))
511
- ),
512
- proof(
513
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
514
- by(fact("buck-converter-design.pl", clause(10)))
515
- ),
516
- proof(
517
- goal(duty_cycle(regulator1, 0.20833333333333334)),
518
- by(rule("buck-converter-design.pl", clause(15))),
519
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
520
- uses([
521
- proof(
522
- goal(converter(regulator1, outputVoltage_V, 5.0)),
523
- by(fact("buck-converter-design.pl", clause(8)))
524
- ),
525
- proof(
526
- goal(converter(regulator1, inputVoltage_V, 24.0)),
527
- by(fact("buck-converter-design.pl", clause(7)))
528
- ),
529
- proof(
530
- goal(div(5.0, 24.0, 0.20833333333333334)),
531
- by(builtin(div, 3))
532
- )
533
- ])
534
- ),
535
- proof(
536
- goal(sub(24.0, 5.0, 19.0)),
537
- by(builtin(sub, 3))
538
- ),
539
- proof(
540
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
541
- by(builtin(mul, 3))
542
- ),
543
- proof(
544
- goal(mul(0.000022, 500000.0, 11.0)),
545
- by(builtin(mul, 3))
546
- ),
547
- proof(
548
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
549
- by(builtin(div, 3))
550
- )
551
- ])
552
- ),
553
- proof(
554
- goal(converter(regulator1, loadCurrent_A, 2.0)),
555
- by(fact("buck-converter-design.pl", clause(9)))
556
- ),
557
- proof(
558
- goal(div(0.35984848484848486, 2.0, 0.17992424242424243)),
559
- by(builtin(div, 3))
560
- )
561
- ])
562
- ),
563
- proof(
564
- goal(limit(regulator1, maxRippleRatio, 0.30)),
565
- by(fact("buck-converter-design.pl", clause(13)))
566
- ),
567
- proof(
568
- goal(lt(0.17992424242424243, 0.30)),
569
- by(builtin(lt, 2))
570
- ),
571
- proof(
572
- goal(capacitor_ripple_voltage(regulator1, 0.0019140876853642812)),
573
- by(rule("buck-converter-design.pl", clause(18))),
574
- bindings([binding("Converter", regulator1), binding("RippleVoltage", 0.0019140876853642812), binding("RippleCurrent", 0.35984848484848486), binding("Frequency", 500000.0), binding("Capacitance", 0.000047), binding("EightF", 4000000.0), binding("Denominator", 188.0)]),
575
- uses([
576
- proof(
577
- goal(inductor_ripple_current(regulator1, 0.35984848484848486)),
578
- by(rule("buck-converter-design.pl", clause(16))),
579
- bindings([binding("Converter", regulator1), binding("RippleCurrent", 0.35984848484848486), binding("InputVoltage", 24.0), binding("OutputVoltage", 5.0), binding("Inductance", 0.000022), binding("Frequency", 500000.0), binding("Duty", 0.20833333333333334), binding("VoltageAcrossInductor", 19.0), binding("Numerator", 3.9583333333333335), binding("Denominator", 11.0)]),
580
- uses([
581
- proof(
582
- goal(converter(regulator1, inputVoltage_V, 24.0)),
583
- by(fact("buck-converter-design.pl", clause(7)))
584
- ),
585
- proof(
586
- goal(converter(regulator1, outputVoltage_V, 5.0)),
587
- by(fact("buck-converter-design.pl", clause(8)))
588
- ),
589
- proof(
590
- goal(converter(regulator1, inductance_H, 0.000022)),
591
- by(fact("buck-converter-design.pl", clause(11)))
592
- ),
593
- proof(
594
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
595
- by(fact("buck-converter-design.pl", clause(10)))
596
- ),
597
- proof(
598
- goal(duty_cycle(regulator1, 0.20833333333333334)),
599
- by(rule("buck-converter-design.pl", clause(15))),
600
- bindings([binding("Converter", regulator1), binding("Duty", 0.20833333333333334), binding("OutputVoltage", 5.0), binding("InputVoltage", 24.0)]),
601
- uses([
602
- proof(
603
- goal(converter(regulator1, outputVoltage_V, 5.0)),
604
- by(fact("buck-converter-design.pl", clause(8)))
605
- ),
606
- proof(
607
- goal(converter(regulator1, inputVoltage_V, 24.0)),
608
- by(fact("buck-converter-design.pl", clause(7)))
609
- ),
610
- proof(
611
- goal(div(5.0, 24.0, 0.20833333333333334)),
612
- by(builtin(div, 3))
613
- )
614
- ])
615
- ),
616
- proof(
617
- goal(sub(24.0, 5.0, 19.0)),
618
- by(builtin(sub, 3))
619
- ),
620
- proof(
621
- goal(mul(19.0, 0.20833333333333334, 3.9583333333333335)),
622
- by(builtin(mul, 3))
623
- ),
624
- proof(
625
- goal(mul(0.000022, 500000.0, 11.0)),
626
- by(builtin(mul, 3))
627
- ),
628
- proof(
629
- goal(div(3.9583333333333335, 11.0, 0.35984848484848486)),
630
- by(builtin(div, 3))
631
- )
632
- ])
633
- ),
634
- proof(
635
- goal(converter(regulator1, switchingFrequency_Hz, 500000.0)),
636
- by(fact("buck-converter-design.pl", clause(10)))
637
- ),
638
- proof(
639
- goal(converter(regulator1, capacitance_F, 0.000047)),
640
- by(fact("buck-converter-design.pl", clause(12)))
641
- ),
642
- proof(
643
- goal(mul(8.0, 500000.0, 4000000.0)),
644
- by(builtin(mul, 3))
645
- ),
646
- proof(
647
- goal(mul(4000000.0, 0.000047, 188.0)),
648
- by(builtin(mul, 3))
649
- ),
650
- proof(
651
- goal(div(0.35984848484848486, 188.0, 0.0019140876853642812)),
652
- by(builtin(div, 3))
653
- )
654
- ])
655
- ),
656
- proof(
657
- goal(limit(regulator1, maxOutputRipple_V, 0.05)),
658
- by(fact("buck-converter-design.pl", clause(14)))
659
- ),
660
- proof(
661
- goal(lt(0.0019140876853642812, 0.05)),
662
- by(builtin(lt, 2))
663
- )
664
- ])
665
- )
666
- ])
667
- )
668
- ).
669
-