├── .changeset ├── README.md └── config.json ├── .github └── workflows │ ├── main.yml │ └── publish.yml ├── .gitignore ├── .prettierrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── src ├── builder │ ├── Builder.ts │ └── __tests__ │ │ └── builder.test.ts ├── calculator │ ├── Calculator.ts │ └── __tests__ │ │ └── calculator.test.ts ├── exceptions │ ├── index.ts │ ├── invalid-formula.exception.ts │ ├── invalid-inference.exception.ts │ ├── invalid-proof-sequence.exception.ts │ ├── syntax-error.exception.ts │ └── unrecognized-token.exception.ts ├── frege │ └── Frege.ts ├── index.ts ├── lexer │ ├── Lexer.ts │ └── __tests__ │ │ └── lexer.test.ts ├── modules │ └── index.ts ├── parser │ ├── Parser.ts │ └── __tests__ │ │ └── parser.test.ts ├── proof-checker │ ├── ProofChecker.ts │ └── __tests__ │ │ └── proofChecker.test.ts ├── reducer │ ├── Reducer.ts │ └── __tests__ │ │ └── reducer.test.ts ├── rulers │ ├── RuleApplier.ts │ ├── RuleSetter.ts │ └── __tests__ │ │ └── ruleApplier.test.ts ├── types │ ├── conditional-types │ │ └── reduced-formula.ts │ ├── formulas │ │ ├── atomic-formula.ts │ │ ├── binary-operation-formula.ts │ │ ├── formula.ts │ │ └── molecular-formula.ts │ ├── index.ts │ ├── operations │ │ ├── binary-operations.ts │ │ ├── propositional-variable.ts │ │ └── unary-operation.ts │ ├── semantic │ │ └── truth.ts │ ├── syntactic │ │ └── proof.ts │ └── tokens │ │ └── tokens.ts └── utils │ ├── buildConjunctionString.ts │ ├── eliminateDoubleNegation.ts │ ├── haveEvenNumberOfNegations.ts │ ├── index.ts │ ├── isArrayString.ts │ ├── isBiconditional.ts │ ├── isBinaryOperation.ts │ ├── isConjunction.ts │ ├── isContradiction.ts │ ├── isDisjunction.ts │ ├── isEndOfHypothesis.ts │ ├── isHypothesis.ts │ ├── isImplication.ts │ ├── isMolecularFormula.ts │ ├── isNegation.ts │ ├── isProofItemInferred.ts │ ├── isPropositionalVariable.ts │ ├── objectBuilder.ts │ ├── parse.ts │ └── printTruthTable.ts ├── test ├── parse.ts └── reduce.ts ├── tsconfig.build.json └── tsconfig.json /.changeset/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/.changeset/README.md -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/.changeset/config.json -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/.prettierrc -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /src/builder/Builder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/builder/Builder.ts -------------------------------------------------------------------------------- /src/builder/__tests__/builder.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/builder/__tests__/builder.test.ts -------------------------------------------------------------------------------- /src/calculator/Calculator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/calculator/Calculator.ts -------------------------------------------------------------------------------- /src/calculator/__tests__/calculator.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/calculator/__tests__/calculator.test.ts -------------------------------------------------------------------------------- /src/exceptions/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/exceptions/index.ts -------------------------------------------------------------------------------- /src/exceptions/invalid-formula.exception.ts: -------------------------------------------------------------------------------- 1 | export class InvalidFormulaException extends Error {} 2 | -------------------------------------------------------------------------------- /src/exceptions/invalid-inference.exception.ts: -------------------------------------------------------------------------------- 1 | export class InferenceException extends Error {} 2 | -------------------------------------------------------------------------------- /src/exceptions/invalid-proof-sequence.exception.ts: -------------------------------------------------------------------------------- 1 | export class InvalidProofSequenceException extends Error {} 2 | -------------------------------------------------------------------------------- /src/exceptions/syntax-error.exception.ts: -------------------------------------------------------------------------------- 1 | export class SyntaxException extends Error {} 2 | -------------------------------------------------------------------------------- /src/exceptions/unrecognized-token.exception.ts: -------------------------------------------------------------------------------- 1 | export class UnrecognizedTokenException extends Error {} 2 | -------------------------------------------------------------------------------- /src/frege/Frege.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/frege/Frege.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/lexer/Lexer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/lexer/Lexer.ts -------------------------------------------------------------------------------- /src/lexer/__tests__/lexer.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/lexer/__tests__/lexer.test.ts -------------------------------------------------------------------------------- /src/modules/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/modules/index.ts -------------------------------------------------------------------------------- /src/parser/Parser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/parser/Parser.ts -------------------------------------------------------------------------------- /src/parser/__tests__/parser.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/parser/__tests__/parser.test.ts -------------------------------------------------------------------------------- /src/proof-checker/ProofChecker.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/proof-checker/ProofChecker.ts -------------------------------------------------------------------------------- /src/proof-checker/__tests__/proofChecker.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/proof-checker/__tests__/proofChecker.test.ts -------------------------------------------------------------------------------- /src/reducer/Reducer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/reducer/Reducer.ts -------------------------------------------------------------------------------- /src/reducer/__tests__/reducer.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/reducer/__tests__/reducer.test.ts -------------------------------------------------------------------------------- /src/rulers/RuleApplier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/rulers/RuleApplier.ts -------------------------------------------------------------------------------- /src/rulers/RuleSetter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/rulers/RuleSetter.ts -------------------------------------------------------------------------------- /src/rulers/__tests__/ruleApplier.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/rulers/__tests__/ruleApplier.test.ts -------------------------------------------------------------------------------- /src/types/conditional-types/reduced-formula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/conditional-types/reduced-formula.ts -------------------------------------------------------------------------------- /src/types/formulas/atomic-formula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/formulas/atomic-formula.ts -------------------------------------------------------------------------------- /src/types/formulas/binary-operation-formula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/formulas/binary-operation-formula.ts -------------------------------------------------------------------------------- /src/types/formulas/formula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/formulas/formula.ts -------------------------------------------------------------------------------- /src/types/formulas/molecular-formula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/formulas/molecular-formula.ts -------------------------------------------------------------------------------- /src/types/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/index.ts -------------------------------------------------------------------------------- /src/types/operations/binary-operations.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/operations/binary-operations.ts -------------------------------------------------------------------------------- /src/types/operations/propositional-variable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/operations/propositional-variable.ts -------------------------------------------------------------------------------- /src/types/operations/unary-operation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/operations/unary-operation.ts -------------------------------------------------------------------------------- /src/types/semantic/truth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/semantic/truth.ts -------------------------------------------------------------------------------- /src/types/syntactic/proof.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/syntactic/proof.ts -------------------------------------------------------------------------------- /src/types/tokens/tokens.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/types/tokens/tokens.ts -------------------------------------------------------------------------------- /src/utils/buildConjunctionString.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/buildConjunctionString.ts -------------------------------------------------------------------------------- /src/utils/eliminateDoubleNegation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/eliminateDoubleNegation.ts -------------------------------------------------------------------------------- /src/utils/haveEvenNumberOfNegations.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/haveEvenNumberOfNegations.ts -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/index.ts -------------------------------------------------------------------------------- /src/utils/isArrayString.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isArrayString.ts -------------------------------------------------------------------------------- /src/utils/isBiconditional.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isBiconditional.ts -------------------------------------------------------------------------------- /src/utils/isBinaryOperation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isBinaryOperation.ts -------------------------------------------------------------------------------- /src/utils/isConjunction.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isConjunction.ts -------------------------------------------------------------------------------- /src/utils/isContradiction.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isContradiction.ts -------------------------------------------------------------------------------- /src/utils/isDisjunction.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isDisjunction.ts -------------------------------------------------------------------------------- /src/utils/isEndOfHypothesis.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isEndOfHypothesis.ts -------------------------------------------------------------------------------- /src/utils/isHypothesis.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isHypothesis.ts -------------------------------------------------------------------------------- /src/utils/isImplication.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isImplication.ts -------------------------------------------------------------------------------- /src/utils/isMolecularFormula.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isMolecularFormula.ts -------------------------------------------------------------------------------- /src/utils/isNegation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isNegation.ts -------------------------------------------------------------------------------- /src/utils/isProofItemInferred.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isProofItemInferred.ts -------------------------------------------------------------------------------- /src/utils/isPropositionalVariable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/isPropositionalVariable.ts -------------------------------------------------------------------------------- /src/utils/objectBuilder.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/objectBuilder.ts -------------------------------------------------------------------------------- /src/utils/parse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/parse.ts -------------------------------------------------------------------------------- /src/utils/printTruthTable.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/src/utils/printTruthTable.ts -------------------------------------------------------------------------------- /test/parse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/test/parse.ts -------------------------------------------------------------------------------- /test/reduce.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/test/reduce.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Etec-SA/frege/HEAD/tsconfig.json --------------------------------------------------------------------------------