1 #ifndef __FUNCTIONS_H__ 2 #define __FUNCTIONS_H__ 6 #include "LineParser.tab.h" 8 #include "VariableSpace.h" 23 this->left_ =
nullptr;
24 this->right_ =
nullptr;
33 this->left_ =
nullptr;
34 this->right_ =
nullptr;
41 if (this->left_)
delete this->left_;
42 if (this->right_)
delete this->right_;
56 std::string location2string(LineParser::location_type _location);
77 bool bind_variables(
const std::vector<Value*>& query,
const std::vector<Value*>& value, std::map<std::string, Value*>& binding);
84 std::vector<Value*> apply_bind(
const std::vector<Value*>* query,
const std::map<std::string, Value*>& binding);
92 AsExpr* parse_asExpr(std::string toParse,
int& pos);
99 std::string print_expression(
Expression* expr);
105 void print_constraints(std::string& s, std::vector<Expression*>* constraints);
115 bool check_constraints(Ctraints to_check,
bool& disable_constraints, std::vector<Domain*> *domains, std::vector<ModuleGeneric *> *modules,
const ModuleGeneric* current_module);
126 Result evaluate_expression_global(
Expression* expr,
const ModuleGeneric* this_module, std::vector<ModuleGeneric*>* modules, std::vector<Domain*> *domains,
int& rating);
138 Result untill_now, std::vector<Domain*> *domains,
int& rating);
144 database* make_snapshot(database* db);
157 void remove_from_database(database* database,
Fact* fact);
165 logic_type::type value_in_database(database* database, std::string relation,
const std::vector<Value*>& vect);
175 bool ask_for_fact_in_database(
const database* db,
Fact* term,
Result& res,
const database* db_to_rm =
nullptr,
bool check_existance =
true);
type
Enumeration type for four-valued logic.
Definition: Types.h:45
class that implements a fact
Definition: Fact.h:14
Definition: Expression.h:10
AsExpr()
constructor that creates a new AsExpr without an ID
Definition: Functions.h:22
~AsExpr()
destructor
Definition: Functions.h:40
Definition: Application.cc:37
Definition: Functions.h:17
Generic class of module (only virtual methods)
Definition: ModuleGeneric.h:21
AsExpr(std::string id)
constructor that creates a new AsExpr
Definition: Functions.h:31
type
Enumeration type for types of values.
Definition: Types.h:26