public abstract class InferenceApplication extends Object implements ModelApplication
Modifier and Type | Field and Description |
---|---|
protected PersistedAtomManager |
atomManager |
static String |
CONFIG_PREFIX
Prefix of property keys used by this class.
|
protected Database |
db |
static String |
GROUND_RULE_STORE_DEFAULT |
static String |
GROUND_RULE_STORE_KEY
The class to use for ground rule storage.
|
protected GroundRuleStore |
groundRuleStore |
protected Model |
model |
protected Reasoner |
reasoner |
static String |
REASONER_DEFAULT |
static String |
REASONER_KEY
The class to use for a reasoner.
|
static String |
TERM_GENERATOR_DEFAULT |
static String |
TERM_GENERATOR_KEY
The class to use for term generator.
|
static String |
TERM_STORE_DEFAULT |
static String |
TERM_STORE_KEY
The class to use for term storage.
|
protected TermGenerator |
termGenerator |
protected TermStore |
termStore |
Constructor and Description |
---|
InferenceApplication(Model model,
Database db) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases all resources used by this ModelApplication.
|
protected void |
completeInitialize()
Complete the initialization process.
|
protected PersistedAtomManager |
createAtomManager(Database db) |
protected GroundRuleStore |
createGroundRuleStore() |
protected Reasoner |
createReasoner() |
protected TermGenerator |
createTermGenerator() |
protected TermStore |
createTermStore() |
PersistedAtomManager |
getAtomManager() |
GroundRuleStore |
getGroundRuleStore() |
static InferenceApplication |
getInferenceApplication(String className,
Model model,
Database db)
Construct an inference application given the data.
|
Reasoner |
getReasoner() |
TermStore |
getTermStore() |
void |
inference()
Alias for inference() with committing atoms.
|
void |
inference(boolean commitAtoms)
Minimizes the total weighted incompatibility of the GroundAtoms in the Database
according to the Model and commits the updated truth values back to the Database.
|
protected void |
initialize()
Get objects ready for inference.
|
protected void |
internalInference()
The implementation of the full inference by each class.
|
public static final String CONFIG_PREFIX
public static final String REASONER_KEY
public static final String REASONER_DEFAULT
public static final String GROUND_RULE_STORE_KEY
public static final String GROUND_RULE_STORE_DEFAULT
public static final String TERM_STORE_KEY
public static final String TERM_STORE_DEFAULT
public static final String TERM_GENERATOR_KEY
public static final String TERM_GENERATOR_DEFAULT
protected Model model
protected Database db
protected Reasoner reasoner
protected GroundRuleStore groundRuleStore
protected TermStore termStore
protected TermGenerator termGenerator
protected PersistedAtomManager atomManager
protected void initialize()
protected PersistedAtomManager createAtomManager(Database db)
protected GroundRuleStore createGroundRuleStore()
protected Reasoner createReasoner()
protected TermGenerator createTermGenerator()
protected TermStore createTermStore()
protected void completeInitialize()
public void inference()
public void inference(boolean commitAtoms)
protected void internalInference()
public Reasoner getReasoner()
public GroundRuleStore getGroundRuleStore()
public TermStore getTermStore()
public PersistedAtomManager getAtomManager()
public void close()
ModelApplication
close
in interface ModelApplication
public static InferenceApplication getInferenceApplication(String className, Model model, Database db)
Copyright © 2020 University of California, Santa Cruz. All rights reserved.