-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cpp
41 lines (39 loc) · 1010 Bytes
/
Main.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
#include"head.h"
vector<string> CONSTANT_NAME; //常量名集
vector<string> VARIABLE_NAME; //变量名集
vector<string> PREDICATE_NAME; //谓词名集
vector<Clause> CLAUSE_SET; //子句集
Clause TARGET_CLAUSE; //目标子句
int main()
{
Solution S;
status state;
state = S.Input_All();
if (state == ERROR) //输入错误
{
cout << "输入错误!" << endl;
return 0;
}
cout << "*************************************" << endl;
state = S.Resolution();
cout << "*************************************" << endl;
if (state == CONTRARIETY) //归结出矛盾
{
cout << "归结出矛盾,猜测不成立!" << endl;
return 0;
}
else if (state == NORMAL) //归结结束,未归结出矛盾或猜测子句
{
cout << "无法归结出猜测子句,猜测不成立!" << endl;
return 0;
}
else //归结出猜测子句
{
cout << "归结出猜测子句,关键归结路径如下:" << endl;
cout << "*************************************" << endl;
S.Display_Key(CLAUSE_SET.size() - 1);
S.Draw_Process();
cout << endl;
}
return 0;
}