Uses of Class
com.articulate.sigma.Formula
Packages that use Formula
Package
Description
Provides classes for the Sigma knowledge engineering environment version developed
at Articulate Software Inc.
Provides classes for natural language generation in the Sigma knowledge engineering environment version developed
at Articulate Software Inc.
Provides classes for translation to other logical languages in the Sigma
knowledge engineering environment version developed at Articulate Software Inc.
Provides classes for handling Wordnets.
-
Uses of Formula in com.articulate.sigma
Fields in com.articulate.sigma with type parameters of type FormulaModifier and TypeFieldDescriptionFormula.argsKB.axiomKeymaps TPTP axiom IDs to SUMO formulasKB.formulaMapA Map of all the Formula objects in the KB.KIF.formulaMapA HashMap of String keys representing the formula, and Formula values.KIF.formulasOrderedDerivation.parentsMethods in com.articulate.sigma that return FormulaModifier and TypeMethodDescriptionFormulaPreprocessor.addTypeRestrictions(Formula form, KB kb) Add clauses for every variable in the antecedent to restrict its type to the type restrictions defined on every relation in which it appears.Returns the LISP 'append' of the formulas Note that this operation has no side effect on the Formula.Prenexifier.binarizeConnectives(Formula f) Formula.carAsFormula()Returns the LISP 'car' of the formula as a new Formula, if possible, else returns null.Formula.cddrAsFormula()Returns the LISP 'cddr' of the formula as a new Formula, if possible, else returns null.Formula.cdrAsFormula()Returns the LISP 'cdr' of the formula as a new Formula, if possible, else returns null.Clausifier.clausify()This method converts the SUO-KIF Formula to a version of clausal (resolution, conjunctive normal) form with Skolem functions, following the procedure described in Logical Foundations of Artificial Intelligence, by Michael Genesereth and Nils Nilsson, 1987, pp.static Formulaconvenience methodReturns a new Formula which is the result of 'consing' a String into this Formula, similar to the LISP procedure of the same name.Formula.copy()Copy the Formula.static FormulaFormula.createComment(String input) the textual version of the formulaFormula.deepCopy()Formula.getArgument(int argnum) Return the numbered argument of the given formula.KB.getFormulaByKey(String key) An accessor providing a Formulastatic FormulaKB.literalListToFormula(List<String> lit) Converts a literal (List object) to a Formula.Formula.negate()Replace term2 with term1Replace term2 with term1Formula.renameVariableArityRelations(KB kb, Map<String, String> relationMap) static FormulaClausifier.renameVariables(Formula f) convenience methodstatic FormulaClausifier.renameVariables(Formula f, Map topLevelVars, Map scopedRenames, Map allRenames) convenience methodFormula.replaceQuantifierVars(String quantifier, List<String> vars) Formula.replaceVar(String v, String term) Replace v with term.Clausifier.substituteVariables(Map<String, String> m) Replace variables with a value as given by the map argumentFormula.substituteVariables(Map<String, String> m) Replace variables with a value as given by the map argumentClausifier.toCanonicalClausalForm()This method converts the SUO-KIF Formula to a canonical version of clausal (resolution, conjunctive normal) form with Skolem functions, following the procedure described in Logical Foundations of Artificial Intelligence, by Michael Genesereth and Nils Nilsson, 1987, pp.static FormulaClausifier.toCanonicalClausalForm(Formula f) convenience methodprotected FormulaClausifier.toCanonicalKifSpecialForm(boolean preserveSharedVariables) This method returns a canonical version of this Formula, assumed to be a KIF "special" form, in which all internal first-order KIF formulae are replaced by their canonical versions, and all variables are renamed, in left to right depth-first order of occurrence, starting from index 1.protected FormulaClausifier.toOpenQueryForNegatedDualForm()This method returns an open Formula that constitutes a KIF query expression, which is generated from the canonicalized negation of the original Formula.static FormulaClausifier.universalsOut(Formula f) convenience methodMethods in com.articulate.sigma that return types with arguments of type FormulaModifier and TypeMethodDescriptionFormula.argumentsToArrayList(int start) Deprecated.Returns an ArrayList containing the Formulas that match the request.KB.askWithLiteral(Formula queryLit) This method retrieves formulas by asking the query expression queryLit, and returns the results, if any, in an ArrayList.KB.askWithLiteral(List<String> queryLit) This method retrieves Formulas by asking the query expression queryLit, and returns the results, if any, in an ArrayList.KB.askWithPredicateSubsumption(String relation, int idxArgnum, String idxTerm) Returns an ArrayList containing the Formulae retrieved, possibly via multiple asks that recursively use relation and all of its subrelations.KB.askWithRestriction(int argnum1, String term1, int argnum2, String term2) KB.askWithTwoRestrictions(int argnum1, String term1, int argnum2, String term2, int argnum3, String term3) Returns an ArrayList of Formulas in which the two terms provided appear in the indicated argument positions.KB.atomsToFormulas(List<String> strings) KifFileChecker.CheckFormulaPreprocess(String fileName, KB kb, Formula f, int formulaStartLine, List<ErrRec> msgs) Run FormulaPreprocessor and record errors/warnings.KB.collectSourceAxioms(KB kb, TPTP3ProofProcessor tpp) Attempt to provide guidance on the likely cause of a contradiction by removing the axioms involved in a contradiction one-by-one and trying again.Formula.complexArgumentsToArrayList(int start) Return all the arguments in a formula as a list, starting at the given argument.RowVars.expandRowVars(KB kb, Formula f) Expand row variables, keeping the information about the original source formula.KButilities.getAllFormulasOfTerm(KB kb, String term) Find all formulas in which the SUMO term is involved.Derivation.getParents()Return a list of all derived objects that are used in this derivation.PredVarInst.handleDoubles(KB kb) A bit of a hack to produce the statements that would result from the only two axioms in SUMO with two predicate variablesKB.instancesOf(String term) Determine whether a particular term is an immediate instance, which has a statement of the form (instance term otherTerm).PredVarInst.instantiatePredVars(Formula input, KB kb) KIF.lexicalOrder()Return an ArrayList of Formula in the same lexical order as their source fileMerges a KIF object containing a single formula into the current KB.FormulaPreprocessor.preProcess(Formula form, boolean isQuery, KB kb) Pre-process a formula before sending it to the theorem prover.Diagnostics.quantifierNotInBody(KB kb) Find cases where a variable appears in a quantifier list, but not in the body of the quantified expression.Diagnostics.quantifierNotInBody(KB kb, String fname) Find cases where a variable appears in a quantifier list, but not in the body of the quantified expression.TaxoModel.removeCached(List<Formula> forms) Remove any cached formulas from a list.FormulaPreprocessor.replacePredVarsAndRowVars(Formula form, KB kb, boolean addHoldsPrefix) Tries to successively instantiate predicate variables and then expand row variables in this Formula, looping until no new Formulae are generated.Clausifier.separateConjunctions()Turn a conjunction into an ArrayList of separate statementsClausifier.separateConjunctions(Formula f) convenience methodKButilities.termIntersection(KB kb, String term1, String term2) Get all formulas that contain both terms.Diagnostics.unquantsInConseq(KB kb) Methods in com.articulate.sigma with parameters of type FormulaModifier and TypeMethodDescriptionThere are two type conditions: one type condition is extracted from domain expression; second type condition is specifically defined in the antecedent of a rule with an instance or subclass expressionFormulaPreprocessor.addTypeRestrictions(Formula form, KB kb) Add clauses for every variable in the antecedent to restrict its type to the type restrictions defined on every relation in which it appears.static StringFormulaUtil.antecedent(Formula f) Get the antecedent of an implication.Returns the LISP 'append' of the formulas Note that this operation has no side effect on the Formula.KB.askWithLiteral(Formula queryLit) This method retrieves formulas by asking the query expression queryLit, and returns the results, if any, in an ArrayList.Prenexifier.binarizeConnectives(Formula f) static voidKifFileChecker.CheckExistentialInAntecedent(String fileName, Formula f, String formulaText, int formulaStartLine, List<ErrRec> msgs) Check for existential quantifiers in antecedents (illegal).KifFileChecker.CheckFormulaPreprocess(String fileName, KB kb, Formula f, int formulaStartLine, List<ErrRec> msgs) Run FormulaPreprocessor and record errors/warnings.static voidKifFileChecker.CheckIsValidFormula(String fileName, Formula f, int formulaStartLine, KB kb, String formulaText, List<ErrRec> msgs) Check if the formula is structurally valid in the KB.static voidKifFileChecker.CheckOrphanVars(String fileName, Formula f, String formulaText, int formulaStartLine, List<ErrRec> msgs) Check for disconnected variable groupsstatic voidKifFileChecker.CheckQuantifiedVariableNotInStatement(String fileName, Formula f, String formulaText, int formulaStartLine, List<ErrRec> msgs) Check for quantified variables that do not appear in the statement body.static voidKifFileChecker.CheckSingleUseVariables(String fileName, Formula f, String formulaText, int formulaStartLine, List<ErrRec> msgs) Check for variables that appear only once in a formula.static voidKifFileChecker.CheckSUMOtoTFAformErrors(String fileName, KB kb, Formula f, int formulaStartLine, Set<Formula> processed, List<ErrRec> msgs) Correct invocation of SUMO→TFA translation errors.static voidKifFileChecker.CheckTermsBelowEntity(String fileName, Formula f, int formulaStartLine, String formulaText, KB kb, Set<String> localIndividuals, Set<String> localSubclasses, List<ErrRec> msgs) Check that all terms are below Entity in the KB hierarchy.static voidKifFileChecker.CheckUnquantInConsequent(String fileName, Formula f, String formulaText, int formulaStartLine, List<ErrRec> msgs) Check for unquantified variables appearing in the consequent of implications.static Formulaconvenience methodvoidFormula.collectQuantifiedUnquantifiedVariablesRecurse(Formula f, Map<String, Boolean> varFlag, Set<String> unquantifiedVariables, Set<String> quantifiedVariables) Collect quantified and unquantified variables recursivelyFormulaPreprocessor.computeVariableTypes(Formula form, KB kb) This method returns a HashMap that maps each String variable in this the names of types (classes) of which the variable must be an instance or the names of types of which the variable must be a subclass.static StringFormulaUtil.consequent(Formula f) Get the consequent of an implication.static StringEditor.createFormPage(KB kb, String term, Formula f) Create an HTML form for editing facts about a term.booleanFormula.deepEquals(Formula f) Test if the contents of the formula are equal to the argument.static booleanDiagnostics.existentialInAntecedent(Formula f) RowVars.expandRowVars(KB kb, Formula f) Expand row variables, keeping the information about the original source formula.Clausifier.extractVariables(Formula f) Extract all variables in a listFormulaPreprocessor.findAllTypeRestrictions(Formula form, KB kb) FormulaPreprocessor.findExplicitTypes(KB kb, Formula form) Collect variable names and their types from instance or subclass expressions.voidFormulaPreprocessor.findExplicitTypesClasses(KB kb, Formula form, Map<String, Set<String>> varExplicitTypes, Map<String, Set<String>> varExplicitClasses) Collect variable names and their types from instance or subclass expressions.FormulaPreprocessor.findExplicitTypesClassesInAntecedent(KB kb, Formula form) Collect the types of any variables that are specifically defined in the antecedent of a rule with an instance expression; Collect the super classes of any variables that are specifically defined in the antecedent of a rule with an subclass expression;FormulaPreprocessor.findExplicitTypesInAntecedent(KB kb, Formula form) Collect the types of any variables that are specifically defined in the antecedent of a rule with an instance or subclass expression.static voidFormulaPreprocessor.findExplicitTypesRecurse(KB kb, Formula form, boolean isNegativeLiteral, Map<String, Set<String>> varExplicitTypes, Map<String, Set<String>> varExplicitClasses) Recursively collect a variable name and its types.Diagnostics.findOrphanVars(Formula f) Builds a map of variable co-occurrences in a formulaPredVarInst.findPredVarTypes(Formula f, KB kb) Get a set of all the types for predicate variables in the formula.RowVars.findRowVars(Formula f) FormulaPreprocessor.findTypeRestrictions(Formula form, KB kb) Find all the type restrictions on the variables in a formula, including constraints from relation argument typing as well as explicitly stated types from instance and subclass expressions.PredVarInst.gatherPredVarRecurse(KB kb, Formula f) Get a set of all the predicate variables in the formula.PredVarInst.gatherPredVars(KB kb, Formula f) Collect and return all predicate variables for the given formulastatic StringFormulaUtil.getLiteralWithPredAndRowVar(String pred, Formula f) RowVars.getRowVarRelations(Formula f) Recurse through the formula looking for row variables.static voidKifFileChecker.harvestLocalFacts(Formula f, Set<String> localIndividuals, Set<String> localSubclasses) Recursively collect local individuals and subclasses from formulas.static StringPredVarInst.hasCorrectArity(Formula f, KB kb) If arity is correct, return null, otherwise, return the predicate that has its arity violated in the given formula.static booleanKButilities.hasCorrectTypes(KB kb, Formula f) Checks for consistent typing in the given formulaPredVarInst.instantiatePredVars(Formula input, KB kb) static booleanTest whether a formula is suitable for theorem proving or if it's just a documentation statementbooleanKB.isFunctional(Formula form) Returns true if argument is functional expression, else returns false.booleanFormula.logicallyEquals(Formula f) Tests if this is logically equal with the parameter formula.static List<Set<VariableMapping>> Formula.mapFormulaVariables(Formula f1, Formula f2, KB kb, Map<FormulaUtil.FormulaMatchMemoMapKey, List<Set<VariableMapping>>> memoMap) Compares two formulae by recursively traversing its predicate structure and by building possible variable maps between the variables of the two formulae.FormulaPreprocessor.preProcess(Formula form, boolean isQuery, KB kb) Pre-process a formula before sending it to the theorem prover.static booleanDiagnostics.quantifierNotInStatement(Formula f) static StringFormulaUtil.removeAnswerClause(Formula f) Factory method for the memo mapstatic FormulaClausifier.renameVariables(Formula f) convenience methodstatic FormulaClausifier.renameVariables(Formula f, Map topLevelVars, Map scopedRenames, Map allRenames) convenience methodFormulaPreprocessor.replacePredVarsAndRowVars(Formula form, KB kb, boolean addHoldsPrefix) Tries to successively instantiate predicate variables and then expand row variables in this Formula, looping until no new Formulae are generated.Clausifier.separateConjunctions(Formula f) convenience methodDiagnostics.singleUseVariables(Formula f) static FormulaClausifier.toCanonicalClausalForm(Formula f) convenience methodstatic ListClausifier.toNegAndPosLitsWithRenameInfo(Formula f) convenience methodstatic StringMust check that this is a simple clause before calling!booleanDeprecated.static FormulaClausifier.universalsOut(Formula f) convenience methodDiagnostics.unquantInConsequent(Formula f) Method parameters in com.articulate.sigma with type arguments of type FormulaModifier and TypeMethodDescriptionstatic voidKifFileChecker.CheckSUMOtoTFAformErrors(String fileName, KB kb, Formula f, int formulaStartLine, Set<Formula> processed, List<ErrRec> msgs) Correct invocation of SUMO→TFA translation errors.KBcache.collectArgFromFormulas(int arg, List<Formula> forms) Get the HashSet of the given arguments from an ArrayList of Formulas.static StringFormulaUtil.formatCollection(Collection<Formula> c) static StringHTMLformatter.formatFormulaList(List<Formula> forms, String header, KB kb, String language, String flang, int start, int localLimit, String limitString) Create the HTML for a section of the Sigma term browser page.KB.formulasToArrayLists(List<Formula> formulaList) Converts all Formula objects in the input List to ArrayList tuples.TaxoModel.removeCached(List<Formula> forms) Remove any cached formulas from a list.static voidFormulaUtil.sortBySourceFile(List<Formula> forms) Constructors in com.articulate.sigma with parameters of type FormulaModifierConstructorDescriptionConstructor to build a formula from an existing formula.Constructor parameters in com.articulate.sigma with type arguments of type Formula -
Uses of Formula in com.articulate.sigma.nlg
Methods in com.articulate.sigma.nlg with parameters of type FormulaModifier and TypeMethodDescriptionvoidInit the formulaArgs for this StackElement.static StringNLGUtils.expandStar(Formula f, String strFormat, String lang) This method expands all "star" (asterisk) directives in the input format string, and returns a new format string with individually numbered argument pointers.voidLanguageFormatterStack.insertFormulaArgs(Formula formula) Insert the given formula arguments into the topmost element of the stack.voidLanguageFormatterStack.translateCurrProcessInstantiation(KB kb, Formula formula) If possible, translate the process instantiation and insert the translation into the topmost stack element.Constructors in com.articulate.sigma.nlg with parameters of type Formula -
Uses of Formula in com.articulate.sigma.parsing
Subclasses of Formula in com.articulate.sigma.parsingMethods in com.articulate.sigma.parsing with parameters of type FormulaModifier and TypeMethodDescriptionstatic SuokifVisitorSuokifVisitor.parseFormula(Formula input) Parse a single formula and use this SuokifVisitor to process as the cached information for the formula.static SuokifVisitorProcess the given SUO-KIF -
Uses of Formula in com.articulate.sigma.tp
Method parameters in com.articulate.sigma.tp with type arguments of type FormulaModifier and TypeMethodDescriptionbooleanEProver.assertFormula(String userAssertionTPTP, KB kb, EProver eprover, List<Formula> parsedFormulas, boolean tptp) Add an assertion for inference.static booleanLEO.assertFormula(String userAssertionTPTP, KB kb, List<Formula> parsedFormulas, boolean tptp) Add an assertion for inference.static booleanVampire.assertFormula(String userAssertionTPTP, KB kb, List<Formula> parsedFormulas, boolean tptp) Add an assertion for inference. -
Uses of Formula in com.articulate.sigma.trans
Fields in com.articulate.sigma.trans declared as FormulaFields in com.articulate.sigma.trans with type parameters of type FormulaMethods in com.articulate.sigma.trans that return FormulaModifier and TypeMethodDescriptionstatic FormulaTHFnew.adjustArity(KB kb, Formula f) Adding the world argument messes up pre-processing for variable arity relations, so we have to decrement the numerical suffix as a hack.static FormulaTPTP2SUMO.collapseConnectives(Formula form) Remove binary cascading or's, xor's and and's and consolidate as single connectives with more arguments.TPTP3ProofProcessor.extractAnswerClause(Formula ax) *************************************************************** Return the answer clause, or null if not presentstatic FormulaModals.handleHOL3pred(Formula f, KB kb, Integer worldNum) Handle the predicates given in regHOL3pred, which have a parameter followed by a formula.static FormulaModals.handleHOLpred(Formula f, KB kb, Integer worldNum) Handle predicates in regHOLpred that take an individual and a formula argument, e.g.static FormulaModals.handleModalAttribute(Formula f, KB kb, Integer worldNum) Handle the predicate modalAttribute: (modalAttribute F M) is read as: "F holds in all worlds accessible via modality M".static FormulaSUMOtoTFAform.instantiateNumericConstants(Formula f) Substitute the values of numeric constants for their names.static FormulaModals.processModals(Formula f, KB kb) static FormulaModals.processRecurse(Formula f, KB kb, Integer worldNum) Methods in com.articulate.sigma.trans with parameters of type FormulaModifier and TypeMethodDescriptionstatic FormulaTHFnew.adjustArity(KB kb, Formula f) Adding the world argument messes up pre-processing for variable arity relations, so we have to decrement the numerical suffix as a hack.static FormulaTPTP2SUMO.collapseConnectives(Formula form) Remove binary cascading or's, xor's and and's and consolidate as single connectives with more arguments.static StringSUMOtoTFAform.elimUnitaryLogops(Formula f) Recursive routine to eliminate occurrences of 'forall', 'exists', 'invalid input: '<'=>', '=>', 'and', 'xor' and 'or' that have only one or zero argumentsstatic booleanDecide whether to exclude a formula from THF export.static booleanTHFnew.excludeNonModal(Formula f, KB kb, Writer out) TPTP3ProofProcessor.extractAnswerClause(Formula ax) *************************************************************** Return the answer clause, or null if not presentbooleanSUMOKBtoTPTPKB.filterAxiom(Formula form, String tptp, PrintWriter pw) Deprecated.booleanSUMOKBtoTPTPKB.filterAxiom(Formula form, String tptp, List<String> fileContents) booleanSUMOKBtoTPTPKB.filterExcludePredicates(Formula formula) static Stringstatic voidSUMOformulaToTPTPformula.generateQList(Formula f) static Stringstatic Stringstatic FormulaModals.handleHOL3pred(Formula f, KB kb, Integer worldNum) Handle the predicates given in regHOL3pred, which have a parameter followed by a formula.static FormulaModals.handleHOLpred(Formula f, KB kb, Integer worldNum) Handle predicates in regHOLpred that take an individual and a formula argument, e.g.static FormulaModals.handleModalAttribute(Formula f, KB kb, Integer worldNum) Handle the predicate modalAttribute: (modalAttribute F M) is read as: "F holds in all worlds accessible via modality M".static StringTPTPutil.htmlTPTPFormat(Formula f, String hyperlink, boolean traditionalLogic) Format a formula for either text or HTML presentation by inserting the proper hyperlink code, characters for indentation and end of line.static FormulaSUMOtoTFAform.instantiateNumericConstants(Formula f) Substitute the values of numeric constants for their names.static booleana number, a variable with a numeric type or a function symbol or function with a numeric typestatic StringTHFnew.makeWorldVar(KB kb, Formula f) SUMOtoTFAform.missingSorts(Formula f) protected static StringSUMOtoTFAform.modifyPrecond(Formula f) remove statements of the form (instance ?X term) if 'term' is Integer or RealNumber and ?X is already of that type in the quantifier list for the formulaprotected static StringSUMOtoTFAform.modifyTypesToConstraints(Formula f) replace type statements of the form (instance ?X term), where term is a subtype of Integer or RealNumber with a constraint that defines that typestatic StringSUMOtoTFAform.numTypePromotion(Formula f, String parentType) if the formula is a numeric atom or variable or a function with a number range and that type is more specific that the parentType, promote it with $to_real or invalid input: '&to_rat'THF.oneKIF2THF(Formula form, boolean conjecture, KB kb) static voidTHFnew.oneTrans(KB kb, Formula f, PrintWriter bw) static voidTHFnew.oneTransNonModal(KB kb, Formula f, Writer bw) static StringThis is the primary method of the class.static StringThis is the primary method of the class.static StringThis is the primary method of the class.static StringSUMOformulaToTPTPformula.processEquals(Formula f, Formula car, List<String> args) static Stringstatic StringSUMOformulaToTPTPformula.processLogOp(Formula f, Formula car, List<String> args) static Stringstatic FormulaModals.processModals(Formula f, KB kb) static Stringstatic FormulaModals.processRecurse(Formula f, KB kb, Integer worldNum) static StringSUMOformulaToTPTPformula.processRecurse(Formula f) static StringSUMOtoTFAform.processRecurse(Formula f, String parentType) process a formula into TF0static StringDeprecated.voidSUMOformulaToTPTPformula.tptpParse(Formula input, boolean query, KB kb, Set<Formula> preProcessedForms) Deprecated.static booleanSUMOtoTFAform.typeConflict(Formula f) Reject formulas that wind up with type conflicts despite all attempts to resolve themSUMOKBtoTPTPKB.writeFile(String fileName, Formula conjecture, boolean isQuestion, PrintWriter pw) Write all axioms in the KB to TPTP format.Method parameters in com.articulate.sigma.trans with type arguments of type FormulaModifier and TypeMethodDescriptionKIF2DB.getAllRels(Collection<Formula> forms) THF.KIF2THF(Collection<Formula> axiomsC, Collection<Formula> conjecturesC, KB kb) The main function to convert KIF problems into TPTP THF representation; see the explanation at top of this file.static Collection<String> SUMOtoTFAform.processList(Collection<Formula> l) voidSUMOformulaToTPTPformula.tptpParse(Formula input, boolean query, KB kb, Set<Formula> preProcessedForms) Deprecated. -
Uses of Formula in com.articulate.sigma.wordNet
Methods in com.articulate.sigma.wordNet with parameters of type FormulaModifier and TypeMethodDescriptionvoidWordNet.synsetFromTermFormat(Formula form, String tf, String SUMOterm, KB kb) Generate a new synset from a termFormat statement