Inter4ql
5.2
|
Generic class of module (only virtual methods) More...
#include <ModuleGeneric.h>
Public Member Functions | |
ModuleGeneric () | |
default constructor | |
virtual | ~ModuleGeneric () |
default destructor | |
virtual Relation * | get_relation (std::string s) const |
getter for a relation More... | |
virtual std::string | get_name () const |
getter for a name of module More... | |
virtual std::string | print () |
function that returns string with module information More... | |
virtual std::vector< Relation * > * | get_relations () const |
getter for module relations More... | |
virtual module_type::type | get_module_type () const |
getter for module type More... | |
virtual void | reason ()=0 |
performs reasoning More... | |
virtual void | reason_with_rules (std::vector< Rule *> *rules) |
performs reasing with additional Rules added More... | |
virtual Result | ask_for_result (Fact *term) const =0 |
provides valuations matching given Fact More... | |
virtual Result | evaluate_expression (Expression *expr) const |
provides valuations matching given Expression More... | |
virtual Result | evaluate_expression_bf (Expression *expr) const |
provides bel-free valuations matching given Expression More... | |
virtual std::vector< std::string > | get_references (Fact *term) |
provides a list of Module references is term (useful when e.g. term is a shadowed Bel) More... | |
virtual void | set_modules (std::vector< ModuleGeneric *> *_modules) |
setter for modules needed in this module More... | |
virtual Constraints * | get_constraints () const |
getter for constraints More... | |
virtual std::vector< Domain * > * | get_domains () const |
getter for domains More... | |
virtual bool | contains_domain (Domain *d) const |
check if module contains domain More... | |
virtual bool | contains_relation (Relation *d) const |
check if module contains relation (ignoring module name) More... | |
virtual void | set_disable_constraints (bool value) const |
allows for disabling constraints check More... | |
virtual bool | check_constraints_local (bool check_rigid, bool check_flexible) const |
evaluates constraints locally, in current module More... | |
virtual database * | get_wsm_database () |
fetches a database of facts from well-supported model (for summing purposes) More... | |
virtual database * | get_add_database () |
fetches a database of facts which were added by actions to this module More... | |
virtual database * | get_remove_database () |
fetches a database of facts which were removed by actions from this module More... | |
virtual void | set_add_database (database *db) |
overrides a database of facts which were added by actions to this module More... | |
virtual void | set_remove_database (database *db) |
overrides a database of facts which were removed by actions from this module More... | |
virtual bool | constraints_violated () |
checks whether constraints are violated More... | |
Protected Attributes | |
Inter4ql::database * | database_to_add |
Inter4ql::database * | database_to_remove |
Generic class of module (only virtual methods)
provides valuations matching given Fact
term | query to find in database |
Implemented in Inter4ql::ModuleProblem, Inter4ql::ModuleLocal, Inter4ql::ModuleAction, Inter4ql::ModuleGroup, Inter4ql::ModuleBelief, Inter4ql::Math, Inter4ql::Plugin, and Inter4ql::Bel.
|
inlinevirtual |
evaluates constraints locally, in current module
check_rigid | whether rigid constrains should be checked |
check_flexible | whether flexible constraints should be checked |
Reimplemented in Inter4ql::ModuleLocal, and Inter4ql::ModuleBelief.
|
inlinevirtual |
checks whether constraints are violated
Reimplemented in Inter4ql::ModuleLocal, Inter4ql::ModuleBelief, and Inter4ql::Bel.
|
virtual |
check if module contains domain
|
virtual |
check if module contains relation (ignoring module name)
|
virtual |
provides valuations matching given Expression
expr | query to find in database |
Reimplemented in Inter4ql::ModuleGroup, and Inter4ql::ModuleBelief.
|
virtual |
provides bel-free valuations matching given Expression
expr | query to find in database |
Reimplemented in Inter4ql::ModuleBelief.
|
inlinevirtual |
fetches a database of facts which were added by actions to this module
|
inlinevirtual |
getter for constraints
Reimplemented in Inter4ql::ModuleLocal, and Inter4ql::ModuleBelief.
|
inlinevirtual |
getter for domains
Reimplemented in Inter4ql::ModuleLocal, Inter4ql::ModuleBelief, and Inter4ql::ModuleGroup.
|
inlinevirtual |
getter for module type
Reimplemented in Inter4ql::ModuleProblem, Inter4ql::ModuleLocal, Inter4ql::ModuleGroup, Inter4ql::ModuleBelief, Inter4ql::ModuleAction, Inter4ql::ModuleExternal, Inter4ql::ModuleInternal, and Inter4ql::Bel.
|
inlinevirtual |
getter for a name of module
Reimplemented in Inter4ql::ModuleProblem, Inter4ql::ModuleLocal, Inter4ql::ModuleGroup, Inter4ql::ModuleBelief, Inter4ql::ModuleAction, Inter4ql::ModuleExternal, and Inter4ql::ModuleInternal.
|
virtual |
provides a list of Module references is term (useful when e.g. term is a shadowed Bel)
term | Fact to be checked |
Reimplemented in Inter4ql::Bel.
|
inlinevirtual |
getter for a relation
s | name of a relation |
Reimplemented in Inter4ql::ModuleLocal, Inter4ql::ModuleBelief, Inter4ql::ModuleGroup, Inter4ql::ModuleExternal, and Inter4ql::ModuleInternal.
|
inlinevirtual |
getter for module relations
Reimplemented in Inter4ql::ModuleLocal, Inter4ql::ModuleGroup, Inter4ql::ModuleExternal, and Inter4ql::ModuleInternal.
|
inlinevirtual |
fetches a database of facts which were removed by actions from this module
|
inlinevirtual |
fetches a database of facts from well-supported model (for summing purposes)
Reimplemented in Inter4ql::ModuleLocal, and Inter4ql::ModuleSum.
|
inlinevirtual |
function that returns string with module information
Reimplemented in Inter4ql::ModuleProblem, Inter4ql::ModuleLocal, Inter4ql::ModuleGroup, Inter4ql::ModuleBelief, Inter4ql::ModuleAction, Inter4ql::ModuleExternal, and Inter4ql::ModuleInternal.
|
pure virtual |
performs reasoning
Implemented in Inter4ql::ModuleProblem, Inter4ql::ModuleLocal, Inter4ql::ModuleAction, Inter4ql::ModuleGroup, Inter4ql::ModuleBelief, Inter4ql::Math, Inter4ql::Plugin, and Inter4ql::Bel.
|
inlinevirtual |
performs reasing with additional Rules added
rules | list of Rules to be added before reasoning |
Reimplemented in Inter4ql::ModuleLocal.
|
inlinevirtual |
overrides a database of facts which were added by actions to this module
db | database to be set |
|
inlinevirtual |
allows for disabling constraints check
value | value to be set |
Reimplemented in Inter4ql::ModuleLocal, Inter4ql::ModuleBelief, and Inter4ql::Bel.
|
inlinevirtual |
setter for modules needed in this module
_modules | list of modules |
Reimplemented in Inter4ql::ModuleAction, Inter4ql::ModuleBelief, and Inter4ql::Bel.
|
inlinevirtual |
overrides a database of facts which were removed by actions from this module
db | database to be set |