@higher.archi/boe 1.0.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.
- package/dist/core/compilers/condition.compiler.d.ts +26 -0
- package/dist/core/compilers/condition.compiler.d.ts.map +1 -0
- package/dist/core/compilers/condition.compiler.js +159 -0
- package/dist/core/compilers/condition.compiler.js.map +1 -0
- package/dist/core/compilers/index.d.ts +5 -0
- package/dist/core/compilers/index.d.ts.map +1 -0
- package/dist/core/compilers/index.js +11 -0
- package/dist/core/compilers/index.js.map +1 -0
- package/dist/core/engine/engine.interface.d.ts +44 -0
- package/dist/core/engine/engine.interface.d.ts.map +1 -0
- package/dist/core/engine/engine.interface.js +10 -0
- package/dist/core/engine/engine.interface.js.map +1 -0
- package/dist/core/engine/index.d.ts +5 -0
- package/dist/core/engine/index.d.ts.map +1 -0
- package/dist/core/engine/index.js +6 -0
- package/dist/core/engine/index.js.map +1 -0
- package/dist/core/evaluation/condition.evaluator.d.ts +18 -0
- package/dist/core/evaluation/condition.evaluator.d.ts.map +1 -0
- package/dist/core/evaluation/condition.evaluator.js +179 -0
- package/dist/core/evaluation/condition.evaluator.js.map +1 -0
- package/dist/core/evaluation/index.d.ts +7 -0
- package/dist/core/evaluation/index.d.ts.map +1 -0
- package/dist/core/evaluation/index.js +19 -0
- package/dist/core/evaluation/index.js.map +1 -0
- package/dist/core/evaluation/temporal.d.ts +52 -0
- package/dist/core/evaluation/temporal.d.ts.map +1 -0
- package/dist/core/evaluation/temporal.js +166 -0
- package/dist/core/evaluation/temporal.js.map +1 -0
- package/dist/core/index.d.ts +25 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +73 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/matching/activation.types.d.ts +11 -0
- package/dist/core/matching/activation.types.d.ts.map +1 -0
- package/dist/core/matching/activation.types.js +6 -0
- package/dist/core/matching/activation.types.js.map +1 -0
- package/dist/core/matching/index.d.ts +6 -0
- package/dist/core/matching/index.d.ts.map +1 -0
- package/dist/core/matching/index.js +10 -0
- package/dist/core/matching/index.js.map +1 -0
- package/dist/core/matching/matcher.d.ts +17 -0
- package/dist/core/matching/matcher.d.ts.map +1 -0
- package/dist/core/matching/matcher.js +93 -0
- package/dist/core/matching/matcher.js.map +1 -0
- package/dist/core/memory/index.d.ts +6 -0
- package/dist/core/memory/index.d.ts.map +1 -0
- package/dist/core/memory/index.js +9 -0
- package/dist/core/memory/index.js.map +1 -0
- package/dist/core/memory/working-memory.d.ts +26 -0
- package/dist/core/memory/working-memory.d.ts.map +1 -0
- package/dist/core/memory/working-memory.interface.d.ts +84 -0
- package/dist/core/memory/working-memory.interface.d.ts.map +1 -0
- package/dist/core/memory/working-memory.interface.js +6 -0
- package/dist/core/memory/working-memory.interface.js.map +1 -0
- package/dist/core/memory/working-memory.js +102 -0
- package/dist/core/memory/working-memory.js.map +1 -0
- package/dist/core/operators/adapters/context.adapter.d.ts +32 -0
- package/dist/core/operators/adapters/context.adapter.d.ts.map +1 -0
- package/dist/core/operators/adapters/context.adapter.js +36 -0
- package/dist/core/operators/adapters/context.adapter.js.map +1 -0
- package/dist/core/operators/adapters/index.d.ts +9 -0
- package/dist/core/operators/adapters/index.d.ts.map +1 -0
- package/dist/core/operators/adapters/index.js +22 -0
- package/dist/core/operators/adapters/index.js.map +1 -0
- package/dist/core/operators/adapters/operator.adapter.d.ts +94 -0
- package/dist/core/operators/adapters/operator.adapter.d.ts.map +1 -0
- package/dist/core/operators/adapters/operator.adapter.js +156 -0
- package/dist/core/operators/adapters/operator.adapter.js.map +1 -0
- package/dist/core/operators/arithmetic/add.d.ts +17 -0
- package/dist/core/operators/arithmetic/add.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/add.js +35 -0
- package/dist/core/operators/arithmetic/add.js.map +1 -0
- package/dist/core/operators/arithmetic/average.d.ts +13 -0
- package/dist/core/operators/arithmetic/average.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/average.js +21 -0
- package/dist/core/operators/arithmetic/average.js.map +1 -0
- package/dist/core/operators/arithmetic/divide.d.ts +17 -0
- package/dist/core/operators/arithmetic/divide.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/divide.js +33 -0
- package/dist/core/operators/arithmetic/divide.js.map +1 -0
- package/dist/core/operators/arithmetic/index.d.ts +20 -0
- package/dist/core/operators/arithmetic/index.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/index.js +59 -0
- package/dist/core/operators/arithmetic/index.js.map +1 -0
- package/dist/core/operators/arithmetic/min-max.d.ts +25 -0
- package/dist/core/operators/arithmetic/min-max.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/min-max.js +51 -0
- package/dist/core/operators/arithmetic/min-max.js.map +1 -0
- package/dist/core/operators/arithmetic/multiply.d.ts +17 -0
- package/dist/core/operators/arithmetic/multiply.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/multiply.js +31 -0
- package/dist/core/operators/arithmetic/multiply.js.map +1 -0
- package/dist/core/operators/arithmetic/number-checks.d.ts +41 -0
- package/dist/core/operators/arithmetic/number-checks.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/number-checks.js +84 -0
- package/dist/core/operators/arithmetic/number-checks.js.map +1 -0
- package/dist/core/operators/arithmetic/power.d.ts +17 -0
- package/dist/core/operators/arithmetic/power.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/power.js +31 -0
- package/dist/core/operators/arithmetic/power.js.map +1 -0
- package/dist/core/operators/arithmetic/rounding.d.ts +29 -0
- package/dist/core/operators/arithmetic/rounding.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/rounding.js +59 -0
- package/dist/core/operators/arithmetic/rounding.js.map +1 -0
- package/dist/core/operators/arithmetic/subtract.d.ts +17 -0
- package/dist/core/operators/arithmetic/subtract.d.ts.map +1 -0
- package/dist/core/operators/arithmetic/subtract.js +32 -0
- package/dist/core/operators/arithmetic/subtract.js.map +1 -0
- package/dist/core/operators/array/contains.d.ts +29 -0
- package/dist/core/operators/array/contains.d.ts.map +1 -0
- package/dist/core/operators/array/contains.js +61 -0
- package/dist/core/operators/array/contains.js.map +1 -0
- package/dist/core/operators/array/index.d.ts +12 -0
- package/dist/core/operators/array/index.d.ts.map +1 -0
- package/dist/core/operators/array/index.js +35 -0
- package/dist/core/operators/array/index.js.map +1 -0
- package/dist/core/operators/comparison/approximately-equals.d.ts +17 -0
- package/dist/core/operators/comparison/approximately-equals.d.ts.map +1 -0
- package/dist/core/operators/comparison/approximately-equals.js +35 -0
- package/dist/core/operators/comparison/approximately-equals.js.map +1 -0
- package/dist/core/operators/comparison/equals.d.ts +18 -0
- package/dist/core/operators/comparison/equals.d.ts.map +1 -0
- package/dist/core/operators/comparison/equals.js +40 -0
- package/dist/core/operators/comparison/equals.js.map +1 -0
- package/dist/core/operators/comparison/greater-than.d.ts +18 -0
- package/dist/core/operators/comparison/greater-than.d.ts.map +1 -0
- package/dist/core/operators/comparison/greater-than.js +42 -0
- package/dist/core/operators/comparison/greater-than.js.map +1 -0
- package/dist/core/operators/comparison/index.d.ts +17 -0
- package/dist/core/operators/comparison/index.d.ts.map +1 -0
- package/dist/core/operators/comparison/index.js +50 -0
- package/dist/core/operators/comparison/index.js.map +1 -0
- package/dist/core/operators/comparison/less-than.d.ts +18 -0
- package/dist/core/operators/comparison/less-than.d.ts.map +1 -0
- package/dist/core/operators/comparison/less-than.js +42 -0
- package/dist/core/operators/comparison/less-than.js.map +1 -0
- package/dist/core/operators/comparison/not-equals.d.ts +18 -0
- package/dist/core/operators/comparison/not-equals.d.ts.map +1 -0
- package/dist/core/operators/comparison/not-equals.js +40 -0
- package/dist/core/operators/comparison/not-equals.js.map +1 -0
- package/dist/core/operators/comparison/nullish.d.ts +45 -0
- package/dist/core/operators/comparison/nullish.d.ts.map +1 -0
- package/dist/core/operators/comparison/nullish.js +110 -0
- package/dist/core/operators/comparison/nullish.js.map +1 -0
- package/dist/core/operators/date/arithmetic.d.ts +24 -0
- package/dist/core/operators/date/arithmetic.d.ts.map +1 -0
- package/dist/core/operators/date/arithmetic.js +170 -0
- package/dist/core/operators/date/arithmetic.js.map +1 -0
- package/dist/core/operators/date/boundaries.d.ts +18 -0
- package/dist/core/operators/date/boundaries.d.ts.map +1 -0
- package/dist/core/operators/date/boundaries.js +115 -0
- package/dist/core/operators/date/boundaries.js.map +1 -0
- package/dist/core/operators/date/checks.d.ts +16 -0
- package/dist/core/operators/date/checks.d.ts.map +1 -0
- package/dist/core/operators/date/checks.js +81 -0
- package/dist/core/operators/date/checks.js.map +1 -0
- package/dist/core/operators/date/comparisons.d.ts +16 -0
- package/dist/core/operators/date/comparisons.d.ts.map +1 -0
- package/dist/core/operators/date/comparisons.js +86 -0
- package/dist/core/operators/date/comparisons.js.map +1 -0
- package/dist/core/operators/date/constants.d.ts +38 -0
- package/dist/core/operators/date/constants.d.ts.map +1 -0
- package/dist/core/operators/date/constants.js +82 -0
- package/dist/core/operators/date/constants.js.map +1 -0
- package/dist/core/operators/date/differences.d.ts +18 -0
- package/dist/core/operators/date/differences.d.ts.map +1 -0
- package/dist/core/operators/date/differences.js +105 -0
- package/dist/core/operators/date/differences.js.map +1 -0
- package/dist/core/operators/date/extraction.d.ts +19 -0
- package/dist/core/operators/date/extraction.d.ts.map +1 -0
- package/dist/core/operators/date/extraction.js +98 -0
- package/dist/core/operators/date/extraction.js.map +1 -0
- package/dist/core/operators/date/generators.d.ts +24 -0
- package/dist/core/operators/date/generators.d.ts.map +1 -0
- package/dist/core/operators/date/generators.js +156 -0
- package/dist/core/operators/date/generators.js.map +1 -0
- package/dist/core/operators/date/index.d.ts +31 -0
- package/dist/core/operators/date/index.d.ts.map +1 -0
- package/dist/core/operators/date/index.js +80 -0
- package/dist/core/operators/date/index.js.map +1 -0
- package/dist/core/operators/date/range.d.ts +17 -0
- package/dist/core/operators/date/range.d.ts.map +1 -0
- package/dist/core/operators/date/range.js +34 -0
- package/dist/core/operators/date/range.js.map +1 -0
- package/dist/core/operators/evaluator.d.ts +71 -0
- package/dist/core/operators/evaluator.d.ts.map +1 -0
- package/dist/core/operators/evaluator.js +186 -0
- package/dist/core/operators/evaluator.js.map +1 -0
- package/dist/core/operators/examples.d.ts +8 -0
- package/dist/core/operators/examples.d.ts.map +1 -0
- package/dist/core/operators/examples.js +184 -0
- package/dist/core/operators/examples.js.map +1 -0
- package/dist/core/operators/index.d.ts +82 -0
- package/dist/core/operators/index.d.ts.map +1 -0
- package/dist/core/operators/index.js +142 -0
- package/dist/core/operators/index.js.map +1 -0
- package/dist/core/operators/logical/and.d.ts +13 -0
- package/dist/core/operators/logical/and.d.ts.map +1 -0
- package/dist/core/operators/logical/and.js +21 -0
- package/dist/core/operators/logical/and.js.map +1 -0
- package/dist/core/operators/logical/if.d.ts +19 -0
- package/dist/core/operators/logical/if.d.ts.map +1 -0
- package/dist/core/operators/logical/if.js +27 -0
- package/dist/core/operators/logical/if.js.map +1 -0
- package/dist/core/operators/logical/index.d.ts +16 -0
- package/dist/core/operators/logical/index.d.ts.map +1 -0
- package/dist/core/operators/logical/index.js +47 -0
- package/dist/core/operators/logical/index.js.map +1 -0
- package/dist/core/operators/logical/not.d.ts +13 -0
- package/dist/core/operators/logical/not.d.ts.map +1 -0
- package/dist/core/operators/logical/not.js +21 -0
- package/dist/core/operators/logical/not.js.map +1 -0
- package/dist/core/operators/logical/or.d.ts +13 -0
- package/dist/core/operators/logical/or.d.ts.map +1 -0
- package/dist/core/operators/logical/or.js +21 -0
- package/dist/core/operators/logical/or.js.map +1 -0
- package/dist/core/operators/logical/xor.d.ts +17 -0
- package/dist/core/operators/logical/xor.d.ts.map +1 -0
- package/dist/core/operators/logical/xor.js +31 -0
- package/dist/core/operators/logical/xor.js.map +1 -0
- package/dist/core/operators/operator.d.ts +171 -0
- package/dist/core/operators/operator.d.ts.map +1 -0
- package/dist/core/operators/operator.js +230 -0
- package/dist/core/operators/operator.js.map +1 -0
- package/dist/core/operators/phonetic/caverphone.d.ts +17 -0
- package/dist/core/operators/phonetic/caverphone.d.ts.map +1 -0
- package/dist/core/operators/phonetic/caverphone.js +31 -0
- package/dist/core/operators/phonetic/caverphone.js.map +1 -0
- package/dist/core/operators/phonetic/index.d.ts +14 -0
- package/dist/core/operators/phonetic/index.d.ts.map +1 -0
- package/dist/core/operators/phonetic/index.js +41 -0
- package/dist/core/operators/phonetic/index.js.map +1 -0
- package/dist/core/operators/phonetic/nysiis.d.ts +17 -0
- package/dist/core/operators/phonetic/nysiis.d.ts.map +1 -0
- package/dist/core/operators/phonetic/nysiis.js +31 -0
- package/dist/core/operators/phonetic/nysiis.js.map +1 -0
- package/dist/core/operators/phonetic/soundex.d.ts +17 -0
- package/dist/core/operators/phonetic/soundex.d.ts.map +1 -0
- package/dist/core/operators/phonetic/soundex.js +32 -0
- package/dist/core/operators/phonetic/soundex.js.map +1 -0
- package/dist/core/operators/registry.d.ts +89 -0
- package/dist/core/operators/registry.d.ts.map +1 -0
- package/dist/core/operators/registry.js +217 -0
- package/dist/core/operators/registry.js.map +1 -0
- package/dist/core/operators/similarity/cosine.d.ts +13 -0
- package/dist/core/operators/similarity/cosine.d.ts.map +1 -0
- package/dist/core/operators/similarity/cosine.js +23 -0
- package/dist/core/operators/similarity/cosine.js.map +1 -0
- package/dist/core/operators/similarity/index.d.ts +12 -0
- package/dist/core/operators/similarity/index.d.ts.map +1 -0
- package/dist/core/operators/similarity/index.js +35 -0
- package/dist/core/operators/similarity/index.js.map +1 -0
- package/dist/core/operators/string/contains.d.ts +17 -0
- package/dist/core/operators/string/contains.d.ts.map +1 -0
- package/dist/core/operators/string/contains.js +33 -0
- package/dist/core/operators/string/contains.js.map +1 -0
- package/dist/core/operators/string/empty.d.ts +21 -0
- package/dist/core/operators/string/empty.d.ts.map +1 -0
- package/dist/core/operators/string/empty.js +41 -0
- package/dist/core/operators/string/empty.js.map +1 -0
- package/dist/core/operators/string/ends-with.d.ts +17 -0
- package/dist/core/operators/string/ends-with.d.ts.map +1 -0
- package/dist/core/operators/string/ends-with.js +31 -0
- package/dist/core/operators/string/ends-with.js.map +1 -0
- package/dist/core/operators/string/index.d.ts +16 -0
- package/dist/core/operators/string/index.d.ts.map +1 -0
- package/dist/core/operators/string/index.js +47 -0
- package/dist/core/operators/string/index.js.map +1 -0
- package/dist/core/operators/string/regex.d.ts +17 -0
- package/dist/core/operators/string/regex.d.ts.map +1 -0
- package/dist/core/operators/string/regex.js +33 -0
- package/dist/core/operators/string/regex.js.map +1 -0
- package/dist/core/operators/string/starts-with.d.ts +17 -0
- package/dist/core/operators/string/starts-with.d.ts.map +1 -0
- package/dist/core/operators/string/starts-with.js +31 -0
- package/dist/core/operators/string/starts-with.js.map +1 -0
- package/dist/core/operators/transform/case.d.ts +25 -0
- package/dist/core/operators/transform/case.d.ts.map +1 -0
- package/dist/core/operators/transform/case.js +54 -0
- package/dist/core/operators/transform/case.js.map +1 -0
- package/dist/core/operators/transform/concat.d.ts +21 -0
- package/dist/core/operators/transform/concat.d.ts.map +1 -0
- package/dist/core/operators/transform/concat.js +40 -0
- package/dist/core/operators/transform/concat.js.map +1 -0
- package/dist/core/operators/transform/index.d.ts +18 -0
- package/dist/core/operators/transform/index.d.ts.map +1 -0
- package/dist/core/operators/transform/index.js +53 -0
- package/dist/core/operators/transform/index.js.map +1 -0
- package/dist/core/operators/transform/length.d.ts +17 -0
- package/dist/core/operators/transform/length.d.ts.map +1 -0
- package/dist/core/operators/transform/length.js +35 -0
- package/dist/core/operators/transform/length.js.map +1 -0
- package/dist/core/operators/transform/pad.d.ts +17 -0
- package/dist/core/operators/transform/pad.d.ts.map +1 -0
- package/dist/core/operators/transform/pad.js +31 -0
- package/dist/core/operators/transform/pad.js.map +1 -0
- package/dist/core/operators/transform/replace.d.ts +17 -0
- package/dist/core/operators/transform/replace.d.ts.map +1 -0
- package/dist/core/operators/transform/replace.js +29 -0
- package/dist/core/operators/transform/replace.js.map +1 -0
- package/dist/core/operators/transform/substring.d.ts +25 -0
- package/dist/core/operators/transform/substring.d.ts.map +1 -0
- package/dist/core/operators/transform/substring.js +50 -0
- package/dist/core/operators/transform/substring.js.map +1 -0
- package/dist/core/operators/transform/trim.d.ts +21 -0
- package/dist/core/operators/transform/trim.d.ts.map +1 -0
- package/dist/core/operators/transform/trim.js +40 -0
- package/dist/core/operators/transform/trim.js.map +1 -0
- package/dist/core/operators/types.d.ts +109 -0
- package/dist/core/operators/types.d.ts.map +1 -0
- package/dist/core/operators/types.js +9 -0
- package/dist/core/operators/types.js.map +1 -0
- package/dist/core/parser/errors.d.ts +50 -0
- package/dist/core/parser/errors.d.ts.map +1 -0
- package/dist/core/parser/errors.js +77 -0
- package/dist/core/parser/errors.js.map +1 -0
- package/dist/core/parser/index.d.ts +73 -0
- package/dist/core/parser/index.d.ts.map +1 -0
- package/dist/core/parser/index.js +120 -0
- package/dist/core/parser/index.js.map +1 -0
- package/dist/core/parser/operators/aliases.d.ts +50 -0
- package/dist/core/parser/operators/aliases.d.ts.map +1 -0
- package/dist/core/parser/operators/aliases.js +288 -0
- package/dist/core/parser/operators/aliases.js.map +1 -0
- package/dist/core/parser/operators/index.d.ts +17 -0
- package/dist/core/parser/operators/index.d.ts.map +1 -0
- package/dist/core/parser/operators/index.js +34 -0
- package/dist/core/parser/operators/index.js.map +1 -0
- package/dist/core/parser/operators/operator-table.d.ts +33 -0
- package/dist/core/parser/operators/operator-table.d.ts.map +1 -0
- package/dist/core/parser/operators/operator-table.js +91 -0
- package/dist/core/parser/operators/operator-table.js.map +1 -0
- package/dist/core/parser/operators/precedence.d.ts +58 -0
- package/dist/core/parser/operators/precedence.d.ts.map +1 -0
- package/dist/core/parser/operators/precedence.js +76 -0
- package/dist/core/parser/operators/precedence.js.map +1 -0
- package/dist/core/parser/parser/expression.parser.d.ts +34 -0
- package/dist/core/parser/parser/expression.parser.d.ts.map +1 -0
- package/dist/core/parser/parser/expression.parser.js +250 -0
- package/dist/core/parser/parser/expression.parser.js.map +1 -0
- package/dist/core/parser/parser/function.parser.d.ts +26 -0
- package/dist/core/parser/parser/function.parser.d.ts.map +1 -0
- package/dist/core/parser/parser/function.parser.js +86 -0
- package/dist/core/parser/parser/function.parser.js.map +1 -0
- package/dist/core/parser/parser/index.d.ts +19 -0
- package/dist/core/parser/parser/index.d.ts.map +1 -0
- package/dist/core/parser/parser/index.js +24 -0
- package/dist/core/parser/parser/index.js.map +1 -0
- package/dist/core/parser/parser/primary.parser.d.ts +17 -0
- package/dist/core/parser/parser/primary.parser.d.ts.map +1 -0
- package/dist/core/parser/parser/primary.parser.js +110 -0
- package/dist/core/parser/parser/primary.parser.js.map +1 -0
- package/dist/core/parser/parser/types.d.ts +36 -0
- package/dist/core/parser/parser/types.d.ts.map +1 -0
- package/dist/core/parser/parser/types.js +3 -0
- package/dist/core/parser/parser/types.js.map +1 -0
- package/dist/core/parser/tokenizer/index.d.ts +32 -0
- package/dist/core/parser/tokenizer/index.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/index.js +68 -0
- package/dist/core/parser/tokenizer/index.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/identifier.reader.d.ts +30 -0
- package/dist/core/parser/tokenizer/readers/identifier.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/identifier.reader.js +109 -0
- package/dist/core/parser/tokenizer/readers/identifier.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/index.d.ts +20 -0
- package/dist/core/parser/tokenizer/readers/index.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/index.js +29 -0
- package/dist/core/parser/tokenizer/readers/index.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/number.reader.d.ts +43 -0
- package/dist/core/parser/tokenizer/readers/number.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/number.reader.js +115 -0
- package/dist/core/parser/tokenizer/readers/number.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/property-ref.reader.d.ts +20 -0
- package/dist/core/parser/tokenizer/readers/property-ref.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/property-ref.reader.js +114 -0
- package/dist/core/parser/tokenizer/readers/property-ref.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/string.reader.d.ts +22 -0
- package/dist/core/parser/tokenizer/readers/string.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/string.reader.js +93 -0
- package/dist/core/parser/tokenizer/readers/string.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/symbol.reader.d.ts +22 -0
- package/dist/core/parser/tokenizer/readers/symbol.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/symbol.reader.js +107 -0
- package/dist/core/parser/tokenizer/readers/symbol.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/readers/whitespace.reader.d.ts +12 -0
- package/dist/core/parser/tokenizer/readers/whitespace.reader.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/readers/whitespace.reader.js +20 -0
- package/dist/core/parser/tokenizer/readers/whitespace.reader.js.map +1 -0
- package/dist/core/parser/tokenizer/scanner.d.ts +74 -0
- package/dist/core/parser/tokenizer/scanner.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/scanner.js +137 -0
- package/dist/core/parser/tokenizer/scanner.js.map +1 -0
- package/dist/core/parser/tokenizer/types.d.ts +55 -0
- package/dist/core/parser/tokenizer/types.d.ts.map +1 -0
- package/dist/core/parser/tokenizer/types.js +3 -0
- package/dist/core/parser/tokenizer/types.js.map +1 -0
- package/dist/core/parser/types.d.ts +83 -0
- package/dist/core/parser/types.d.ts.map +1 -0
- package/dist/core/parser/types.js +3 -0
- package/dist/core/parser/types.js.map +1 -0
- package/dist/core/refraction/index.d.ts +5 -0
- package/dist/core/refraction/index.d.ts.map +1 -0
- package/dist/core/refraction/index.js +9 -0
- package/dist/core/refraction/index.js.map +1 -0
- package/dist/core/refraction/refraction.d.ts +28 -0
- package/dist/core/refraction/refraction.d.ts.map +1 -0
- package/dist/core/refraction/refraction.js +62 -0
- package/dist/core/refraction/refraction.js.map +1 -0
- package/dist/core/resolution/conflict-resolver.d.ts +12 -0
- package/dist/core/resolution/conflict-resolver.d.ts.map +1 -0
- package/dist/core/resolution/conflict-resolver.js +57 -0
- package/dist/core/resolution/conflict-resolver.js.map +1 -0
- package/dist/core/resolution/index.d.ts +5 -0
- package/dist/core/resolution/index.d.ts.map +1 -0
- package/dist/core/resolution/index.js +10 -0
- package/dist/core/resolution/index.js.map +1 -0
- package/dist/core/shapes/index.d.ts +5 -0
- package/dist/core/shapes/index.d.ts.map +1 -0
- package/dist/core/shapes/index.js +9 -0
- package/dist/core/shapes/index.js.map +1 -0
- package/dist/core/shapes/shape.normalizer.d.ts +6 -0
- package/dist/core/shapes/shape.normalizer.d.ts.map +1 -0
- package/dist/core/shapes/shape.normalizer.js +61 -0
- package/dist/core/shapes/shape.normalizer.js.map +1 -0
- package/dist/core/types/condition.d.ts +87 -0
- package/dist/core/types/condition.d.ts.map +1 -0
- package/dist/core/types/condition.js +6 -0
- package/dist/core/types/condition.js.map +1 -0
- package/dist/core/types/fact.d.ts +23 -0
- package/dist/core/types/fact.d.ts.map +1 -0
- package/dist/core/types/fact.js +6 -0
- package/dist/core/types/fact.js.map +1 -0
- package/dist/core/types/index.d.ts +8 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +6 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/core/types/rule.d.ts +72 -0
- package/dist/core/types/rule.d.ts.map +1 -0
- package/dist/core/types/rule.js +8 -0
- package/dist/core/types/rule.js.map +1 -0
- package/dist/core/types/schema.d.ts +16 -0
- package/dist/core/types/schema.d.ts.map +1 -0
- package/dist/core/types/schema.js +6 -0
- package/dist/core/types/schema.js.map +1 -0
- package/dist/engines/backward/compiler.d.ts +7 -0
- package/dist/engines/backward/compiler.d.ts.map +1 -0
- package/dist/engines/backward/compiler.js +94 -0
- package/dist/engines/backward/compiler.js.map +1 -0
- package/dist/engines/backward/engine.d.ts +54 -0
- package/dist/engines/backward/engine.d.ts.map +1 -0
- package/dist/engines/backward/engine.js +96 -0
- package/dist/engines/backward/engine.js.map +1 -0
- package/dist/engines/backward/index.d.ts +12 -0
- package/dist/engines/backward/index.d.ts.map +1 -0
- package/dist/engines/backward/index.js +22 -0
- package/dist/engines/backward/index.js.map +1 -0
- package/dist/engines/backward/strategy.d.ts +37 -0
- package/dist/engines/backward/strategy.d.ts.map +1 -0
- package/dist/engines/backward/strategy.js +161 -0
- package/dist/engines/backward/strategy.js.map +1 -0
- package/dist/engines/backward/types.d.ts +97 -0
- package/dist/engines/backward/types.d.ts.map +1 -0
- package/dist/engines/backward/types.js +6 -0
- package/dist/engines/backward/types.js.map +1 -0
- package/dist/engines/bayesian/compiler.d.ts +22 -0
- package/dist/engines/bayesian/compiler.d.ts.map +1 -0
- package/dist/engines/bayesian/compiler.js +308 -0
- package/dist/engines/bayesian/compiler.js.map +1 -0
- package/dist/engines/bayesian/engine.d.ts +53 -0
- package/dist/engines/bayesian/engine.d.ts.map +1 -0
- package/dist/engines/bayesian/engine.js +95 -0
- package/dist/engines/bayesian/engine.js.map +1 -0
- package/dist/engines/bayesian/index.d.ts +11 -0
- package/dist/engines/bayesian/index.d.ts.map +1 -0
- package/dist/engines/bayesian/index.js +26 -0
- package/dist/engines/bayesian/index.js.map +1 -0
- package/dist/engines/bayesian/strategy.d.ts +13 -0
- package/dist/engines/bayesian/strategy.d.ts.map +1 -0
- package/dist/engines/bayesian/strategy.js +213 -0
- package/dist/engines/bayesian/strategy.js.map +1 -0
- package/dist/engines/bayesian/types.d.ts +145 -0
- package/dist/engines/bayesian/types.d.ts.map +1 -0
- package/dist/engines/bayesian/types.js +25 -0
- package/dist/engines/bayesian/types.js.map +1 -0
- package/dist/engines/constraint/compiler.d.ts +9 -0
- package/dist/engines/constraint/compiler.d.ts.map +1 -0
- package/dist/engines/constraint/compiler.js +188 -0
- package/dist/engines/constraint/compiler.js.map +1 -0
- package/dist/engines/constraint/engine.d.ts +95 -0
- package/dist/engines/constraint/engine.d.ts.map +1 -0
- package/dist/engines/constraint/engine.js +144 -0
- package/dist/engines/constraint/engine.js.map +1 -0
- package/dist/engines/constraint/index.d.ts +11 -0
- package/dist/engines/constraint/index.d.ts.map +1 -0
- package/dist/engines/constraint/index.js +36 -0
- package/dist/engines/constraint/index.js.map +1 -0
- package/dist/engines/constraint/strategy.d.ts +22 -0
- package/dist/engines/constraint/strategy.d.ts.map +1 -0
- package/dist/engines/constraint/strategy.js +529 -0
- package/dist/engines/constraint/strategy.js.map +1 -0
- package/dist/engines/constraint/types.d.ts +332 -0
- package/dist/engines/constraint/types.d.ts.map +1 -0
- package/dist/engines/constraint/types.js +26 -0
- package/dist/engines/constraint/types.js.map +1 -0
- package/dist/engines/defeasible/compiler.d.ts +34 -0
- package/dist/engines/defeasible/compiler.d.ts.map +1 -0
- package/dist/engines/defeasible/compiler.js +251 -0
- package/dist/engines/defeasible/compiler.js.map +1 -0
- package/dist/engines/defeasible/engine.d.ts +73 -0
- package/dist/engines/defeasible/engine.d.ts.map +1 -0
- package/dist/engines/defeasible/engine.js +115 -0
- package/dist/engines/defeasible/engine.js.map +1 -0
- package/dist/engines/defeasible/index.d.ts +10 -0
- package/dist/engines/defeasible/index.d.ts.map +1 -0
- package/dist/engines/defeasible/index.js +20 -0
- package/dist/engines/defeasible/index.js.map +1 -0
- package/dist/engines/defeasible/strategy.d.ts +25 -0
- package/dist/engines/defeasible/strategy.d.ts.map +1 -0
- package/dist/engines/defeasible/strategy.js +459 -0
- package/dist/engines/defeasible/strategy.js.map +1 -0
- package/dist/engines/defeasible/types.d.ts +316 -0
- package/dist/engines/defeasible/types.d.ts.map +1 -0
- package/dist/engines/defeasible/types.js +35 -0
- package/dist/engines/defeasible/types.js.map +1 -0
- package/dist/engines/expert/compiler.d.ts +16 -0
- package/dist/engines/expert/compiler.d.ts.map +1 -0
- package/dist/engines/expert/compiler.js +205 -0
- package/dist/engines/expert/compiler.js.map +1 -0
- package/dist/engines/expert/doc/expert-loan-approval.d.ts +17 -0
- package/dist/engines/expert/doc/expert-loan-approval.d.ts.map +1 -0
- package/dist/engines/expert/doc/expert-loan-approval.js +430 -0
- package/dist/engines/expert/doc/expert-loan-approval.js.map +1 -0
- package/dist/engines/expert/engine.d.ts +159 -0
- package/dist/engines/expert/engine.d.ts.map +1 -0
- package/dist/engines/expert/engine.js +201 -0
- package/dist/engines/expert/engine.js.map +1 -0
- package/dist/engines/expert/formatter.d.ts +56 -0
- package/dist/engines/expert/formatter.d.ts.map +1 -0
- package/dist/engines/expert/formatter.js +182 -0
- package/dist/engines/expert/formatter.js.map +1 -0
- package/dist/engines/expert/index.d.ts +37 -0
- package/dist/engines/expert/index.d.ts.map +1 -0
- package/dist/engines/expert/index.js +59 -0
- package/dist/engines/expert/index.js.map +1 -0
- package/dist/engines/expert/interpolation.d.ts +83 -0
- package/dist/engines/expert/interpolation.d.ts.map +1 -0
- package/dist/engines/expert/interpolation.js +218 -0
- package/dist/engines/expert/interpolation.js.map +1 -0
- package/dist/engines/expert/strategy.d.ts +13 -0
- package/dist/engines/expert/strategy.d.ts.map +1 -0
- package/dist/engines/expert/strategy.js +281 -0
- package/dist/engines/expert/strategy.js.map +1 -0
- package/dist/engines/expert/types.d.ts +346 -0
- package/dist/engines/expert/types.d.ts.map +1 -0
- package/dist/engines/expert/types.js +30 -0
- package/dist/engines/expert/types.js.map +1 -0
- package/dist/engines/forward/compiler.d.ts +7 -0
- package/dist/engines/forward/compiler.d.ts.map +1 -0
- package/dist/engines/forward/compiler.js +160 -0
- package/dist/engines/forward/compiler.js.map +1 -0
- package/dist/engines/forward/engine.d.ts +69 -0
- package/dist/engines/forward/engine.d.ts.map +1 -0
- package/dist/engines/forward/engine.js +111 -0
- package/dist/engines/forward/engine.js.map +1 -0
- package/dist/engines/forward/index.d.ts +12 -0
- package/dist/engines/forward/index.d.ts.map +1 -0
- package/dist/engines/forward/index.js +22 -0
- package/dist/engines/forward/index.js.map +1 -0
- package/dist/engines/forward/strategy.d.ts +15 -0
- package/dist/engines/forward/strategy.d.ts.map +1 -0
- package/dist/engines/forward/strategy.js +139 -0
- package/dist/engines/forward/strategy.js.map +1 -0
- package/dist/engines/forward/types.d.ts +152 -0
- package/dist/engines/forward/types.d.ts.map +1 -0
- package/dist/engines/forward/types.js +6 -0
- package/dist/engines/forward/types.js.map +1 -0
- package/dist/engines/fuzzy/compiler.d.ts +29 -0
- package/dist/engines/fuzzy/compiler.d.ts.map +1 -0
- package/dist/engines/fuzzy/compiler.js +136 -0
- package/dist/engines/fuzzy/compiler.js.map +1 -0
- package/dist/engines/fuzzy/defuzzify.d.ts +7 -0
- package/dist/engines/fuzzy/defuzzify.d.ts.map +1 -0
- package/dist/engines/fuzzy/defuzzify.js +34 -0
- package/dist/engines/fuzzy/defuzzify.js.map +1 -0
- package/dist/engines/fuzzy/engine.d.ts +55 -0
- package/dist/engines/fuzzy/engine.d.ts.map +1 -0
- package/dist/engines/fuzzy/engine.js +96 -0
- package/dist/engines/fuzzy/engine.js.map +1 -0
- package/dist/engines/fuzzy/fuzzy.defuzzify.d.ts +116 -0
- package/dist/engines/fuzzy/fuzzy.defuzzify.d.ts.map +1 -0
- package/dist/engines/fuzzy/fuzzy.defuzzify.js +454 -0
- package/dist/engines/fuzzy/fuzzy.defuzzify.js.map +1 -0
- package/dist/engines/fuzzy/fuzzy.membership.d.ts +162 -0
- package/dist/engines/fuzzy/fuzzy.membership.d.ts.map +1 -0
- package/dist/engines/fuzzy/fuzzy.membership.js +492 -0
- package/dist/engines/fuzzy/fuzzy.membership.js.map +1 -0
- package/dist/engines/fuzzy/fuzzy.types.d.ts +213 -0
- package/dist/engines/fuzzy/fuzzy.types.d.ts.map +1 -0
- package/dist/engines/fuzzy/fuzzy.types.js +71 -0
- package/dist/engines/fuzzy/fuzzy.types.js.map +1 -0
- package/dist/engines/fuzzy/index.d.ts +16 -0
- package/dist/engines/fuzzy/index.d.ts.map +1 -0
- package/dist/engines/fuzzy/index.js +46 -0
- package/dist/engines/fuzzy/index.js.map +1 -0
- package/dist/engines/fuzzy/membership.d.ts +7 -0
- package/dist/engines/fuzzy/membership.d.ts.map +1 -0
- package/dist/engines/fuzzy/membership.js +19 -0
- package/dist/engines/fuzzy/membership.js.map +1 -0
- package/dist/engines/fuzzy/strategy.d.ts +59 -0
- package/dist/engines/fuzzy/strategy.d.ts.map +1 -0
- package/dist/engines/fuzzy/strategy.js +255 -0
- package/dist/engines/fuzzy/strategy.js.map +1 -0
- package/dist/engines/fuzzy/types.d.ts +24 -0
- package/dist/engines/fuzzy/types.d.ts.map +1 -0
- package/dist/engines/fuzzy/types.js +17 -0
- package/dist/engines/fuzzy/types.js.map +1 -0
- package/dist/engines/index.d.ts +20 -0
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +49 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/monte-carlo/compiler.d.ts +12 -0
- package/dist/engines/monte-carlo/compiler.d.ts.map +1 -0
- package/dist/engines/monte-carlo/compiler.js +378 -0
- package/dist/engines/monte-carlo/compiler.js.map +1 -0
- package/dist/engines/monte-carlo/engine.d.ts +62 -0
- package/dist/engines/monte-carlo/engine.d.ts.map +1 -0
- package/dist/engines/monte-carlo/engine.js +106 -0
- package/dist/engines/monte-carlo/engine.js.map +1 -0
- package/dist/engines/monte-carlo/index.d.ts +12 -0
- package/dist/engines/monte-carlo/index.d.ts.map +1 -0
- package/dist/engines/monte-carlo/index.js +21 -0
- package/dist/engines/monte-carlo/index.js.map +1 -0
- package/dist/engines/monte-carlo/sobol.d.ts +39 -0
- package/dist/engines/monte-carlo/sobol.d.ts.map +1 -0
- package/dist/engines/monte-carlo/sobol.js +267 -0
- package/dist/engines/monte-carlo/sobol.js.map +1 -0
- package/dist/engines/monte-carlo/strategy.d.ts +20 -0
- package/dist/engines/monte-carlo/strategy.d.ts.map +1 -0
- package/dist/engines/monte-carlo/strategy.js +443 -0
- package/dist/engines/monte-carlo/strategy.js.map +1 -0
- package/dist/engines/monte-carlo/types.d.ts +230 -0
- package/dist/engines/monte-carlo/types.d.ts.map +1 -0
- package/dist/engines/monte-carlo/types.js +40 -0
- package/dist/engines/monte-carlo/types.js.map +1 -0
- package/dist/engines/pricing/calculator.d.ts +100 -0
- package/dist/engines/pricing/calculator.d.ts.map +1 -0
- package/dist/engines/pricing/calculator.js +210 -0
- package/dist/engines/pricing/calculator.js.map +1 -0
- package/dist/engines/pricing/compiler.d.ts +18 -0
- package/dist/engines/pricing/compiler.d.ts.map +1 -0
- package/dist/engines/pricing/compiler.js +275 -0
- package/dist/engines/pricing/compiler.js.map +1 -0
- package/dist/engines/pricing/engine.d.ts +102 -0
- package/dist/engines/pricing/engine.d.ts.map +1 -0
- package/dist/engines/pricing/engine.js +131 -0
- package/dist/engines/pricing/engine.js.map +1 -0
- package/dist/engines/pricing/index.d.ts +66 -0
- package/dist/engines/pricing/index.d.ts.map +1 -0
- package/dist/engines/pricing/index.js +89 -0
- package/dist/engines/pricing/index.js.map +1 -0
- package/dist/engines/pricing/strategy.d.ts +22 -0
- package/dist/engines/pricing/strategy.d.ts.map +1 -0
- package/dist/engines/pricing/strategy.js +517 -0
- package/dist/engines/pricing/strategy.js.map +1 -0
- package/dist/engines/pricing/types.d.ts +620 -0
- package/dist/engines/pricing/types.d.ts.map +1 -0
- package/dist/engines/pricing/types.js +68 -0
- package/dist/engines/pricing/types.js.map +1 -0
- package/dist/engines/scoring/compiler.d.ts +7 -0
- package/dist/engines/scoring/compiler.d.ts.map +1 -0
- package/dist/engines/scoring/compiler.js +113 -0
- package/dist/engines/scoring/compiler.js.map +1 -0
- package/dist/engines/scoring/engine.d.ts +52 -0
- package/dist/engines/scoring/engine.d.ts.map +1 -0
- package/dist/engines/scoring/engine.js +94 -0
- package/dist/engines/scoring/engine.js.map +1 -0
- package/dist/engines/scoring/index.d.ts +11 -0
- package/dist/engines/scoring/index.d.ts.map +1 -0
- package/dist/engines/scoring/index.js +21 -0
- package/dist/engines/scoring/index.js.map +1 -0
- package/dist/engines/scoring/strategy.d.ts +13 -0
- package/dist/engines/scoring/strategy.d.ts.map +1 -0
- package/dist/engines/scoring/strategy.js +158 -0
- package/dist/engines/scoring/strategy.js.map +1 -0
- package/dist/engines/scoring/types.d.ts +159 -0
- package/dist/engines/scoring/types.d.ts.map +1 -0
- package/dist/engines/scoring/types.js +6 -0
- package/dist/engines/scoring/types.js.map +1 -0
- package/dist/engines/sequential/compiler.d.ts +7 -0
- package/dist/engines/sequential/compiler.d.ts.map +1 -0
- package/dist/engines/sequential/compiler.js +156 -0
- package/dist/engines/sequential/compiler.js.map +1 -0
- package/dist/engines/sequential/engine.d.ts +55 -0
- package/dist/engines/sequential/engine.d.ts.map +1 -0
- package/dist/engines/sequential/engine.js +97 -0
- package/dist/engines/sequential/engine.js.map +1 -0
- package/dist/engines/sequential/index.d.ts +11 -0
- package/dist/engines/sequential/index.d.ts.map +1 -0
- package/dist/engines/sequential/index.js +21 -0
- package/dist/engines/sequential/index.js.map +1 -0
- package/dist/engines/sequential/strategy.d.ts +13 -0
- package/dist/engines/sequential/strategy.d.ts.map +1 -0
- package/dist/engines/sequential/strategy.js +96 -0
- package/dist/engines/sequential/strategy.js.map +1 -0
- package/dist/engines/sequential/types.d.ts +65 -0
- package/dist/engines/sequential/types.d.ts.map +1 -0
- package/dist/engines/sequential/types.js +6 -0
- package/dist/engines/sequential/types.js.map +1 -0
- package/dist/engines/state-machine/compiler.d.ts +12 -0
- package/dist/engines/state-machine/compiler.d.ts.map +1 -0
- package/dist/engines/state-machine/compiler.js +205 -0
- package/dist/engines/state-machine/compiler.js.map +1 -0
- package/dist/engines/state-machine/engine.d.ts +83 -0
- package/dist/engines/state-machine/engine.d.ts.map +1 -0
- package/dist/engines/state-machine/engine.js +107 -0
- package/dist/engines/state-machine/engine.js.map +1 -0
- package/dist/engines/state-machine/index.d.ts +11 -0
- package/dist/engines/state-machine/index.d.ts.map +1 -0
- package/dist/engines/state-machine/index.js +21 -0
- package/dist/engines/state-machine/index.js.map +1 -0
- package/dist/engines/state-machine/strategy.d.ts +19 -0
- package/dist/engines/state-machine/strategy.d.ts.map +1 -0
- package/dist/engines/state-machine/strategy.js +535 -0
- package/dist/engines/state-machine/strategy.js.map +1 -0
- package/dist/engines/state-machine/types.d.ts +229 -0
- package/dist/engines/state-machine/types.d.ts.map +1 -0
- package/dist/engines/state-machine/types.js +9 -0
- package/dist/engines/state-machine/types.js.map +1 -0
- package/dist/engines/utility/compiler.d.ts +7 -0
- package/dist/engines/utility/compiler.d.ts.map +1 -0
- package/dist/engines/utility/compiler.js +170 -0
- package/dist/engines/utility/compiler.js.map +1 -0
- package/dist/engines/utility/engine.d.ts +108 -0
- package/dist/engines/utility/engine.d.ts.map +1 -0
- package/dist/engines/utility/engine.js +152 -0
- package/dist/engines/utility/engine.js.map +1 -0
- package/dist/engines/utility/index.d.ts +17 -0
- package/dist/engines/utility/index.d.ts.map +1 -0
- package/dist/engines/utility/index.js +30 -0
- package/dist/engines/utility/index.js.map +1 -0
- package/dist/engines/utility/strategy.d.ts +30 -0
- package/dist/engines/utility/strategy.d.ts.map +1 -0
- package/dist/engines/utility/strategy.js +248 -0
- package/dist/engines/utility/strategy.js.map +1 -0
- package/dist/engines/utility/types.d.ts +176 -0
- package/dist/engines/utility/types.d.ts.map +1 -0
- package/dist/engines/utility/types.js +35 -0
- package/dist/engines/utility/types.js.map +1 -0
- package/dist/functions/index.d.ts +9 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/index.js +27 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/functions/phonetic/caverphone2.d.ts +36 -0
- package/dist/functions/phonetic/caverphone2.d.ts.map +1 -0
- package/dist/functions/phonetic/caverphone2.js +151 -0
- package/dist/functions/phonetic/caverphone2.js.map +1 -0
- package/dist/functions/phonetic/index.d.ts +9 -0
- package/dist/functions/phonetic/index.d.ts.map +1 -0
- package/dist/functions/phonetic/index.js +18 -0
- package/dist/functions/phonetic/index.js.map +1 -0
- package/dist/functions/phonetic/nysiis.d.ts +38 -0
- package/dist/functions/phonetic/nysiis.d.ts.map +1 -0
- package/dist/functions/phonetic/nysiis.js +162 -0
- package/dist/functions/phonetic/nysiis.js.map +1 -0
- package/dist/functions/phonetic/soundex.d.ts +48 -0
- package/dist/functions/phonetic/soundex.d.ts.map +1 -0
- package/dist/functions/phonetic/soundex.js +103 -0
- package/dist/functions/phonetic/soundex.js.map +1 -0
- package/dist/functions/similarity/cosine-similarity.d.ts +31 -0
- package/dist/functions/similarity/cosine-similarity.d.ts.map +1 -0
- package/dist/functions/similarity/cosine-similarity.js +75 -0
- package/dist/functions/similarity/cosine-similarity.js.map +1 -0
- package/dist/functions/similarity/index.d.ts +7 -0
- package/dist/functions/similarity/index.d.ts.map +1 -0
- package/dist/functions/similarity/index.js +11 -0
- package/dist/functions/similarity/index.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +172 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime/index.d.ts +15 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +17 -0
- package/dist/runtime/index.js.map +1 -0
- package/package.json +41 -0
- package/src/core/compilers/condition.compiler.ts +176 -0
- package/src/core/compilers/index.ts +9 -0
- package/src/core/engine/engine.interface.ts +49 -0
- package/src/core/engine/index.ts +5 -0
- package/src/core/evaluation/condition.evaluator.ts +185 -0
- package/src/core/evaluation/index.ts +20 -0
- package/src/core/evaluation/temporal.ts +222 -0
- package/src/core/index.ts +75 -0
- package/src/core/matching/activation.types.ts +12 -0
- package/src/core/matching/index.ts +6 -0
- package/src/core/matching/matcher.ts +127 -0
- package/src/core/memory/index.ts +6 -0
- package/src/core/memory/working-memory.interface.ts +95 -0
- package/src/core/memory/working-memory.ts +123 -0
- package/src/core/operators/adapters/context.adapter.ts +53 -0
- package/src/core/operators/adapters/index.ts +25 -0
- package/src/core/operators/adapters/operator.adapter.ts +173 -0
- package/src/core/operators/arithmetic/add.ts +44 -0
- package/src/core/operators/arithmetic/average.ts +25 -0
- package/src/core/operators/arithmetic/divide.ts +42 -0
- package/src/core/operators/arithmetic/index.ts +42 -0
- package/src/core/operators/arithmetic/min-max.ts +70 -0
- package/src/core/operators/arithmetic/multiply.ts +40 -0
- package/src/core/operators/arithmetic/number-checks.ts +123 -0
- package/src/core/operators/arithmetic/power.ts +40 -0
- package/src/core/operators/arithmetic/rounding.ts +83 -0
- package/src/core/operators/arithmetic/subtract.ts +41 -0
- package/src/core/operators/array/contains.ts +85 -0
- package/src/core/operators/array/index.ts +18 -0
- package/src/core/operators/comparison/approximately-equals.ts +45 -0
- package/src/core/operators/comparison/equals.ts +49 -0
- package/src/core/operators/comparison/greater-than.ts +53 -0
- package/src/core/operators/comparison/index.ts +33 -0
- package/src/core/operators/comparison/less-than.ts +53 -0
- package/src/core/operators/comparison/not-equals.ts +49 -0
- package/src/core/operators/comparison/nullish.ts +155 -0
- package/src/core/operators/date/arithmetic.ts +246 -0
- package/src/core/operators/date/boundaries.ts +155 -0
- package/src/core/operators/date/checks.ts +116 -0
- package/src/core/operators/date/comparisons.ts +124 -0
- package/src/core/operators/date/constants.ts +102 -0
- package/src/core/operators/date/differences.ts +150 -0
- package/src/core/operators/date/extraction.ts +145 -0
- package/src/core/operators/date/generators.ts +232 -0
- package/src/core/operators/date/index.ts +63 -0
- package/src/core/operators/date/range.ts +39 -0
- package/src/core/operators/evaluator.ts +245 -0
- package/src/core/operators/examples.ts +233 -0
- package/src/core/operators/index.ts +135 -0
- package/src/core/operators/logical/and.ts +25 -0
- package/src/core/operators/logical/if.ts +31 -0
- package/src/core/operators/logical/index.ts +30 -0
- package/src/core/operators/logical/not.ts +25 -0
- package/src/core/operators/logical/or.ts +25 -0
- package/src/core/operators/logical/xor.ts +40 -0
- package/src/core/operators/operator.ts +338 -0
- package/src/core/operators/phonetic/caverphone.ts +40 -0
- package/src/core/operators/phonetic/index.ts +24 -0
- package/src/core/operators/phonetic/nysiis.ts +40 -0
- package/src/core/operators/phonetic/soundex.ts +41 -0
- package/src/core/operators/registry.ts +254 -0
- package/src/core/operators/similarity/cosine.ts +27 -0
- package/src/core/operators/similarity/index.ts +18 -0
- package/src/core/operators/string/contains.ts +42 -0
- package/src/core/operators/string/empty.ts +55 -0
- package/src/core/operators/string/ends-with.ts +40 -0
- package/src/core/operators/string/index.ts +30 -0
- package/src/core/operators/string/regex.ts +42 -0
- package/src/core/operators/string/starts-with.ts +40 -0
- package/src/core/operators/transform/case.ts +74 -0
- package/src/core/operators/transform/concat.ts +54 -0
- package/src/core/operators/transform/index.ts +36 -0
- package/src/core/operators/transform/length.ts +37 -0
- package/src/core/operators/transform/pad.ts +40 -0
- package/src/core/operators/transform/replace.ts +38 -0
- package/src/core/operators/transform/substring.ts +69 -0
- package/src/core/operators/transform/trim.ts +54 -0
- package/src/core/operators/types.ts +140 -0
- package/src/core/parser/errors.ts +77 -0
- package/src/core/parser/index.ts +133 -0
- package/src/core/parser/operators/aliases.ts +358 -0
- package/src/core/parser/operators/index.ts +35 -0
- package/src/core/parser/operators/operator-table.ts +107 -0
- package/src/core/parser/operators/precedence.ts +94 -0
- package/src/core/parser/parser/expression.parser.ts +308 -0
- package/src/core/parser/parser/function.parser.ts +113 -0
- package/src/core/parser/parser/index.ts +20 -0
- package/src/core/parser/parser/primary.parser.ts +149 -0
- package/src/core/parser/parser/types.ts +51 -0
- package/src/core/parser/tokenizer/index.ts +85 -0
- package/src/core/parser/tokenizer/readers/identifier.reader.ts +118 -0
- package/src/core/parser/tokenizer/readers/index.ts +20 -0
- package/src/core/parser/tokenizer/readers/number.reader.ts +132 -0
- package/src/core/parser/tokenizer/readers/property-ref.reader.ts +130 -0
- package/src/core/parser/tokenizer/readers/string.reader.ts +110 -0
- package/src/core/parser/tokenizer/readers/symbol.reader.ts +118 -0
- package/src/core/parser/tokenizer/readers/whitespace.reader.ts +18 -0
- package/src/core/parser/tokenizer/scanner.ts +137 -0
- package/src/core/parser/tokenizer/types.ts +63 -0
- package/src/core/parser/types.ts +102 -0
- package/src/core/refraction/index.ts +5 -0
- package/src/core/refraction/refraction.ts +71 -0
- package/src/core/resolution/conflict-resolver.ts +87 -0
- package/src/core/resolution/index.ts +10 -0
- package/src/core/shapes/index.ts +5 -0
- package/src/core/shapes/shape.normalizer.ts +68 -0
- package/src/core/types/condition.ts +185 -0
- package/src/core/types/fact.ts +26 -0
- package/src/core/types/index.ts +55 -0
- package/src/core/types/rule.ts +108 -0
- package/src/core/types/schema.ts +18 -0
- package/src/engines/backward/compiler.ts +118 -0
- package/src/engines/backward/engine.ts +123 -0
- package/src/engines/backward/index.ts +39 -0
- package/src/engines/backward/strategy.ts +229 -0
- package/src/engines/backward/types.ts +125 -0
- package/src/engines/bayesian/compiler.ts +402 -0
- package/src/engines/bayesian/engine.ts +122 -0
- package/src/engines/bayesian/index.ts +50 -0
- package/src/engines/bayesian/strategy.ts +273 -0
- package/src/engines/bayesian/types.ts +219 -0
- package/src/engines/constraint/compiler.ts +267 -0
- package/src/engines/constraint/engine.ts +175 -0
- package/src/engines/constraint/index.ts +18 -0
- package/src/engines/constraint/strategy.ts +725 -0
- package/src/engines/constraint/types.ts +415 -0
- package/src/engines/defeasible/compiler.ts +306 -0
- package/src/engines/defeasible/engine.ts +142 -0
- package/src/engines/defeasible/index.ts +48 -0
- package/src/engines/defeasible/strategy.ts +573 -0
- package/src/engines/defeasible/types.ts +409 -0
- package/src/engines/expert/README.md +343 -0
- package/src/engines/expert/compiler.ts +277 -0
- package/src/engines/expert/doc/expert-loan-approval.ts +458 -0
- package/src/engines/expert/engine.ts +228 -0
- package/src/engines/expert/formatter.ts +242 -0
- package/src/engines/expert/index.ts +85 -0
- package/src/engines/expert/interpolation.ts +278 -0
- package/src/engines/expert/strategy.ts +413 -0
- package/src/engines/expert/types.ts +442 -0
- package/src/engines/forward/compiler.ts +205 -0
- package/src/engines/forward/engine.ts +138 -0
- package/src/engines/forward/index.ts +51 -0
- package/src/engines/forward/strategy.ts +197 -0
- package/src/engines/forward/types.ts +205 -0
- package/src/engines/fuzzy/compiler.ts +182 -0
- package/src/engines/fuzzy/defuzzify.ts +39 -0
- package/src/engines/fuzzy/engine.ts +124 -0
- package/src/engines/fuzzy/fuzzy.defuzzify.ts +564 -0
- package/src/engines/fuzzy/fuzzy.membership.ts +604 -0
- package/src/engines/fuzzy/fuzzy.types.ts +357 -0
- package/src/engines/fuzzy/index.ts +38 -0
- package/src/engines/fuzzy/membership.ts +22 -0
- package/src/engines/fuzzy/strategy.ts +373 -0
- package/src/engines/fuzzy/types.ts +84 -0
- package/src/engines/index.ts +45 -0
- package/src/engines/monte-carlo/compiler.ts +459 -0
- package/src/engines/monte-carlo/engine.ts +134 -0
- package/src/engines/monte-carlo/index.ts +44 -0
- package/src/engines/monte-carlo/strategy.ts +565 -0
- package/src/engines/monte-carlo/types.ts +320 -0
- package/src/engines/pricing/calculator.ts +272 -0
- package/src/engines/pricing/compiler.ts +381 -0
- package/src/engines/pricing/engine.ts +152 -0
- package/src/engines/pricing/index.ts +156 -0
- package/src/engines/pricing/strategy.ts +736 -0
- package/src/engines/pricing/types.ts +782 -0
- package/src/engines/scoring/compiler.ts +139 -0
- package/src/engines/scoring/engine.ts +121 -0
- package/src/engines/scoring/index.ts +46 -0
- package/src/engines/scoring/strategy.ts +190 -0
- package/src/engines/scoring/types.ts +201 -0
- package/src/engines/sequential/compiler.ts +201 -0
- package/src/engines/sequential/engine.ts +124 -0
- package/src/engines/sequential/index.ts +38 -0
- package/src/engines/sequential/strategy.ts +125 -0
- package/src/engines/sequential/types.ts +101 -0
- package/src/engines/state-machine/compiler.ts +266 -0
- package/src/engines/state-machine/engine.ts +128 -0
- package/src/engines/state-machine/index.ts +45 -0
- package/src/engines/state-machine/strategy.ts +634 -0
- package/src/engines/state-machine/types.ts +254 -0
- package/src/engines/utility/compiler.ts +208 -0
- package/src/engines/utility/engine.ts +200 -0
- package/src/engines/utility/index.ts +53 -0
- package/src/engines/utility/strategy.ts +315 -0
- package/src/engines/utility/types.ts +225 -0
- package/src/functions/README.md +63 -0
- package/src/functions/index.ts +12 -0
- package/src/functions/phonetic/caverphone2.ts +172 -0
- package/src/functions/phonetic/index.ts +9 -0
- package/src/functions/phonetic/nysiis.ts +164 -0
- package/src/functions/phonetic/soundex.ts +111 -0
- package/src/functions/similarity/cosine-similarity.ts +83 -0
- package/src/functions/similarity/index.ts +7 -0
- package/src/index.ts +362 -0
- package/src/runtime/index.ts +16 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core condition and operand types - shared across all engines
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ========================================
|
|
6
|
+
// Operator Type Definitions
|
|
7
|
+
// ========================================
|
|
8
|
+
|
|
9
|
+
export type UnaryOperator =
|
|
10
|
+
| 'isNaN' | 'isOdd' | 'isEven'
|
|
11
|
+
| 'isEmpty' | 'isNotEmpty'
|
|
12
|
+
| 'isTrue' | 'isFalse'
|
|
13
|
+
| 'isNull' | 'isNotNull' | 'isDefined' | 'isUndefined'
|
|
14
|
+
| 'not'
|
|
15
|
+
| 'abs' | 'negate' | 'sqrt' | 'ceil' | 'floor' | 'round'
|
|
16
|
+
| 'soundex' | 'nysiis' | 'caverphone2'
|
|
17
|
+
// String functions
|
|
18
|
+
| 'trim' | 'ltrim' | 'rtrim' | 'upper' | 'lower' | 'reverse' | 'length'
|
|
19
|
+
// Date generators (number → Date)
|
|
20
|
+
| 'secondsAgo' | 'minutesAgo' | 'hoursAgo' | 'daysAgo' | 'weeksAgo' | 'monthsAgo' | 'yearsAgo'
|
|
21
|
+
| 'secondsFromNow' | 'minutesFromNow' | 'hoursFromNow' | 'daysFromNow' | 'weeksFromNow' | 'monthsFromNow' | 'yearsFromNow'
|
|
22
|
+
// Date extraction (Date → number)
|
|
23
|
+
| 'getYear' | 'getMonth' | 'getDay' | 'getDayOfWeek' | 'getHour' | 'getMinute' | 'getSecond' | 'getQuarter' | 'getWeekOfYear'
|
|
24
|
+
// Date boundaries (Date → Date)
|
|
25
|
+
| 'startOfDay' | 'endOfDay' | 'startOfWeek' | 'endOfWeek' | 'startOfMonth' | 'endOfMonth' | 'startOfYear' | 'endOfYear'
|
|
26
|
+
// Date checks (Date → boolean)
|
|
27
|
+
| 'isWeekend' | 'isWeekday' | 'isLeapYear' | 'isFuture' | 'isPast' | 'isToday'
|
|
28
|
+
// Date constants (any → Date)
|
|
29
|
+
| 'now' | 'today' | 'tomorrow' | 'yesterday';
|
|
30
|
+
|
|
31
|
+
export type BinaryOperator =
|
|
32
|
+
| 'equals' | 'notEquals'
|
|
33
|
+
| 'greaterThan' | 'greaterThanOrEquals'
|
|
34
|
+
| 'lessThan' | 'lessThanOrEquals'
|
|
35
|
+
| 'approximatelyEquals'
|
|
36
|
+
| 'contains' | 'startsWith' | 'endsWith'
|
|
37
|
+
| 'equalsIgnoreCase' | 'notEqualsIgnoreCase'
|
|
38
|
+
| 'startsWithIgnoreCase' | 'endsWithIgnoreCase'
|
|
39
|
+
| 'containsIgnoreCase'
|
|
40
|
+
| 'regex' | 'regexIgnoreCase'
|
|
41
|
+
| 'in'
|
|
42
|
+
| 'xor'
|
|
43
|
+
| 'add' | 'subtract' | 'multiply' | 'divide' | 'modulo' | 'power' | 'min' | 'max'
|
|
44
|
+
| 'soundexMatch' | 'nysiisMatch' | 'caverphone2Match'
|
|
45
|
+
| 'cosineSimilarity'
|
|
46
|
+
// String functions
|
|
47
|
+
| 'concat' | 'repeat'
|
|
48
|
+
// Date arithmetic (Date, number → Date)
|
|
49
|
+
| 'addSeconds' | 'addMinutes' | 'addHours' | 'addDays' | 'addWeeks' | 'addMonths' | 'addYears'
|
|
50
|
+
| 'subtractSeconds' | 'subtractMinutes' | 'subtractHours' | 'subtractDays' | 'subtractWeeks' | 'subtractMonths' | 'subtractYears'
|
|
51
|
+
// Date differences (Date, Date → number)
|
|
52
|
+
| 'diffMilliseconds' | 'diffSeconds' | 'diffMinutes' | 'diffHours' | 'diffDays' | 'diffWeeks' | 'diffMonths' | 'diffYears'
|
|
53
|
+
// Date comparisons (Date, Date → boolean)
|
|
54
|
+
| 'isBefore' | 'isAfter' | 'isSameDay' | 'isSameWeek' | 'isSameMonth' | 'isSameYear';
|
|
55
|
+
|
|
56
|
+
export type TernaryOperator =
|
|
57
|
+
| 'substring' | 'replace' | 'replaceAll' | 'padStart' | 'padEnd'
|
|
58
|
+
// Date range (Date, Date, Date → boolean)
|
|
59
|
+
| 'isBetween';
|
|
60
|
+
|
|
61
|
+
export type VariadicOperator = 'and' | 'or' | 'sum' | 'product' | 'average';
|
|
62
|
+
|
|
63
|
+
export type Operator = UnaryOperator | BinaryOperator | TernaryOperator | VariadicOperator;
|
|
64
|
+
|
|
65
|
+
// ========================================
|
|
66
|
+
// Operand Types (source/uncompiled)
|
|
67
|
+
// ========================================
|
|
68
|
+
|
|
69
|
+
export type PropertyRef = `$${string}`;
|
|
70
|
+
|
|
71
|
+
export type FunctionExpr = {
|
|
72
|
+
fn: string;
|
|
73
|
+
args: Operand[];
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type UnitValue = {
|
|
77
|
+
value: number;
|
|
78
|
+
unit: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type ConstantValue =
|
|
82
|
+
| string
|
|
83
|
+
| number
|
|
84
|
+
| boolean
|
|
85
|
+
| null
|
|
86
|
+
| UnitValue
|
|
87
|
+
| any[];
|
|
88
|
+
|
|
89
|
+
export type Operand =
|
|
90
|
+
| PropertyRef
|
|
91
|
+
| FunctionExpr
|
|
92
|
+
| ConstantValue;
|
|
93
|
+
|
|
94
|
+
// ========================================
|
|
95
|
+
// Condition Types (source/uncompiled)
|
|
96
|
+
// ========================================
|
|
97
|
+
|
|
98
|
+
export type UnaryCondition = [UnaryOperator, Operand];
|
|
99
|
+
|
|
100
|
+
export type BinaryCondition = [BinaryOperator, Operand, Operand];
|
|
101
|
+
|
|
102
|
+
export type TernaryCondition = [TernaryOperator, Operand, Operand, Operand];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Variadic comparison conditions
|
|
106
|
+
* equals: ['equals', x, a, b, c] → x == a OR x == b OR x == c
|
|
107
|
+
* notEquals: ['notEquals', x, a, b, c] → x != a AND x != b AND x != c
|
|
108
|
+
*/
|
|
109
|
+
export type VariadicComparisonCondition =
|
|
110
|
+
| ['equals', Operand, Operand, Operand, ...Operand[]]
|
|
111
|
+
| ['notEquals', Operand, Operand, Operand, ...Operand[]];
|
|
112
|
+
|
|
113
|
+
export type LogicalCondition =
|
|
114
|
+
| ["not", Condition]
|
|
115
|
+
| ["xor", Condition, Condition]
|
|
116
|
+
| ["and", ...Condition[]]
|
|
117
|
+
| ["or", ...Condition[]];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Fuzzy membership conditions
|
|
121
|
+
* Used in fuzzy mode to check membership degree
|
|
122
|
+
*
|
|
123
|
+
* ['is', '$temp', 'temperature.hot'] -> membership degree (0-1)
|
|
124
|
+
* ['isNot', '$temp', 'temperature.hot'] -> 1 - membership degree
|
|
125
|
+
*/
|
|
126
|
+
export type FuzzyCondition =
|
|
127
|
+
| ["is", Operand, string] // ['is', value, 'variable.term']
|
|
128
|
+
| ["isNot", Operand, string]; // ['isNot', value, 'variable.term']
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Expression string condition - allows inline expression syntax
|
|
132
|
+
*
|
|
133
|
+
* Examples:
|
|
134
|
+
* - ['expr', '$age >= 18 and $hasLicense == true']
|
|
135
|
+
* - ['expr', '$score > 90 or $bonus == true']
|
|
136
|
+
* - ['expr', '$price * $quantity > 100']
|
|
137
|
+
*
|
|
138
|
+
* Expression strings are parsed at compile time into the same
|
|
139
|
+
* internal representation as S-expression conditions.
|
|
140
|
+
*/
|
|
141
|
+
export type ExpressionTuple = ["expr", string];
|
|
142
|
+
|
|
143
|
+
export type Condition =
|
|
144
|
+
| UnaryCondition
|
|
145
|
+
| BinaryCondition
|
|
146
|
+
| TernaryCondition
|
|
147
|
+
| VariadicComparisonCondition
|
|
148
|
+
| LogicalCondition
|
|
149
|
+
| FuzzyCondition
|
|
150
|
+
| ExpressionTuple;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Expression - semantic alias for Condition when used in numeric/value contexts
|
|
154
|
+
*
|
|
155
|
+
* While Condition implies boolean evaluation (true/false), Expression is used
|
|
156
|
+
* when the same structure evaluates to a numeric or other value type.
|
|
157
|
+
*
|
|
158
|
+
* Examples:
|
|
159
|
+
* - Condition: ['eq', '$age', 18] -> boolean
|
|
160
|
+
* - Expression: ['mult', 10, '$years'] -> number
|
|
161
|
+
* - Expression: ['add', '$base', '$bonus'] -> number
|
|
162
|
+
*/
|
|
163
|
+
export type Expression = Condition;
|
|
164
|
+
|
|
165
|
+
// ========================================
|
|
166
|
+
// Compiled Types
|
|
167
|
+
// ========================================
|
|
168
|
+
|
|
169
|
+
export type CompiledPath = {
|
|
170
|
+
param: string;
|
|
171
|
+
path: string[];
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export type CompiledOperand =
|
|
175
|
+
| { type: "property"; ref: CompiledPath }
|
|
176
|
+
| { type: "constant"; value: any }
|
|
177
|
+
| { type: "function"; fn: string; args: CompiledOperand[] }
|
|
178
|
+
| { type: "expression"; compiled: CompiledCondition };
|
|
179
|
+
|
|
180
|
+
export type CompiledCondition = {
|
|
181
|
+
op: string;
|
|
182
|
+
arity: "unary" | "binary" | "ternary" | "variadic";
|
|
183
|
+
operands?: CompiledOperand[];
|
|
184
|
+
children?: CompiledCondition[];
|
|
185
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core fact types - shared across all engines
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type FactInput = {
|
|
6
|
+
id?: string;
|
|
7
|
+
type: string;
|
|
8
|
+
data: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type Fact = {
|
|
12
|
+
id: string;
|
|
13
|
+
type: string;
|
|
14
|
+
data: Record<string, any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type FactChange = {
|
|
18
|
+
action: 'add' | 'remove' | 'update';
|
|
19
|
+
fact: Fact;
|
|
20
|
+
previous?: Fact;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Binding context maps parameter names to facts
|
|
25
|
+
*/
|
|
26
|
+
export type BindingContext = Record<string, Fact>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types - shared across all engines
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Fact types
|
|
6
|
+
export {
|
|
7
|
+
Fact,
|
|
8
|
+
FactInput,
|
|
9
|
+
FactChange,
|
|
10
|
+
BindingContext
|
|
11
|
+
} from './fact';
|
|
12
|
+
|
|
13
|
+
// Schema types
|
|
14
|
+
export {
|
|
15
|
+
JSONSchema,
|
|
16
|
+
ShapeShorthand,
|
|
17
|
+
Shape
|
|
18
|
+
} from './schema';
|
|
19
|
+
|
|
20
|
+
// Condition and operator types
|
|
21
|
+
export {
|
|
22
|
+
PropertyRef,
|
|
23
|
+
FunctionExpr,
|
|
24
|
+
UnitValue,
|
|
25
|
+
ConstantValue,
|
|
26
|
+
Operand,
|
|
27
|
+
UnaryCondition,
|
|
28
|
+
BinaryCondition,
|
|
29
|
+
TernaryCondition,
|
|
30
|
+
LogicalCondition,
|
|
31
|
+
FuzzyCondition,
|
|
32
|
+
ExpressionTuple,
|
|
33
|
+
Condition,
|
|
34
|
+
Expression,
|
|
35
|
+
UnaryOperator,
|
|
36
|
+
BinaryOperator,
|
|
37
|
+
TernaryOperator,
|
|
38
|
+
VariadicOperator,
|
|
39
|
+
Operator,
|
|
40
|
+
CompiledPath,
|
|
41
|
+
CompiledOperand,
|
|
42
|
+
CompiledCondition
|
|
43
|
+
} from './condition';
|
|
44
|
+
|
|
45
|
+
// Rule types
|
|
46
|
+
export {
|
|
47
|
+
InputParameter,
|
|
48
|
+
RuleSetMode,
|
|
49
|
+
ValidityDuration,
|
|
50
|
+
BaseRule,
|
|
51
|
+
BaseRuleSet,
|
|
52
|
+
CompiledInputParameter,
|
|
53
|
+
CompiledBaseRule,
|
|
54
|
+
CompiledBaseRuleSet
|
|
55
|
+
} from './rule';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core rule types - shared across all engines
|
|
3
|
+
*
|
|
4
|
+
* This defines the base rule structure that all engine-specific rules extend.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Condition, CompiledCondition, CompiledPath } from './condition';
|
|
8
|
+
import { JSONSchema, Shape } from './schema';
|
|
9
|
+
|
|
10
|
+
// ========================================
|
|
11
|
+
// Parameter Types
|
|
12
|
+
// ========================================
|
|
13
|
+
|
|
14
|
+
export type InputParameter = {
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
shape?: Shape;
|
|
18
|
+
where?: Condition;
|
|
19
|
+
from?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// ========================================
|
|
23
|
+
// Temporal Validity Types
|
|
24
|
+
// ========================================
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Relative duration for rule validity
|
|
28
|
+
* Used with validFor to specify "valid for X days/months from Y"
|
|
29
|
+
*/
|
|
30
|
+
export type ValidityDuration = {
|
|
31
|
+
days?: number;
|
|
32
|
+
months?: number;
|
|
33
|
+
from: string; // '$ruleset.lastModified' | '$ruleset.createdAt' | ISO date string
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// ========================================
|
|
37
|
+
// Base Rule Types
|
|
38
|
+
// ========================================
|
|
39
|
+
|
|
40
|
+
export type RuleSetMode = "forward" | "scoring" | "backward" | "sequential" | "fuzzy" | "bayesian" | "monte-carlo" | "state-machine" | "constraint" | "utility" | "defeasible" | "expert" | "pricing";
|
|
41
|
+
|
|
42
|
+
export type BaseRule = {
|
|
43
|
+
id: string; // Unique identifier (system-generated or explicit)
|
|
44
|
+
name?: string; // Optional human-readable name
|
|
45
|
+
salience?: number;
|
|
46
|
+
inputs: InputParameter[];
|
|
47
|
+
when?: Condition; // Join condition (renamed from 'where' for better readability)
|
|
48
|
+
|
|
49
|
+
// Temporal validity - rule is only active within these bounds
|
|
50
|
+
validFrom?: string; // ISO date string - rule activates on this date
|
|
51
|
+
validUntil?: string; // ISO date string - rule expires after this date
|
|
52
|
+
validFor?: ValidityDuration; // Relative duration from a reference date
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type BaseRuleSet = {
|
|
56
|
+
id: string; // Unique identifier
|
|
57
|
+
name?: string; // Optional human-readable name
|
|
58
|
+
mode: RuleSetMode;
|
|
59
|
+
shape?: Shape;
|
|
60
|
+
|
|
61
|
+
// Ruleset metadata - accessible via $ruleset in conditions
|
|
62
|
+
version?: string; // Semantic version (e.g., '1.2.0')
|
|
63
|
+
lastModified?: string; // ISO date - when ruleset was last changed
|
|
64
|
+
createdAt?: string; // ISO date - when ruleset was created
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// ========================================
|
|
68
|
+
// Compiled Parameter Types
|
|
69
|
+
// ========================================
|
|
70
|
+
|
|
71
|
+
export type CompiledInputParameter = {
|
|
72
|
+
name: string;
|
|
73
|
+
type: string;
|
|
74
|
+
schema: JSONSchema;
|
|
75
|
+
where?: CompiledCondition;
|
|
76
|
+
from?: CompiledPath;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// ========================================
|
|
80
|
+
// Compiled Base Rule Types
|
|
81
|
+
// ========================================
|
|
82
|
+
|
|
83
|
+
export type CompiledBaseRule = {
|
|
84
|
+
id: string; // Unique identifier
|
|
85
|
+
name?: string; // Optional human-readable name
|
|
86
|
+
salience: number;
|
|
87
|
+
complexity: number;
|
|
88
|
+
index: number;
|
|
89
|
+
inputs: CompiledInputParameter[];
|
|
90
|
+
when?: CompiledCondition; // Compiled join condition
|
|
91
|
+
|
|
92
|
+
// Temporal validity (preserved from source)
|
|
93
|
+
validFrom?: string;
|
|
94
|
+
validUntil?: string;
|
|
95
|
+
validFor?: ValidityDuration;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export type CompiledBaseRuleSet = {
|
|
99
|
+
id: string; // Unique identifier
|
|
100
|
+
name?: string; // Optional human-readable name
|
|
101
|
+
mode: RuleSetMode;
|
|
102
|
+
schema: JSONSchema;
|
|
103
|
+
|
|
104
|
+
// Ruleset metadata (preserved from source)
|
|
105
|
+
version?: string;
|
|
106
|
+
lastModified?: string;
|
|
107
|
+
createdAt?: string;
|
|
108
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core schema types - shared across all engines
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type JSONSchema = {
|
|
6
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "date";
|
|
7
|
+
properties?: Record<string, JSONSchema>;
|
|
8
|
+
items?: JSONSchema;
|
|
9
|
+
minimum?: number;
|
|
10
|
+
maximum?: number;
|
|
11
|
+
"x-unit"?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type ShapeShorthand =
|
|
15
|
+
| string
|
|
16
|
+
| { [key: string]: ShapeShorthand };
|
|
17
|
+
|
|
18
|
+
export type Shape = ShapeShorthand | JSONSchema;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backward Chaining Engine Compiler
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
compileCondition,
|
|
7
|
+
normalizeShape
|
|
8
|
+
} from '../../core';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
BackwardRule,
|
|
12
|
+
BackwardRuleSet,
|
|
13
|
+
BackwardConfig,
|
|
14
|
+
CompiledBackwardRule,
|
|
15
|
+
CompiledBackwardRuleSet,
|
|
16
|
+
CompiledBackwardAction
|
|
17
|
+
} from './types';
|
|
18
|
+
|
|
19
|
+
const DEFAULT_MAX_DEPTH = 100;
|
|
20
|
+
|
|
21
|
+
// ========================================
|
|
22
|
+
// Helper Functions
|
|
23
|
+
// ========================================
|
|
24
|
+
|
|
25
|
+
function countConditions(condition?: any): number {
|
|
26
|
+
if (!condition) return 0;
|
|
27
|
+
if (condition.children) {
|
|
28
|
+
return 1 + condition.children.reduce((sum: number, c: any) => sum + countConditions(c), 0);
|
|
29
|
+
}
|
|
30
|
+
return 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function calculateComplexity(inputs: any[], where?: any): number {
|
|
34
|
+
let score = 0;
|
|
35
|
+
score += inputs.length * 10;
|
|
36
|
+
score += countConditions(where) * 5;
|
|
37
|
+
for (const input of inputs) {
|
|
38
|
+
score += countConditions(input.where) * 2;
|
|
39
|
+
}
|
|
40
|
+
return score;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function compilePath(from: string) {
|
|
44
|
+
const str = from.startsWith('$') ? from.slice(1) : from;
|
|
45
|
+
const parts = str.split('.');
|
|
46
|
+
return {
|
|
47
|
+
param: parts[0],
|
|
48
|
+
path: parts.slice(1)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ========================================
|
|
53
|
+
// Parameter Compilation
|
|
54
|
+
// ========================================
|
|
55
|
+
|
|
56
|
+
function compileInputParameter(input: any) {
|
|
57
|
+
const compiled: any = {
|
|
58
|
+
name: input.name,
|
|
59
|
+
type: input.type,
|
|
60
|
+
schema: input.shape ? normalizeShape(input.shape) : { type: 'object' }
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if (input.where) {
|
|
64
|
+
compiled.where = compileCondition(input.where);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (input.from) {
|
|
68
|
+
compiled.from = compilePath(input.from);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return compiled;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ========================================
|
|
75
|
+
// Rule Compilation
|
|
76
|
+
// ========================================
|
|
77
|
+
|
|
78
|
+
export function compileBackwardRule(rule: BackwardRule, index: number = 0): CompiledBackwardRule {
|
|
79
|
+
const inputs = rule.inputs.map(compileInputParameter);
|
|
80
|
+
const when = rule.when ? compileCondition(rule.when) : undefined;
|
|
81
|
+
|
|
82
|
+
const action: CompiledBackwardAction = {
|
|
83
|
+
mode: 'backward',
|
|
84
|
+
prove: rule.prove,
|
|
85
|
+
requires: rule.requires ?? []
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
id: rule.id,
|
|
90
|
+
name: rule.name,
|
|
91
|
+
salience: rule.salience ?? 0,
|
|
92
|
+
complexity: calculateComplexity(inputs, when),
|
|
93
|
+
index,
|
|
94
|
+
inputs,
|
|
95
|
+
when,
|
|
96
|
+
action
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ========================================
|
|
101
|
+
// RuleSet Compilation
|
|
102
|
+
// ========================================
|
|
103
|
+
|
|
104
|
+
export function compileBackwardRuleSet(ruleSet: BackwardRuleSet): CompiledBackwardRuleSet {
|
|
105
|
+
const config: BackwardConfig = {
|
|
106
|
+
mode: 'backward',
|
|
107
|
+
maxDepth: ruleSet.config?.maxDepth ?? DEFAULT_MAX_DEPTH
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
id: ruleSet.id,
|
|
112
|
+
name: ruleSet.name,
|
|
113
|
+
mode: 'backward',
|
|
114
|
+
schema: ruleSet.shape ? normalizeShape(ruleSet.shape) : { type: 'object' },
|
|
115
|
+
rules: ruleSet.rules.map((rule, index) => compileBackwardRule(rule, index)),
|
|
116
|
+
config
|
|
117
|
+
};
|
|
118
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backward Chaining Engine
|
|
3
|
+
*
|
|
4
|
+
* Self-contained engine for backward chaining (goal-driven) rule execution.
|
|
5
|
+
* Implements IRuleEngine with strongly-typed ruleset, options, and result.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
IRuleEngine,
|
|
10
|
+
WorkingMemory,
|
|
11
|
+
Fact,
|
|
12
|
+
FactInput,
|
|
13
|
+
FactChange
|
|
14
|
+
} from '../../core';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
CompiledBackwardRuleSet,
|
|
18
|
+
BackwardOptions,
|
|
19
|
+
BackwardResult
|
|
20
|
+
} from './types';
|
|
21
|
+
|
|
22
|
+
import { BackwardChainingStrategy } from './strategy';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Backward chaining rule engine.
|
|
26
|
+
*
|
|
27
|
+
* Executes rules in a goal-driven manner, starting with a goal to prove
|
|
28
|
+
* and working backward to find rules and facts that support it.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const engine = new BackwardEngine();
|
|
33
|
+
* engine.add({ type: 'Customer', data: { tier: 'platinum', spend: 15000 } });
|
|
34
|
+
*
|
|
35
|
+
* const result = engine.execute(compiledRules, {
|
|
36
|
+
* goal: 'eligible-for-premium-discount'
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* if (result.proven) {
|
|
40
|
+
* console.log('Customer is eligible!');
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class BackwardEngine implements IRuleEngine<CompiledBackwardRuleSet, BackwardOptions, BackwardResult> {
|
|
45
|
+
private wm: WorkingMemory;
|
|
46
|
+
private strategy: BackwardChainingStrategy;
|
|
47
|
+
|
|
48
|
+
constructor(workingMemory?: WorkingMemory) {
|
|
49
|
+
this.wm = workingMemory ?? new WorkingMemory();
|
|
50
|
+
this.strategy = new BackwardChainingStrategy();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ========================================
|
|
54
|
+
// IWorkingMemory Implementation
|
|
55
|
+
// ========================================
|
|
56
|
+
|
|
57
|
+
add(input: FactInput): Fact {
|
|
58
|
+
return this.wm.add(input);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
remove(factId: string): Fact | undefined {
|
|
62
|
+
return this.wm.remove(factId);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
update(input: FactInput): Fact {
|
|
66
|
+
return this.wm.update(input);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get(factId: string): Fact | undefined {
|
|
70
|
+
return this.wm.get(factId);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
getByType(type: string): Fact[] {
|
|
74
|
+
return this.wm.getByType(type);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getAll(): Fact[] {
|
|
78
|
+
return this.wm.getAll();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
has(factId: string): boolean {
|
|
82
|
+
return this.wm.has(factId);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
size(): number {
|
|
86
|
+
return this.wm.size();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
clear(): void {
|
|
90
|
+
this.wm.clear();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
getChanges(): FactChange[] {
|
|
94
|
+
return this.wm.getChanges();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
clearChanges(): void {
|
|
98
|
+
this.wm.clearChanges();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ========================================
|
|
102
|
+
// IRuleEngine Implementation
|
|
103
|
+
// ========================================
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Execute a backward chaining ruleset to prove a goal.
|
|
107
|
+
*
|
|
108
|
+
* @param ruleSet - Compiled backward ruleset
|
|
109
|
+
* @param options - Runtime options including the goal to prove
|
|
110
|
+
* @returns Result indicating if goal was proven and the proof path
|
|
111
|
+
*/
|
|
112
|
+
execute(ruleSet: CompiledBackwardRuleSet, options: BackwardOptions): BackwardResult {
|
|
113
|
+
return this.strategy.run(ruleSet, this.wm, options);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// ========================================
|
|
117
|
+
// Utility Methods
|
|
118
|
+
// ========================================
|
|
119
|
+
|
|
120
|
+
getWorkingMemory(): WorkingMemory {
|
|
121
|
+
return this.wm;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backward Chaining Engine
|
|
3
|
+
*
|
|
4
|
+
* Provides backward chaining (goal-driven) rule execution.
|
|
5
|
+
* Given a goal to prove, finds rules that can prove it and
|
|
6
|
+
* checks if their conditions are satisfied by facts in working memory.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Types
|
|
10
|
+
export {
|
|
11
|
+
// Source types
|
|
12
|
+
BackwardRule,
|
|
13
|
+
BackwardRuleSet,
|
|
14
|
+
BackwardConfig,
|
|
15
|
+
// Compiled types
|
|
16
|
+
CompiledBackwardAction,
|
|
17
|
+
CompiledBackwardRule,
|
|
18
|
+
CompiledBackwardRuleSet,
|
|
19
|
+
// Runtime types
|
|
20
|
+
ProofStep,
|
|
21
|
+
ProofResult,
|
|
22
|
+
BackwardOptions,
|
|
23
|
+
BackwardResult
|
|
24
|
+
} from './types';
|
|
25
|
+
|
|
26
|
+
// Compiler
|
|
27
|
+
export {
|
|
28
|
+
compileBackwardRule,
|
|
29
|
+
compileBackwardRuleSet
|
|
30
|
+
} from './compiler';
|
|
31
|
+
|
|
32
|
+
// Strategy
|
|
33
|
+
export {
|
|
34
|
+
BackwardChainingStrategy,
|
|
35
|
+
backwardStrategy
|
|
36
|
+
} from './strategy';
|
|
37
|
+
|
|
38
|
+
// Engine
|
|
39
|
+
export { BackwardEngine } from './engine';
|