/
EnvironmentCreationPass.cpp
53 lines (52 loc) · 1.26 KB
/
EnvironmentCreationPass.cpp
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
43
44
45
46
47
48
49
50
51
52
53
#include "EnvironmentCreationPass.h"
using namespace llvm;
bool EnvironmentConstruction::environmentCreated() { return (environment != 0); }
void* EnvironmentConstruction::getEnvironment() { return environment; }
void EnvironmentConstruction::reset() {
if(environment) {
EnvReset(environment);
}
}
void EnvironmentConstruction::clear() {
if(environment) {
EnvClear(environment);
}
}
void EnvironmentConstruction::run(ExecutionDuration count) {
if(environment) {
if(count <= 0L) {
EnvRun(environment, -1L);
} else {
EnvRun(environment, count);
}
}
}
void EnvironmentConstruction::saveInstances(char* fileName) {
if(environment) {
EnvSaveInstances(environment, fileName, VISIBLE_SAVE, NULL, TRUE);
}
}
void EnvironmentConstruction::assertFact(char* str) {
if(environment) {
EnvAssertString(environment, str);
}
}
bool EnvironmentConstruction::makeInstances(char* str) {
if(environment) {
return EnvLoadInstancesFromString(environment, str, -1) != -1;
} else {
return false;
}
}
bool EnvironmentConstruction::makeInstance(char* str) {
if(environment) {
return (EnvMakeInstance(environment, str) != NULL);
} else {
return false;
}
}
void EnvironmentConstruction::batchStar(char* str) {
if(environment) {
EnvBatchStar(environment, str);
}
}