@stevenvo780/st-lang 4.1.0 → 4.3.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/belief-revision/agm.d.ts +76 -0
- package/dist/belief-revision/agm.d.ts.map +1 -0
- package/dist/belief-revision/agm.js +249 -0
- package/dist/belief-revision/agm.js.map +1 -0
- package/dist/belief-revision/index.d.ts +6 -0
- package/dist/belief-revision/index.d.ts.map +1 -0
- package/dist/belief-revision/index.js +33 -0
- package/dist/belief-revision/index.js.map +1 -0
- package/dist/belief-revision/parser.d.ts +16 -0
- package/dist/belief-revision/parser.d.ts.map +1 -0
- package/dist/belief-revision/parser.js +199 -0
- package/dist/belief-revision/parser.js.map +1 -0
- package/dist/belief-revision/sat.d.ts +19 -0
- package/dist/belief-revision/sat.d.ts.map +1 -0
- package/dist/belief-revision/sat.js +90 -0
- package/dist/belief-revision/sat.js.map +1 -0
- package/dist/belief-revision/types.d.ts +51 -0
- package/dist/belief-revision/types.d.ts.map +1 -0
- package/dist/belief-revision/types.js +10 -0
- package/dist/belief-revision/types.js.map +1 -0
- package/dist/curry-howard/index.d.ts +7 -0
- package/dist/curry-howard/index.d.ts.map +1 -0
- package/dist/curry-howard/index.js +46 -0
- package/dist/curry-howard/index.js.map +1 -0
- package/dist/curry-howard/infer.d.ts +9 -0
- package/dist/curry-howard/infer.d.ts.map +1 -0
- package/dist/curry-howard/infer.js +129 -0
- package/dist/curry-howard/infer.js.map +1 -0
- package/dist/curry-howard/proof.d.ts +7 -0
- package/dist/curry-howard/proof.d.ts.map +1 -0
- package/dist/curry-howard/proof.js +282 -0
- package/dist/curry-howard/proof.js.map +1 -0
- package/dist/curry-howard/reduce.d.ts +7 -0
- package/dist/curry-howard/reduce.d.ts.map +1 -0
- package/dist/curry-howard/reduce.js +266 -0
- package/dist/curry-howard/reduce.js.map +1 -0
- package/dist/curry-howard/types.d.ts +91 -0
- package/dist/curry-howard/types.d.ts.map +1 -0
- package/dist/curry-howard/types.js +149 -0
- package/dist/curry-howard/types.js.map +1 -0
- package/dist/fol-prover-equality/demodulate.d.ts +29 -0
- package/dist/fol-prover-equality/demodulate.d.ts.map +1 -0
- package/dist/fol-prover-equality/demodulate.js +197 -0
- package/dist/fol-prover-equality/demodulate.js.map +1 -0
- package/dist/fol-prover-equality/index.d.ts +8 -0
- package/dist/fol-prover-equality/index.d.ts.map +1 -0
- package/dist/fol-prover-equality/index.js +24 -0
- package/dist/fol-prover-equality/index.js.map +1 -0
- package/dist/fol-prover-equality/paramodulate.d.ts +46 -0
- package/dist/fol-prover-equality/paramodulate.d.ts.map +1 -0
- package/dist/fol-prover-equality/paramodulate.js +159 -0
- package/dist/fol-prover-equality/paramodulate.js.map +1 -0
- package/dist/fol-prover-equality/prove.d.ts +7 -0
- package/dist/fol-prover-equality/prove.d.ts.map +1 -0
- package/dist/fol-prover-equality/prove.js +307 -0
- package/dist/fol-prover-equality/prove.js.map +1 -0
- package/dist/fol-prover-equality/term-utils.d.ts +43 -0
- package/dist/fol-prover-equality/term-utils.d.ts.map +1 -0
- package/dist/fol-prover-equality/term-utils.js +230 -0
- package/dist/fol-prover-equality/term-utils.js.map +1 -0
- package/dist/fol-prover-equality/types.d.ts +20 -0
- package/dist/fol-prover-equality/types.d.ts.map +1 -0
- package/dist/fol-prover-equality/types.js +5 -0
- package/dist/fol-prover-equality/types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -1
- package/dist/index.js.map +1 -1
- package/dist/lambda-calc/church.d.ts +8 -0
- package/dist/lambda-calc/church.d.ts.map +1 -0
- package/dist/lambda-calc/church.js +67 -0
- package/dist/lambda-calc/church.js.map +1 -0
- package/dist/lambda-calc/combinators.d.ts +8 -0
- package/dist/lambda-calc/combinators.d.ts.map +1 -0
- package/dist/lambda-calc/combinators.js +24 -0
- package/dist/lambda-calc/combinators.js.map +1 -0
- package/dist/lambda-calc/index.d.ts +8 -0
- package/dist/lambda-calc/index.d.ts.map +1 -0
- package/dist/lambda-calc/index.js +48 -0
- package/dist/lambda-calc/index.js.map +1 -0
- package/dist/lambda-calc/reduce.d.ts +18 -0
- package/dist/lambda-calc/reduce.d.ts.map +1 -0
- package/dist/lambda-calc/reduce.js +174 -0
- package/dist/lambda-calc/reduce.js.map +1 -0
- package/dist/lambda-calc/substitution.d.ts +6 -0
- package/dist/lambda-calc/substitution.d.ts.map +1 -0
- package/dist/lambda-calc/substitution.js +120 -0
- package/dist/lambda-calc/substitution.js.map +1 -0
- package/dist/lambda-calc/types.d.ts +19 -0
- package/dist/lambda-calc/types.d.ts.map +1 -0
- package/dist/lambda-calc/types.js +72 -0
- package/dist/lambda-calc/types.js.map +1 -0
- package/dist/profiles/ctl/check.d.ts +13 -0
- package/dist/profiles/ctl/check.d.ts.map +1 -0
- package/dist/profiles/ctl/check.js +359 -0
- package/dist/profiles/ctl/check.js.map +1 -0
- package/dist/profiles/ctl/index.d.ts +5 -0
- package/dist/profiles/ctl/index.d.ts.map +1 -0
- package/dist/profiles/ctl/index.js +23 -0
- package/dist/profiles/ctl/index.js.map +1 -0
- package/dist/profiles/ctl/types.d.ts +74 -0
- package/dist/profiles/ctl/types.d.ts.map +1 -0
- package/dist/profiles/ctl/types.js +53 -0
- package/dist/profiles/ctl/types.js.map +1 -0
- package/dist/profiles/ctl/witness.d.ts +20 -0
- package/dist/profiles/ctl/witness.d.ts.map +1 -0
- package/dist/profiles/ctl/witness.js +149 -0
- package/dist/profiles/ctl/witness.js.map +1 -0
- package/dist/profiles/default-logic/entailment.d.ts +14 -0
- package/dist/profiles/default-logic/entailment.d.ts.map +1 -0
- package/dist/profiles/default-logic/entailment.js +36 -0
- package/dist/profiles/default-logic/entailment.js.map +1 -0
- package/dist/profiles/default-logic/extensions.d.ts +35 -0
- package/dist/profiles/default-logic/extensions.d.ts.map +1 -0
- package/dist/profiles/default-logic/extensions.js +276 -0
- package/dist/profiles/default-logic/extensions.js.map +1 -0
- package/dist/profiles/default-logic/index.d.ts +5 -0
- package/dist/profiles/default-logic/index.d.ts.map +1 -0
- package/dist/profiles/default-logic/index.js +33 -0
- package/dist/profiles/default-logic/index.js.map +1 -0
- package/dist/profiles/default-logic/types.d.ts +29 -0
- package/dist/profiles/default-logic/types.d.ts.map +1 -0
- package/dist/profiles/default-logic/types.js +25 -0
- package/dist/profiles/default-logic/types.js.map +1 -0
- package/dist/profiles/description-logic/index.d.ts +5 -0
- package/dist/profiles/description-logic/index.d.ts.map +1 -0
- package/dist/profiles/description-logic/index.js +39 -0
- package/dist/profiles/description-logic/index.js.map +1 -0
- package/dist/profiles/description-logic/nnf.d.ts +13 -0
- package/dist/profiles/description-logic/nnf.d.ts.map +1 -0
- package/dist/profiles/description-logic/nnf.js +123 -0
- package/dist/profiles/description-logic/nnf.js.map +1 -0
- package/dist/profiles/description-logic/tableau.d.ts +27 -0
- package/dist/profiles/description-logic/tableau.d.ts.map +1 -0
- package/dist/profiles/description-logic/tableau.js +491 -0
- package/dist/profiles/description-logic/tableau.js.map +1 -0
- package/dist/profiles/description-logic/types.d.ts +45 -0
- package/dist/profiles/description-logic/types.d.ts.map +1 -0
- package/dist/profiles/description-logic/types.js +71 -0
- package/dist/profiles/description-logic/types.js.map +1 -0
- package/dist/profiles/hybrid-logic/index.d.ts +5 -0
- package/dist/profiles/hybrid-logic/index.d.ts.map +1 -0
- package/dist/profiles/hybrid-logic/index.js +34 -0
- package/dist/profiles/hybrid-logic/index.js.map +1 -0
- package/dist/profiles/hybrid-logic/sat.d.ts +15 -0
- package/dist/profiles/hybrid-logic/sat.d.ts.map +1 -0
- package/dist/profiles/hybrid-logic/sat.js +142 -0
- package/dist/profiles/hybrid-logic/sat.js.map +1 -0
- package/dist/profiles/hybrid-logic/semantics.d.ts +20 -0
- package/dist/profiles/hybrid-logic/semantics.d.ts.map +1 -0
- package/dist/profiles/hybrid-logic/semantics.js +107 -0
- package/dist/profiles/hybrid-logic/semantics.js.map +1 -0
- package/dist/profiles/hybrid-logic/types.d.ts +78 -0
- package/dist/profiles/hybrid-logic/types.d.ts.map +1 -0
- package/dist/profiles/hybrid-logic/types.js +107 -0
- package/dist/profiles/hybrid-logic/types.js.map +1 -0
- package/dist/profiles/intuitionistic-nj/formula.d.ts +19 -0
- package/dist/profiles/intuitionistic-nj/formula.d.ts.map +1 -0
- package/dist/profiles/intuitionistic-nj/formula.js +99 -0
- package/dist/profiles/intuitionistic-nj/formula.js.map +1 -0
- package/dist/profiles/intuitionistic-nj/index.d.ts +5 -0
- package/dist/profiles/intuitionistic-nj/index.d.ts.map +1 -0
- package/dist/profiles/intuitionistic-nj/index.js +24 -0
- package/dist/profiles/intuitionistic-nj/index.js.map +1 -0
- package/dist/profiles/intuitionistic-nj/kripke.d.ts +17 -0
- package/dist/profiles/intuitionistic-nj/kripke.d.ts.map +1 -0
- package/dist/profiles/intuitionistic-nj/kripke.js +206 -0
- package/dist/profiles/intuitionistic-nj/kripke.js.map +1 -0
- package/dist/profiles/intuitionistic-nj/prover.d.ts +13 -0
- package/dist/profiles/intuitionistic-nj/prover.d.ts.map +1 -0
- package/dist/profiles/intuitionistic-nj/prover.js +418 -0
- package/dist/profiles/intuitionistic-nj/prover.js.map +1 -0
- package/dist/profiles/intuitionistic-nj/types.d.ts +55 -0
- package/dist/profiles/intuitionistic-nj/types.d.ts.map +1 -0
- package/dist/profiles/intuitionistic-nj/types.js +21 -0
- package/dist/profiles/intuitionistic-nj/types.js.map +1 -0
- package/dist/profiles/ltl-sat/index.d.ts +4 -0
- package/dist/profiles/ltl-sat/index.d.ts.map +1 -0
- package/dist/profiles/ltl-sat/index.js +40 -0
- package/dist/profiles/ltl-sat/index.js.map +1 -0
- package/dist/profiles/ltl-sat/sat.d.ts +8 -0
- package/dist/profiles/ltl-sat/sat.d.ts.map +1 -0
- package/dist/profiles/ltl-sat/sat.js +140 -0
- package/dist/profiles/ltl-sat/sat.js.map +1 -0
- package/dist/profiles/ltl-sat/tableau.d.ts +19 -0
- package/dist/profiles/ltl-sat/tableau.d.ts.map +1 -0
- package/dist/profiles/ltl-sat/tableau.js +358 -0
- package/dist/profiles/ltl-sat/tableau.js.map +1 -0
- package/dist/profiles/ltl-sat/types.d.ts +52 -0
- package/dist/profiles/ltl-sat/types.d.ts.map +1 -0
- package/dist/profiles/ltl-sat/types.js +101 -0
- package/dist/profiles/ltl-sat/types.js.map +1 -0
- package/dist/profiles/many-valued/index.d.ts +39 -0
- package/dist/profiles/many-valued/index.d.ts.map +1 -0
- package/dist/profiles/many-valued/index.js +250 -0
- package/dist/profiles/many-valued/index.js.map +1 -0
- package/dist/profiles/modal-frame-axioms/formula.d.ts +23 -0
- package/dist/profiles/modal-frame-axioms/formula.d.ts.map +1 -0
- package/dist/profiles/modal-frame-axioms/formula.js +158 -0
- package/dist/profiles/modal-frame-axioms/formula.js.map +1 -0
- package/dist/profiles/modal-frame-axioms/index.d.ts +6 -0
- package/dist/profiles/modal-frame-axioms/index.d.ts.map +1 -0
- package/dist/profiles/modal-frame-axioms/index.js +41 -0
- package/dist/profiles/modal-frame-axioms/index.js.map +1 -0
- package/dist/profiles/modal-frame-axioms/systems.d.ts +29 -0
- package/dist/profiles/modal-frame-axioms/systems.d.ts.map +1 -0
- package/dist/profiles/modal-frame-axioms/systems.js +96 -0
- package/dist/profiles/modal-frame-axioms/systems.js.map +1 -0
- package/dist/profiles/modal-frame-axioms/tableau.d.ts +12 -0
- package/dist/profiles/modal-frame-axioms/tableau.d.ts.map +1 -0
- package/dist/profiles/modal-frame-axioms/tableau.js +299 -0
- package/dist/profiles/modal-frame-axioms/tableau.js.map +1 -0
- package/dist/profiles/modal-frame-axioms/types.d.ts +61 -0
- package/dist/profiles/modal-frame-axioms/types.d.ts.map +1 -0
- package/dist/profiles/modal-frame-axioms/types.js +27 -0
- package/dist/profiles/modal-frame-axioms/types.js.map +1 -0
- package/dist/profiles/sequent-g3/index.d.ts +5 -0
- package/dist/profiles/sequent-g3/index.d.ts.map +1 -0
- package/dist/profiles/sequent-g3/index.js +23 -0
- package/dist/profiles/sequent-g3/index.js.map +1 -0
- package/dist/profiles/sequent-g3/latex.d.ts +7 -0
- package/dist/profiles/sequent-g3/latex.d.ts.map +1 -0
- package/dist/profiles/sequent-g3/latex.js +107 -0
- package/dist/profiles/sequent-g3/latex.js.map +1 -0
- package/dist/profiles/sequent-g3/normalize.d.ts +15 -0
- package/dist/profiles/sequent-g3/normalize.d.ts.map +1 -0
- package/dist/profiles/sequent-g3/normalize.js +121 -0
- package/dist/profiles/sequent-g3/normalize.js.map +1 -0
- package/dist/profiles/sequent-g3/prover.d.ts +16 -0
- package/dist/profiles/sequent-g3/prover.d.ts.map +1 -0
- package/dist/profiles/sequent-g3/prover.js +348 -0
- package/dist/profiles/sequent-g3/prover.js.map +1 -0
- package/dist/profiles/sequent-g3/types.d.ts +30 -0
- package/dist/profiles/sequent-g3/types.d.ts.map +1 -0
- package/dist/profiles/sequent-g3/types.js +16 -0
- package/dist/profiles/sequent-g3/types.js.map +1 -0
- package/dist/profiles/substructural/index.d.ts +4 -0
- package/dist/profiles/substructural/index.d.ts.map +1 -0
- package/dist/profiles/substructural/index.js +22 -0
- package/dist/profiles/substructural/index.js.map +1 -0
- package/dist/profiles/substructural/prover.d.ts +13 -0
- package/dist/profiles/substructural/prover.d.ts.map +1 -0
- package/dist/profiles/substructural/prover.js +481 -0
- package/dist/profiles/substructural/prover.js.map +1 -0
- package/dist/profiles/substructural/types.d.ts +72 -0
- package/dist/profiles/substructural/types.d.ts.map +1 -0
- package/dist/profiles/substructural/types.js +27 -0
- package/dist/profiles/substructural/types.js.map +1 -0
- package/dist/runtime/abduction/entails.d.ts +21 -0
- package/dist/runtime/abduction/entails.d.ts.map +1 -0
- package/dist/runtime/abduction/entails.js +308 -0
- package/dist/runtime/abduction/entails.js.map +1 -0
- package/dist/runtime/abduction/find.d.ts +18 -0
- package/dist/runtime/abduction/find.d.ts.map +1 -0
- package/dist/runtime/abduction/find.js +202 -0
- package/dist/runtime/abduction/find.js.map +1 -0
- package/dist/runtime/abduction/index.d.ts +4 -0
- package/dist/runtime/abduction/index.d.ts.map +1 -0
- package/dist/runtime/abduction/index.js +26 -0
- package/dist/runtime/abduction/index.js.map +1 -0
- package/dist/runtime/abduction/types.d.ts +78 -0
- package/dist/runtime/abduction/types.d.ts.map +1 -0
- package/dist/runtime/abduction/types.js +23 -0
- package/dist/runtime/abduction/types.js.map +1 -0
- package/dist/runtime/bayesian/factor.d.ts +22 -0
- package/dist/runtime/bayesian/factor.d.ts.map +1 -0
- package/dist/runtime/bayesian/factor.js +249 -0
- package/dist/runtime/bayesian/factor.js.map +1 -0
- package/dist/runtime/bayesian/index.d.ts +3 -0
- package/dist/runtime/bayesian/index.d.ts.map +1 -0
- package/dist/runtime/bayesian/index.js +25 -0
- package/dist/runtime/bayesian/index.js.map +1 -0
- package/dist/runtime/bayesian/inference.d.ts +6 -0
- package/dist/runtime/bayesian/inference.d.ts.map +1 -0
- package/dist/runtime/bayesian/inference.js +260 -0
- package/dist/runtime/bayesian/inference.js.map +1 -0
- package/dist/runtime/bayesian/types.d.ts +19 -0
- package/dist/runtime/bayesian/types.d.ts.map +1 -0
- package/dist/runtime/bayesian/types.js +9 -0
- package/dist/runtime/bayesian/types.js.map +1 -0
- package/dist/runtime/bisimulation/index.d.ts +4 -0
- package/dist/runtime/bisimulation/index.d.ts.map +1 -0
- package/dist/runtime/bisimulation/index.js +21 -0
- package/dist/runtime/bisimulation/index.js.map +1 -0
- package/dist/runtime/bisimulation/operations.d.ts +40 -0
- package/dist/runtime/bisimulation/operations.d.ts.map +1 -0
- package/dist/runtime/bisimulation/operations.js +219 -0
- package/dist/runtime/bisimulation/operations.js.map +1 -0
- package/dist/runtime/bisimulation/paige-tarjan.d.ts +8 -0
- package/dist/runtime/bisimulation/paige-tarjan.d.ts.map +1 -0
- package/dist/runtime/bisimulation/paige-tarjan.js +199 -0
- package/dist/runtime/bisimulation/paige-tarjan.js.map +1 -0
- package/dist/runtime/bisimulation/types.d.ts +26 -0
- package/dist/runtime/bisimulation/types.d.ts.map +1 -0
- package/dist/runtime/bisimulation/types.js +22 -0
- package/dist/runtime/bisimulation/types.js.map +1 -0
- package/dist/runtime/countermodel-min/index.d.ts +3 -0
- package/dist/runtime/countermodel-min/index.d.ts.map +1 -0
- package/dist/runtime/countermodel-min/index.js +9 -0
- package/dist/runtime/countermodel-min/index.js.map +1 -0
- package/dist/runtime/countermodel-min/minimize.d.ts +17 -0
- package/dist/runtime/countermodel-min/minimize.d.ts.map +1 -0
- package/dist/runtime/countermodel-min/minimize.js +0 -0
- package/dist/runtime/countermodel-min/minimize.js.map +1 -0
- package/dist/runtime/countermodel-min/types.d.ts +40 -0
- package/dist/runtime/countermodel-min/types.d.ts.map +1 -0
- package/dist/runtime/countermodel-min/types.js +6 -0
- package/dist/runtime/countermodel-min/types.js.map +1 -0
- package/dist/runtime/fca/context.d.ts +46 -0
- package/dist/runtime/fca/context.d.ts.map +1 -0
- package/dist/runtime/fca/context.js +155 -0
- package/dist/runtime/fca/context.js.map +1 -0
- package/dist/runtime/fca/implications.d.ts +10 -0
- package/dist/runtime/fca/implications.d.ts.map +1 -0
- package/dist/runtime/fca/implications.js +33 -0
- package/dist/runtime/fca/implications.js.map +1 -0
- package/dist/runtime/fca/index.d.ts +6 -0
- package/dist/runtime/fca/index.d.ts.map +1 -0
- package/dist/runtime/fca/index.js +39 -0
- package/dist/runtime/fca/index.js.map +1 -0
- package/dist/runtime/fca/lattice.d.ts +10 -0
- package/dist/runtime/fca/lattice.d.ts.map +1 -0
- package/dist/runtime/fca/lattice.js +86 -0
- package/dist/runtime/fca/lattice.js.map +1 -0
- package/dist/runtime/fca/next-closure.d.ts +12 -0
- package/dist/runtime/fca/next-closure.d.ts.map +1 -0
- package/dist/runtime/fca/next-closure.js +99 -0
- package/dist/runtime/fca/next-closure.js.map +1 -0
- package/dist/runtime/fca/types.d.ts +31 -0
- package/dist/runtime/fca/types.d.ts.map +1 -0
- package/dist/runtime/fca/types.js +30 -0
- package/dist/runtime/fca/types.js.map +1 -0
- package/dist/runtime/mus/extract.d.ts +34 -0
- package/dist/runtime/mus/extract.d.ts.map +1 -0
- package/dist/runtime/mus/extract.js +243 -0
- package/dist/runtime/mus/extract.js.map +1 -0
- package/dist/runtime/mus/index.d.ts +4 -0
- package/dist/runtime/mus/index.d.ts.map +1 -0
- package/dist/runtime/mus/index.js +12 -0
- package/dist/runtime/mus/index.js.map +1 -0
- package/dist/runtime/mus/quickxplain.d.ts +10 -0
- package/dist/runtime/mus/quickxplain.d.ts.map +1 -0
- package/dist/runtime/mus/quickxplain.js +100 -0
- package/dist/runtime/mus/quickxplain.js.map +1 -0
- package/dist/runtime/mus/types.d.ts +59 -0
- package/dist/runtime/mus/types.d.ts.map +1 -0
- package/dist/runtime/mus/types.js +20 -0
- package/dist/runtime/mus/types.js.map +1 -0
- package/dist/runtime/proof-minify/index.d.ts +3 -0
- package/dist/runtime/proof-minify/index.d.ts.map +1 -0
- package/dist/runtime/proof-minify/index.js +13 -0
- package/dist/runtime/proof-minify/index.js.map +1 -0
- package/dist/runtime/proof-minify/minify.d.ts +13 -0
- package/dist/runtime/proof-minify/minify.d.ts.map +1 -0
- package/dist/runtime/proof-minify/minify.js +540 -0
- package/dist/runtime/proof-minify/minify.js.map +1 -0
- package/dist/runtime/proof-minify/types.d.ts +89 -0
- package/dist/runtime/proof-minify/types.d.ts.map +1 -0
- package/dist/runtime/proof-minify/types.js +16 -0
- package/dist/runtime/proof-minify/types.js.map +1 -0
- package/dist/runtime/symbolic-diff/constructors.d.ts +16 -0
- package/dist/runtime/symbolic-diff/constructors.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/constructors.js +75 -0
- package/dist/runtime/symbolic-diff/constructors.js.map +1 -0
- package/dist/runtime/symbolic-diff/differentiate.d.ts +22 -0
- package/dist/runtime/symbolic-diff/differentiate.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/differentiate.js +107 -0
- package/dist/runtime/symbolic-diff/differentiate.js.map +1 -0
- package/dist/runtime/symbolic-diff/evaluate.d.ts +3 -0
- package/dist/runtime/symbolic-diff/evaluate.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/evaluate.js +47 -0
- package/dist/runtime/symbolic-diff/evaluate.js.map +1 -0
- package/dist/runtime/symbolic-diff/index.d.ts +9 -0
- package/dist/runtime/symbolic-diff/index.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/index.js +34 -0
- package/dist/runtime/symbolic-diff/index.js.map +1 -0
- package/dist/runtime/symbolic-diff/parse.d.ts +16 -0
- package/dist/runtime/symbolic-diff/parse.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/parse.js +206 -0
- package/dist/runtime/symbolic-diff/parse.js.map +1 -0
- package/dist/runtime/symbolic-diff/simplify.d.ts +11 -0
- package/dist/runtime/symbolic-diff/simplify.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/simplify.js +214 -0
- package/dist/runtime/symbolic-diff/simplify.js.map +1 -0
- package/dist/runtime/symbolic-diff/stringify.d.ts +3 -0
- package/dist/runtime/symbolic-diff/stringify.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/stringify.js +69 -0
- package/dist/runtime/symbolic-diff/stringify.js.map +1 -0
- package/dist/runtime/symbolic-diff/types.d.ts +35 -0
- package/dist/runtime/symbolic-diff/types.d.ts.map +1 -0
- package/dist/runtime/symbolic-diff/types.js +9 -0
- package/dist/runtime/symbolic-diff/types.js.map +1 -0
- package/dist/runtime/term-rewriting/critical-pairs.d.ts +38 -0
- package/dist/runtime/term-rewriting/critical-pairs.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/critical-pairs.js +109 -0
- package/dist/runtime/term-rewriting/critical-pairs.js.map +1 -0
- package/dist/runtime/term-rewriting/index.d.ts +9 -0
- package/dist/runtime/term-rewriting/index.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/index.js +38 -0
- package/dist/runtime/term-rewriting/index.js.map +1 -0
- package/dist/runtime/term-rewriting/knuth-bendix.d.ts +29 -0
- package/dist/runtime/term-rewriting/knuth-bendix.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/knuth-bendix.js +196 -0
- package/dist/runtime/term-rewriting/knuth-bendix.js.map +1 -0
- package/dist/runtime/term-rewriting/lpo.d.ts +17 -0
- package/dist/runtime/term-rewriting/lpo.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/lpo.js +158 -0
- package/dist/runtime/term-rewriting/lpo.js.map +1 -0
- package/dist/runtime/term-rewriting/rewrite.d.ts +44 -0
- package/dist/runtime/term-rewriting/rewrite.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/rewrite.js +189 -0
- package/dist/runtime/term-rewriting/rewrite.js.map +1 -0
- package/dist/runtime/term-rewriting/term-utils.d.ts +64 -0
- package/dist/runtime/term-rewriting/term-utils.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/term-utils.js +360 -0
- package/dist/runtime/term-rewriting/term-utils.js.map +1 -0
- package/dist/runtime/term-rewriting/types.d.ts +66 -0
- package/dist/runtime/term-rewriting/types.d.ts.map +1 -0
- package/dist/runtime/term-rewriting/types.js +21 -0
- package/dist/runtime/term-rewriting/types.js.map +1 -0
- package/dist/solver/cdcl-v2-incremental/index.d.ts +3 -0
- package/dist/solver/cdcl-v2-incremental/index.d.ts.map +1 -0
- package/dist/solver/cdcl-v2-incremental/index.js +16 -0
- package/dist/solver/cdcl-v2-incremental/index.js.map +1 -0
- package/dist/solver/cdcl-v2-incremental/solver.d.ts +83 -0
- package/dist/solver/cdcl-v2-incremental/solver.d.ts.map +1 -0
- package/dist/solver/cdcl-v2-incremental/solver.js +727 -0
- package/dist/solver/cdcl-v2-incremental/solver.js.map +1 -0
- package/dist/solver/cdcl-v2-incremental/types.d.ts +47 -0
- package/dist/solver/cdcl-v2-incremental/types.d.ts.map +1 -0
- package/dist/solver/cdcl-v2-incremental/types.js +13 -0
- package/dist/solver/cdcl-v2-incremental/types.js.map +1 -0
- package/dist/tests/abduction/abduction.test.d.ts +2 -0
- package/dist/tests/abduction/abduction.test.d.ts.map +1 -0
- package/dist/tests/abduction/abduction.test.js +380 -0
- package/dist/tests/abduction/abduction.test.js.map +1 -0
- package/dist/tests/bayesian/bayesian.test.d.ts +2 -0
- package/dist/tests/bayesian/bayesian.test.d.ts.map +1 -0
- package/dist/tests/bayesian/bayesian.test.js +328 -0
- package/dist/tests/bayesian/bayesian.test.js.map +1 -0
- package/dist/tests/belief-revision/agm.test.d.ts +2 -0
- package/dist/tests/belief-revision/agm.test.d.ts.map +1 -0
- package/dist/tests/belief-revision/agm.test.js +173 -0
- package/dist/tests/belief-revision/agm.test.js.map +1 -0
- package/dist/tests/bisimulation/paige-tarjan.test.d.ts +2 -0
- package/dist/tests/bisimulation/paige-tarjan.test.d.ts.map +1 -0
- package/dist/tests/bisimulation/paige-tarjan.test.js +254 -0
- package/dist/tests/bisimulation/paige-tarjan.test.js.map +1 -0
- package/dist/tests/countermodel-min/minimize.test.d.ts +2 -0
- package/dist/tests/countermodel-min/minimize.test.d.ts.map +1 -0
- package/dist/tests/countermodel-min/minimize.test.js +241 -0
- package/dist/tests/countermodel-min/minimize.test.js.map +1 -0
- package/dist/tests/ctl/check.test.d.ts +2 -0
- package/dist/tests/ctl/check.test.d.ts.map +1 -0
- package/dist/tests/ctl/check.test.js +337 -0
- package/dist/tests/ctl/check.test.js.map +1 -0
- package/dist/tests/curry-howard/infer.test.d.ts +2 -0
- package/dist/tests/curry-howard/infer.test.d.ts.map +1 -0
- package/dist/tests/curry-howard/infer.test.js +93 -0
- package/dist/tests/curry-howard/infer.test.js.map +1 -0
- package/dist/tests/curry-howard/proof.test.d.ts +2 -0
- package/dist/tests/curry-howard/proof.test.d.ts.map +1 -0
- package/dist/tests/curry-howard/proof.test.js +105 -0
- package/dist/tests/curry-howard/proof.test.js.map +1 -0
- package/dist/tests/curry-howard/reduce.test.d.ts +2 -0
- package/dist/tests/curry-howard/reduce.test.d.ts.map +1 -0
- package/dist/tests/curry-howard/reduce.test.js +109 -0
- package/dist/tests/curry-howard/reduce.test.js.map +1 -0
- package/dist/tests/default-logic/extensions.test.d.ts +2 -0
- package/dist/tests/default-logic/extensions.test.d.ts.map +1 -0
- package/dist/tests/default-logic/extensions.test.js +323 -0
- package/dist/tests/default-logic/extensions.test.js.map +1 -0
- package/dist/tests/description-logic/alc.test.d.ts +2 -0
- package/dist/tests/description-logic/alc.test.d.ts.map +1 -0
- package/dist/tests/description-logic/alc.test.js +253 -0
- package/dist/tests/description-logic/alc.test.js.map +1 -0
- package/dist/tests/fca/fca.test.d.ts +2 -0
- package/dist/tests/fca/fca.test.d.ts.map +1 -0
- package/dist/tests/fca/fca.test.js +317 -0
- package/dist/tests/fca/fca.test.js.map +1 -0
- package/dist/tests/fol-prover-equality/prove.test.d.ts +2 -0
- package/dist/tests/fol-prover-equality/prove.test.d.ts.map +1 -0
- package/dist/tests/fol-prover-equality/prove.test.js +179 -0
- package/dist/tests/fol-prover-equality/prove.test.js.map +1 -0
- package/dist/tests/hybrid-logic/semantics.test.d.ts +2 -0
- package/dist/tests/hybrid-logic/semantics.test.d.ts.map +1 -0
- package/dist/tests/hybrid-logic/semantics.test.js +169 -0
- package/dist/tests/hybrid-logic/semantics.test.js.map +1 -0
- package/dist/tests/intuitionistic-nj/nj.test.d.ts +2 -0
- package/dist/tests/intuitionistic-nj/nj.test.d.ts.map +1 -0
- package/dist/tests/intuitionistic-nj/nj.test.js +216 -0
- package/dist/tests/intuitionistic-nj/nj.test.js.map +1 -0
- package/dist/tests/lambda-calc/lambda-calc.test.d.ts +2 -0
- package/dist/tests/lambda-calc/lambda-calc.test.d.ts.map +1 -0
- package/dist/tests/lambda-calc/lambda-calc.test.js +164 -0
- package/dist/tests/lambda-calc/lambda-calc.test.js.map +1 -0
- package/dist/tests/ltl-sat/sat.test.d.ts +2 -0
- package/dist/tests/ltl-sat/sat.test.d.ts.map +1 -0
- package/dist/tests/ltl-sat/sat.test.js +160 -0
- package/dist/tests/ltl-sat/sat.test.js.map +1 -0
- package/dist/tests/many-valued/many-valued.test.d.ts +2 -0
- package/dist/tests/many-valued/many-valued.test.d.ts.map +1 -0
- package/dist/tests/many-valued/many-valued.test.js +150 -0
- package/dist/tests/many-valued/many-valued.test.js.map +1 -0
- package/dist/tests/modal-frame-axioms/frame-axioms.test.d.ts +2 -0
- package/dist/tests/modal-frame-axioms/frame-axioms.test.d.ts.map +1 -0
- package/dist/tests/modal-frame-axioms/frame-axioms.test.js +236 -0
- package/dist/tests/modal-frame-axioms/frame-axioms.test.js.map +1 -0
- package/dist/tests/mus/extract.test.d.ts +2 -0
- package/dist/tests/mus/extract.test.d.ts.map +1 -0
- package/dist/tests/mus/extract.test.js +352 -0
- package/dist/tests/mus/extract.test.js.map +1 -0
- package/dist/tests/proof-minify/minify.test.d.ts +2 -0
- package/dist/tests/proof-minify/minify.test.d.ts.map +1 -0
- package/dist/tests/proof-minify/minify.test.js +281 -0
- package/dist/tests/proof-minify/minify.test.js.map +1 -0
- package/dist/tests/sat-v2-incremental/basic.test.d.ts +2 -0
- package/dist/tests/sat-v2-incremental/basic.test.d.ts.map +1 -0
- package/dist/tests/sat-v2-incremental/basic.test.js +352 -0
- package/dist/tests/sat-v2-incremental/basic.test.js.map +1 -0
- package/dist/tests/sequent-g3/prover.test.d.ts +2 -0
- package/dist/tests/sequent-g3/prover.test.d.ts.map +1 -0
- package/dist/tests/sequent-g3/prover.test.js +205 -0
- package/dist/tests/sequent-g3/prover.test.js.map +1 -0
- package/dist/tests/substructural/prover.test.d.ts +2 -0
- package/dist/tests/substructural/prover.test.d.ts.map +1 -0
- package/dist/tests/substructural/prover.test.js +271 -0
- package/dist/tests/substructural/prover.test.js.map +1 -0
- package/dist/tests/symbolic-diff/symbolic-diff.test.d.ts +2 -0
- package/dist/tests/symbolic-diff/symbolic-diff.test.d.ts.map +1 -0
- package/dist/tests/symbolic-diff/symbolic-diff.test.js +278 -0
- package/dist/tests/symbolic-diff/symbolic-diff.test.js.map +1 -0
- package/dist/tests/term-rewriting/critical-pairs.test.d.ts +2 -0
- package/dist/tests/term-rewriting/critical-pairs.test.d.ts.map +1 -0
- package/dist/tests/term-rewriting/critical-pairs.test.js +34 -0
- package/dist/tests/term-rewriting/critical-pairs.test.js.map +1 -0
- package/dist/tests/term-rewriting/knuth-bendix.test.d.ts +2 -0
- package/dist/tests/term-rewriting/knuth-bendix.test.d.ts.map +1 -0
- package/dist/tests/term-rewriting/knuth-bendix.test.js +94 -0
- package/dist/tests/term-rewriting/knuth-bendix.test.js.map +1 -0
- package/dist/tests/term-rewriting/lpo.test.d.ts +2 -0
- package/dist/tests/term-rewriting/lpo.test.d.ts.map +1 -0
- package/dist/tests/term-rewriting/lpo.test.js +57 -0
- package/dist/tests/term-rewriting/lpo.test.js.map +1 -0
- package/dist/tests/term-rewriting/rewrite.test.d.ts +2 -0
- package/dist/tests/term-rewriting/rewrite.test.d.ts.map +1 -0
- package/dist/tests/term-rewriting/rewrite.test.js +56 -0
- package/dist/tests/term-rewriting/rewrite.test.js.map +1 -0
- package/dist/tests/term-rewriting/term-utils.test.d.ts +2 -0
- package/dist/tests/term-rewriting/term-utils.test.d.ts.map +1 -0
- package/dist/tests/term-rewriting/term-utils.test.js +58 -0
- package/dist/tests/term-rewriting/term-utils.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Belief Revision — Mini SAT por enumeración (clásico propositional)
|
|
4
|
+
// ============================================================
|
|
5
|
+
//
|
|
6
|
+
// Para las fórmulas y belief sets manejados por AGM, el número de átomos
|
|
7
|
+
// típico es pequeño (< 20). Usamos enumeración 2^n directa: simple, exacto
|
|
8
|
+
// y suficiente para tests y uso pedagógico. Para casos grandes el caller
|
|
9
|
+
// debería usar el SAT solver de st-lang (CDCL).
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.evalFormula = evalFormula;
|
|
12
|
+
exports.isSatisfiable = isSatisfiable;
|
|
13
|
+
exports.entailsFormula = entailsFormula;
|
|
14
|
+
exports.areEquivalent = areEquivalent;
|
|
15
|
+
const parser_1 = require("./parser");
|
|
16
|
+
/** Evalúa una fórmula bajo una valuación clásica. */
|
|
17
|
+
function evalFormula(f, v) {
|
|
18
|
+
switch (f.kind) {
|
|
19
|
+
case 'true':
|
|
20
|
+
return true;
|
|
21
|
+
case 'false':
|
|
22
|
+
return false;
|
|
23
|
+
case 'atom':
|
|
24
|
+
return v[f.name] ?? false;
|
|
25
|
+
case 'not':
|
|
26
|
+
return !evalFormula(f.arg, v);
|
|
27
|
+
case 'and':
|
|
28
|
+
return evalFormula(f.left, v) && evalFormula(f.right, v);
|
|
29
|
+
case 'or':
|
|
30
|
+
return evalFormula(f.left, v) || evalFormula(f.right, v);
|
|
31
|
+
case 'implies':
|
|
32
|
+
return !evalFormula(f.left, v) || evalFormula(f.right, v);
|
|
33
|
+
case 'iff':
|
|
34
|
+
return evalFormula(f.left, v) === evalFormula(f.right, v);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Enumera todas las valuaciones sobre `atoms` y aplica `predicate`.
|
|
39
|
+
* Retorna `true` apenas alguna satisface (early exit).
|
|
40
|
+
*/
|
|
41
|
+
function existsValuation(atoms, predicate) {
|
|
42
|
+
const n = atoms.length;
|
|
43
|
+
const total = 1 << n;
|
|
44
|
+
for (let mask = 0; mask < total; mask += 1) {
|
|
45
|
+
const v = {};
|
|
46
|
+
for (let i = 0; i < n; i += 1) {
|
|
47
|
+
const atom = atoms[i];
|
|
48
|
+
if (atom !== undefined) {
|
|
49
|
+
v[atom] = ((mask >> i) & 1) === 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (predicate(v))
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* ¿Es satisfactible la conjunción de `formulas`?
|
|
59
|
+
* Conjunto vacío → trivialmente satisfactible.
|
|
60
|
+
*/
|
|
61
|
+
function isSatisfiable(formulas) {
|
|
62
|
+
if (formulas.length === 0)
|
|
63
|
+
return true;
|
|
64
|
+
const atoms = new Set();
|
|
65
|
+
for (const f of formulas)
|
|
66
|
+
(0, parser_1.collectAtoms)(f, atoms);
|
|
67
|
+
const atomList = Array.from(atoms);
|
|
68
|
+
// Caso degenerado: ninguna variable proposicional, evaluar con valuación vacía.
|
|
69
|
+
if (atomList.length === 0) {
|
|
70
|
+
return formulas.every((f) => evalFormula(f, {}));
|
|
71
|
+
}
|
|
72
|
+
return existsValuation(atomList, (v) => formulas.every((f) => evalFormula(f, v)));
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* ¿K (conjunción de fórmulas) implica φ?
|
|
76
|
+
* Equivalente a: K ∧ ¬φ es insatisfactible.
|
|
77
|
+
*/
|
|
78
|
+
function entailsFormula(K, phi) {
|
|
79
|
+
const negated = { kind: 'not', arg: phi };
|
|
80
|
+
return !isSatisfiable([...K, negated]);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* ¿Son φ y ψ lógicamente equivalentes? (φ ↔ ψ es tautología)
|
|
84
|
+
*/
|
|
85
|
+
function areEquivalent(a, b) {
|
|
86
|
+
const iff = { kind: 'iff', left: a, right: b };
|
|
87
|
+
// Es equivalente sii ¬(a↔b) es insatisfactible.
|
|
88
|
+
return !isSatisfiable([{ kind: 'not', arg: iff }]);
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=sat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sat.js","sourceRoot":"","sources":["../../src/belief-revision/sat.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,+DAA+D;AAC/D,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,gDAAgD;;AAQhD,kCAmBC;AA0BD,sCAUC;AAMD,wCAGC;AAKD,sCAIC;AA9ED,qCAAwC;AAI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,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACvD,OAAO,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,CAAc,EAAE,CAAc;IAC1D,MAAM,GAAG,GAAgB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5D,gDAAgD;IAChD,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Un belief set K: conjunto de fórmulas (cadenas) más una caché opcional
|
|
3
|
+
* de consistencia. La caché es informativa: las operaciones siempre
|
|
4
|
+
* recalculan la consistencia sobre las fórmulas reales.
|
|
5
|
+
*/
|
|
6
|
+
export interface BeliefSet {
|
|
7
|
+
formulas: Set<string>;
|
|
8
|
+
consistent?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Orden parcial de "entrenchment" (arraigamiento epistémico).
|
|
12
|
+
* Mapea fórmula → nivel; mayor número = creencia más arraigada
|
|
13
|
+
* (más difícil de remover). Fórmulas no presentes en el mapa se
|
|
14
|
+
* consideran al nivel 0 (default, fácilmente removibles).
|
|
15
|
+
*/
|
|
16
|
+
export type PartialOrder = Map<string, number>;
|
|
17
|
+
/**
|
|
18
|
+
* Representación interna de una fórmula proposicional:
|
|
19
|
+
* - {kind: 'atom', name: 'p'}
|
|
20
|
+
* - {kind: 'not', arg}
|
|
21
|
+
* - {kind: 'and'|'or'|'implies'|'iff', left, right}
|
|
22
|
+
* - {kind: 'true'} | {kind: 'false'}
|
|
23
|
+
*/
|
|
24
|
+
export type PropFormula = {
|
|
25
|
+
kind: 'true';
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'false';
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'atom';
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'not';
|
|
33
|
+
arg: PropFormula;
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'and';
|
|
36
|
+
left: PropFormula;
|
|
37
|
+
right: PropFormula;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'or';
|
|
40
|
+
left: PropFormula;
|
|
41
|
+
right: PropFormula;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'implies';
|
|
44
|
+
left: PropFormula;
|
|
45
|
+
right: PropFormula;
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'iff';
|
|
48
|
+
left: PropFormula;
|
|
49
|
+
right: PropFormula;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/belief-revision/types.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Belief Revision — Tipos AGM
|
|
4
|
+
// ============================================================
|
|
5
|
+
//
|
|
6
|
+
// Implementa operadores AGM (Alchourrón-Gärdenfors-Makinson) sobre
|
|
7
|
+
// belief sets propositionales. Las creencias se almacenan como cadenas
|
|
8
|
+
// (forma sintáctica) pero la lógica subyacente es clásica propositional.
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/belief-revision/types.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,iCAAiC;AACjC,+DAA+D;AAC/D,EAAE;AACF,mEAAmE;AACnE,uEAAuE;AACvE,yEAAyE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { PropType, LambdaTerm, ProofTree, ProofRule, Context } from './types';
|
|
2
|
+
export { atom, arrow, product, sum, bottom, vr, app, abs, pair, fst, snd, inl, inr, cse, absurd, eqType, typeToString, termToString, } from './types';
|
|
3
|
+
export { inferType, isInferError } from './infer';
|
|
4
|
+
export type { InferResult } from './infer';
|
|
5
|
+
export { reduceBeta, normalize, isNormal, freeVars, substituteTerm } from './reduce';
|
|
6
|
+
export { termToProof, proofToTerm, proofIsConsistent, ProofConversionError } from './proof';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/curry-howard/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EACL,IAAI,EACJ,KAAK,EACL,OAAO,EACP,GAAG,EACH,MAAM,EACN,EAAE,EACF,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,MAAM,EACN,MAAM,EACN,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// ST Curry-Howard — Punto de entrada público
|
|
4
|
+
// ============================================================
|
|
5
|
+
//
|
|
6
|
+
// Correspondencia Curry-Howard sobre λ-cálculo simplemente tipado:
|
|
7
|
+
// - λ-terms anotados con tipos = pruebas en deducción natural
|
|
8
|
+
// - inferType: λ-term → proposición probada
|
|
9
|
+
// - termToProof / proofToTerm: conversión bidireccional
|
|
10
|
+
// - reduceBeta / normalize: normalización (β + proyecciones + case)
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProofConversionError = exports.proofIsConsistent = exports.proofToTerm = exports.termToProof = exports.substituteTerm = exports.freeVars = exports.isNormal = exports.normalize = exports.reduceBeta = exports.isInferError = exports.inferType = exports.termToString = exports.typeToString = exports.eqType = exports.absurd = exports.cse = exports.inr = exports.inl = exports.snd = exports.fst = exports.pair = exports.abs = exports.app = exports.vr = exports.bottom = exports.sum = exports.product = exports.arrow = exports.atom = void 0;
|
|
13
|
+
var types_1 = require("./types");
|
|
14
|
+
Object.defineProperty(exports, "atom", { enumerable: true, get: function () { return types_1.atom; } });
|
|
15
|
+
Object.defineProperty(exports, "arrow", { enumerable: true, get: function () { return types_1.arrow; } });
|
|
16
|
+
Object.defineProperty(exports, "product", { enumerable: true, get: function () { return types_1.product; } });
|
|
17
|
+
Object.defineProperty(exports, "sum", { enumerable: true, get: function () { return types_1.sum; } });
|
|
18
|
+
Object.defineProperty(exports, "bottom", { enumerable: true, get: function () { return types_1.bottom; } });
|
|
19
|
+
Object.defineProperty(exports, "vr", { enumerable: true, get: function () { return types_1.vr; } });
|
|
20
|
+
Object.defineProperty(exports, "app", { enumerable: true, get: function () { return types_1.app; } });
|
|
21
|
+
Object.defineProperty(exports, "abs", { enumerable: true, get: function () { return types_1.abs; } });
|
|
22
|
+
Object.defineProperty(exports, "pair", { enumerable: true, get: function () { return types_1.pair; } });
|
|
23
|
+
Object.defineProperty(exports, "fst", { enumerable: true, get: function () { return types_1.fst; } });
|
|
24
|
+
Object.defineProperty(exports, "snd", { enumerable: true, get: function () { return types_1.snd; } });
|
|
25
|
+
Object.defineProperty(exports, "inl", { enumerable: true, get: function () { return types_1.inl; } });
|
|
26
|
+
Object.defineProperty(exports, "inr", { enumerable: true, get: function () { return types_1.inr; } });
|
|
27
|
+
Object.defineProperty(exports, "cse", { enumerable: true, get: function () { return types_1.cse; } });
|
|
28
|
+
Object.defineProperty(exports, "absurd", { enumerable: true, get: function () { return types_1.absurd; } });
|
|
29
|
+
Object.defineProperty(exports, "eqType", { enumerable: true, get: function () { return types_1.eqType; } });
|
|
30
|
+
Object.defineProperty(exports, "typeToString", { enumerable: true, get: function () { return types_1.typeToString; } });
|
|
31
|
+
Object.defineProperty(exports, "termToString", { enumerable: true, get: function () { return types_1.termToString; } });
|
|
32
|
+
var infer_1 = require("./infer");
|
|
33
|
+
Object.defineProperty(exports, "inferType", { enumerable: true, get: function () { return infer_1.inferType; } });
|
|
34
|
+
Object.defineProperty(exports, "isInferError", { enumerable: true, get: function () { return infer_1.isInferError; } });
|
|
35
|
+
var reduce_1 = require("./reduce");
|
|
36
|
+
Object.defineProperty(exports, "reduceBeta", { enumerable: true, get: function () { return reduce_1.reduceBeta; } });
|
|
37
|
+
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return reduce_1.normalize; } });
|
|
38
|
+
Object.defineProperty(exports, "isNormal", { enumerable: true, get: function () { return reduce_1.isNormal; } });
|
|
39
|
+
Object.defineProperty(exports, "freeVars", { enumerable: true, get: function () { return reduce_1.freeVars; } });
|
|
40
|
+
Object.defineProperty(exports, "substituteTerm", { enumerable: true, get: function () { return reduce_1.substituteTerm; } });
|
|
41
|
+
var proof_1 = require("./proof");
|
|
42
|
+
Object.defineProperty(exports, "termToProof", { enumerable: true, get: function () { return proof_1.termToProof; } });
|
|
43
|
+
Object.defineProperty(exports, "proofToTerm", { enumerable: true, get: function () { return proof_1.proofToTerm; } });
|
|
44
|
+
Object.defineProperty(exports, "proofIsConsistent", { enumerable: true, get: function () { return proof_1.proofIsConsistent; } });
|
|
45
|
+
Object.defineProperty(exports, "ProofConversionError", { enumerable: true, get: function () { return proof_1.ProofConversionError; } });
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/curry-howard/index.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,6CAA6C;AAC7C,+DAA+D;AAC/D,EAAE;AACF,mEAAmE;AACnE,gEAAgE;AAChE,8CAA8C;AAC9C,0DAA0D;AAC1D,sEAAsE;;;AAGtE,iCAmBiB;AAlBf,6FAAA,IAAI,OAAA;AACJ,8FAAA,KAAK,OAAA;AACL,gGAAA,OAAO,OAAA;AACP,4FAAA,GAAG,OAAA;AACH,+FAAA,MAAM,OAAA;AACN,2FAAA,EAAE,OAAA;AACF,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,6FAAA,IAAI,OAAA;AACJ,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,4FAAA,GAAG,OAAA;AACH,+FAAA,MAAM,OAAA;AACN,+FAAA,MAAM,OAAA;AACN,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AAGd,iCAAkD;AAAzC,kGAAA,SAAS,OAAA;AAAE,qGAAA,YAAY,OAAA;AAGhC,mCAAqF;AAA5E,oGAAA,UAAU,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,wGAAA,cAAc,OAAA;AAElE,iCAA4F;AAAnF,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,0GAAA,iBAAiB,OAAA;AAAE,6GAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Context, LambdaTerm, PropType } from './types';
|
|
2
|
+
export type InferResult = PropType | {
|
|
3
|
+
error: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function inferType(term: LambdaTerm, ctx?: Context): InferResult;
|
|
6
|
+
export declare function isInferError(r: InferResult): r is {
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=infer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infer.d.ts","sourceRoot":"","sources":["../../src/curry-howard/infer.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG7D,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,GAAE,OAAY,GAAG,WAAW,CAE1E;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,IAAI;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAEnE"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Curry-Howard — Type inference (checking) para λ-terms anotados
|
|
4
|
+
// ============================================================
|
|
5
|
+
//
|
|
6
|
+
// El λ-cálculo simplemente tipado con anotaciones en el binder
|
|
7
|
+
// admite type-checking directo (no requiere Hindley-Milner): cada
|
|
8
|
+
// abstracción declara el tipo de su parámetro, así que el tipo
|
|
9
|
+
// del cuerpo se obtiene recursivamente.
|
|
10
|
+
//
|
|
11
|
+
// Devuelve `{ error }` en lugar de lanzar para que sea fácil
|
|
12
|
+
// componer en tests y herramientas didácticas.
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.inferType = inferType;
|
|
15
|
+
exports.isInferError = isInferError;
|
|
16
|
+
const types_1 = require("./types");
|
|
17
|
+
function inferType(term, ctx = {}) {
|
|
18
|
+
return inferInternal(term, ctx);
|
|
19
|
+
}
|
|
20
|
+
function isInferError(r) {
|
|
21
|
+
return typeof r === 'object' && r !== null && 'error' in r;
|
|
22
|
+
}
|
|
23
|
+
function inferInternal(term, ctx) {
|
|
24
|
+
switch (term.kind) {
|
|
25
|
+
case 'var': {
|
|
26
|
+
const t = ctx[term.name];
|
|
27
|
+
if (!t)
|
|
28
|
+
return { error: `variable libre sin tipo en contexto: '${term.name}'` };
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
31
|
+
case 'abs': {
|
|
32
|
+
const newCtx = { ...ctx, [term.param]: term.paramType };
|
|
33
|
+
const bodyType = inferInternal(term.body, newCtx);
|
|
34
|
+
if (isInferError(bodyType))
|
|
35
|
+
return bodyType;
|
|
36
|
+
return { kind: 'arrow', from: term.paramType, to: bodyType };
|
|
37
|
+
}
|
|
38
|
+
case 'app': {
|
|
39
|
+
const fnT = inferInternal(term.fn, ctx);
|
|
40
|
+
if (isInferError(fnT))
|
|
41
|
+
return fnT;
|
|
42
|
+
if (fnT.kind !== 'arrow') {
|
|
43
|
+
return {
|
|
44
|
+
error: `aplicación requiere función A→B, encontré: ${(0, types_1.typeToString)(fnT)}`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const argT = inferInternal(term.arg, ctx);
|
|
48
|
+
if (isInferError(argT))
|
|
49
|
+
return argT;
|
|
50
|
+
if (!(0, types_1.eqType)(fnT.from, argT)) {
|
|
51
|
+
return {
|
|
52
|
+
error: `tipo de argumento no coincide: esperaba ${(0, types_1.typeToString)(fnT.from)}, obtuve ${(0, types_1.typeToString)(argT)}`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return fnT.to;
|
|
56
|
+
}
|
|
57
|
+
case 'pair': {
|
|
58
|
+
const a = inferInternal(term.fst, ctx);
|
|
59
|
+
if (isInferError(a))
|
|
60
|
+
return a;
|
|
61
|
+
const b = inferInternal(term.snd, ctx);
|
|
62
|
+
if (isInferError(b))
|
|
63
|
+
return b;
|
|
64
|
+
return { kind: 'product', left: a, right: b };
|
|
65
|
+
}
|
|
66
|
+
case 'fst': {
|
|
67
|
+
const p = inferInternal(term.pair, ctx);
|
|
68
|
+
if (isInferError(p))
|
|
69
|
+
return p;
|
|
70
|
+
if (p.kind !== 'product') {
|
|
71
|
+
return { error: `fst espera A∧B, recibí: ${(0, types_1.typeToString)(p)}` };
|
|
72
|
+
}
|
|
73
|
+
return p.left;
|
|
74
|
+
}
|
|
75
|
+
case 'snd': {
|
|
76
|
+
const p = inferInternal(term.pair, ctx);
|
|
77
|
+
if (isInferError(p))
|
|
78
|
+
return p;
|
|
79
|
+
if (p.kind !== 'product') {
|
|
80
|
+
return { error: `snd espera A∧B, recibí: ${(0, types_1.typeToString)(p)}` };
|
|
81
|
+
}
|
|
82
|
+
return p.right;
|
|
83
|
+
}
|
|
84
|
+
case 'inl': {
|
|
85
|
+
const l = inferInternal(term.left, ctx);
|
|
86
|
+
if (isInferError(l))
|
|
87
|
+
return l;
|
|
88
|
+
return { kind: 'sum', left: l, right: term.rightType };
|
|
89
|
+
}
|
|
90
|
+
case 'inr': {
|
|
91
|
+
const r = inferInternal(term.right, ctx);
|
|
92
|
+
if (isInferError(r))
|
|
93
|
+
return r;
|
|
94
|
+
return { kind: 'sum', left: term.leftType, right: r };
|
|
95
|
+
}
|
|
96
|
+
case 'case': {
|
|
97
|
+
const sT = inferInternal(term.scrutinee, ctx);
|
|
98
|
+
if (isInferError(sT))
|
|
99
|
+
return sT;
|
|
100
|
+
if (sT.kind !== 'sum') {
|
|
101
|
+
return { error: `case espera A∨B, recibí: ${(0, types_1.typeToString)(sT)}` };
|
|
102
|
+
}
|
|
103
|
+
const leftCtx = { ...ctx, [term.leftBind]: sT.left };
|
|
104
|
+
const lT = inferInternal(term.leftBody, leftCtx);
|
|
105
|
+
if (isInferError(lT))
|
|
106
|
+
return lT;
|
|
107
|
+
const rightCtx = { ...ctx, [term.rightBind]: sT.right };
|
|
108
|
+
const rT = inferInternal(term.rightBody, rightCtx);
|
|
109
|
+
if (isInferError(rT))
|
|
110
|
+
return rT;
|
|
111
|
+
if (!(0, types_1.eqType)(lT, rT)) {
|
|
112
|
+
return {
|
|
113
|
+
error: `ramas de case con tipos distintos: ${(0, types_1.typeToString)(lT)} vs ${(0, types_1.typeToString)(rT)}`,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return lT;
|
|
117
|
+
}
|
|
118
|
+
case 'absurd': {
|
|
119
|
+
const p = inferInternal(term.proofOfFalse, ctx);
|
|
120
|
+
if (isInferError(p))
|
|
121
|
+
return p;
|
|
122
|
+
if (p.kind !== 'bottom') {
|
|
123
|
+
return { error: `absurd espera ⊥, recibí: ${(0, types_1.typeToString)(p)}` };
|
|
124
|
+
}
|
|
125
|
+
return term.resultType;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=infer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infer.js","sourceRoot":"","sources":["../../src/curry-howard/infer.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,iEAAiE;AACjE,+DAA+D;AAC/D,EAAE;AACF,+DAA+D;AAC/D,kEAAkE;AAClE,+DAA+D;AAC/D,wCAAwC;AACxC,EAAE;AACF,6DAA6D;AAC7D,+CAA+C;;AAO/C,8BAEC;AAED,oCAEC;AAVD,mCAA+C;AAI/C,SAAgB,SAAS,CAAC,IAAgB,EAAE,MAAe,EAAE;IAC3D,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,CAAc;IACzC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,aAAa,CAAC,IAAgB,EAAE,GAAY;IACnD,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,CAAC;gBAAE,OAAO,EAAE,KAAK,EAAE,yCAAyC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YAChF,OAAO,CAAC,CAAC;QACX,CAAC;QACD,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,MAAM,GAAY,EAAE,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;YACjE,MAAM,QAAQ,GAAG,aAA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AAK,EAAE,sCAAsC,IAAA,oBAAY,EAAC,EAAE,CAAC,OAAO,IAAA,oBAAY,EAAC,EAAE,CAAC,EAAE;iBACvF,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YAChD,IAAI,YAAY,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACxB,OAAO,EAAE,KAAK,EAAE,4BAA4B,IAAA,oBAAY,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAClE,CAAC;YACD,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Context, LambdaTerm, ProofTree } from './types';
|
|
2
|
+
export declare class ProofConversionError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export declare function termToProof(term: LambdaTerm, ctx?: Context): ProofTree;
|
|
5
|
+
export declare function proofToTerm(proof: ProofTree): LambdaTerm;
|
|
6
|
+
export declare function proofIsConsistent(proof: ProofTree): boolean;
|
|
7
|
+
//# sourceMappingURL=proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../../src/curry-howard/proof.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG9D,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAGlD,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,GAAE,OAAY,GAAG,SAAS,CAE1E;AAwHD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAkFxD;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAa3D"}
|