-
Notifications
You must be signed in to change notification settings - Fork 0
/
DatalogProgram.h
42 lines (36 loc) · 957 Bytes
/
DatalogProgram.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef INTERPRETER_DATALOGPROGRAM_H
#define INTERPRETER_DATALOGPROGRAM_H
#include "Predicate.h"
#include "Rule.h"
#include <vector>
#include <string>
#include <set>
class DatalogProgram {
private:
std::vector<Predicate*> schemes;
std::vector<Predicate*> facts;
std::vector<Rule*> rules;
std::vector<Predicate*> queries;
std::set<std::string> domain;
public:
DatalogProgram() {}
~DatalogProgram();
void AddScheme(Predicate* scheme);
void AddFact(Predicate* fact);
void AddRule(Rule* rule);
void AddQuery(Predicate*);
std::vector<Predicate*> GetSchemes() {
return schemes;
}
std::vector<Predicate*> GetFacts() {
return facts;
}
std::vector<Rule*> GetRules() {
return rules;
}
std::vector<Predicate*> GetQueries() {
return queries;
}
std::string ToString();
};
#endif //INTERPRETER_DATALOGPROGRAM_H