public class SInE extends InferenceEngine
| Modifier and Type | Class and Description |
|---|---|
static class |
SInE.SInEFactory |
InferenceEngine.EngineFactory| Modifier and Type | Method and Description |
|---|---|
String |
assertFormula(String formula)
Add an assertion.
|
Set<String> |
get1RequiredFormulas(Collection<String> symbols)
Returns formulas that are directly required by given symbols
(in the sense of requirements map).
|
static InferenceEngine.EngineFactory |
getFactory() |
static SInE |
getNewInstance(String kbFileName) |
Set<String> |
getRequiredFormulas(Collection<String> symbols)
Returns formulas that are transitively required by given symbols
(in the sense of requirements map).
|
Set<String> |
getRequiredSymbols(Collection<String> symbols)
Returns all symbols transitively required by given symbols
(in the sense of requirements map).
|
Set<String> |
getSymbols(Collection<String> forms) |
Set<String> |
getSymbols(String form)
Returns all symbols occurring in given formula.
|
void |
loadFormulas(Iterable<String> formulaSource)
Loads formulas from given source.
|
static void |
main(String[] args)
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.
|
Set<String> |
performSelection(String form)
Performs axiom selection for given query.
|
String |
submitQuery(String formula,
int timeLimit,
int bindingsLimit)
Submit a query.
|
terminatepublic static InferenceEngine.EngineFactory getFactory()
public void loadFormulas(Iterable<String> formulaSource)
formulaSource - Iterable object that contains strings representing formulas.public Set<String> getSymbols(String form)
form - Formula to get symbols from.public Set<String> getSymbols(Collection<String> forms)
public Set<String> get1RequiredFormulas(Collection<String> symbols)
symbols - Symbols whose required formulas will be found.public Set<String> getRequiredSymbols(Collection<String> symbols)
symbols - Collection of symbols to be closed under requirements relation.public Set<String> getRequiredFormulas(Collection<String> symbols)
symbols - Symbols whose required formulas will be found.public Set<String> performSelection(String form)
form - Formula, according to which axioms will be selected.public String submitQuery(String formula, int timeLimit, int bindingsLimit) throws IOException
InferenceEnginesubmitQuery in class InferenceEngineformula - query in the KIF syntaxtimeLimit - time limit for answering the query (in seconds)bindingsLimit - limit on the number of bindingsIOException - should not normally be thrownpublic String assertFormula(String formula)
InferenceEngineassertFormula in class InferenceEngineformula - asserted formula in the KIF syntaxCopyright © 2015. All rights reserved.