Package com.articulate.sigma
Class SInE
java.lang.Object
com.articulate.sigma.InferenceEngine
com.articulate.sigma.SInE
- Author:
- Krystof Hoder - Minor changes by Adam Pease
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.articulate.sigma.InferenceEngine
InferenceEngine.EngineFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertFormula(String formula) Add an assertion.get1RequiredFormulas(Collection<String> symbols) Returns formulas that are directly required by given symbols (in the sense of requirements map).static SInEgetNewInstance(String kbFileName) getRequiredFormulas(Collection<String> symbols) Returns formulas that are transitively required by given symbols (in the sense of requirements map).getRequiredSymbols(Collection<String> symbols) Returns all symbols transitively required by given symbols (in the sense of requirements map).getSymbols(String form) Returns all symbols occurring in given formula.getSymbols(Collection<String> forms) voidloadFormulas(Iterable<String> formulaSource) Loads formulas from given source.loadNonKif(File kbFile) Loads formulas from given source.static voidA simple test to load a KB file and pose a query, which are the first and second item, respectively, given on the command line.performSelection(String form) Performs axiom selection for given query.submitQuery(String formula, int timeLimit, int bindingsLimit) Submit a query.static voidA simple test to load a KB file and pose a query, which are the first and second item, respectively, given on the command line.Methods inherited from class com.articulate.sigma.InferenceEngine
terminate
-
Constructor Details
-
SInE
-
-
Method Details
-
getNewInstance
-
getFactory
-
loadNonKif
Loads formulas from given source. -
loadFormulas
Loads formulas from given source.- Parameters:
formulaSource- Iterable object that contains strings representing formulas.
-
getSymbols
Returns all symbols occurring in given formula.- Parameters:
form- Formula to get symbols from.- Returns:
- Symbols occurring in given formula.
-
getSymbols
-
get1RequiredFormulas
Returns formulas that are directly required by given symbols (in the sense of requirements map).- Parameters:
symbols- Symbols whose required formulas will be found.- Returns:
- Formulas required by symbols.
-
getRequiredSymbols
Returns all symbols transitively required by given symbols (in the sense of requirements map).- Parameters:
symbols- Collection of symbols to be closed under requirements relation.- Returns:
- Closure of given collection of symbols under requirements relation.
-
getRequiredFormulas
Returns formulas that are transitively required by given symbols (in the sense of requirements map).- Parameters:
symbols- Symbols whose required formulas will be found.- Returns:
- Formulas transitively required by symbols.
-
performSelection
Performs axiom selection for given query.- Parameters:
form- Formula, according to which axioms will be selected.- Returns:
- Selected formulas.
-
submitQuery
Description copied from class:InferenceEngineSubmit a query.- Specified by:
submitQueryin classInferenceEngine- Parameters:
formula- query in the KIF syntaxtimeLimit- time limit for answering the query (in seconds)bindingsLimit- limit on the number of bindings- Returns:
- answer to the query (in the XML syntax)
- Throws:
IOException- should not normally be thrown
-
assertFormula
Description copied from class:InferenceEngineAdd an assertion.- Specified by:
assertFormulain classInferenceEngine- Parameters:
formula- asserted formula in the KIF syntax- Returns:
- answer to the assertion (in the XML syntax)
-
test
A simple test to load a KB file and pose a query, which are the first and second item, respectively, given on the command line. -
main
A simple test to load a KB file and pose a query, which are the first and second item, respectively, given on the command line.- Throws:
Exception
-