blob: a2af6dc3445d664e32a37a43ab1835caad030888 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*****************************************************************************
MiniSat -- Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
CryptoMiniSat -- Copyright (c) 2009 Mate Soos
Original code by MiniSat authors are under an MIT licence.
Modifications for CryptoMiniSat are under GPLv3 licence.
******************************************************************************/
#ifndef MAIN_H
#define MAIN_H
#include <string>
#include <vector>
#ifndef DISABLE_ZLIB
#include <zlib.h>
#endif // DISABLE_ZLIB
#include "Solver.h"
#include "SharedData.h"
namespace CMSat {
using std::string;
class Main
{
public:
Main(int argc, char** argv);
void parseCommandLine();
int singleThreadSolve();
int oneThreadSolve();
int multiThreadSolve();
int numThreads;
private:
void printUsage(char** argv);
const char* hasPrefix(const char* str, const char* prefix);
void printResultFunc(const Solver& S, const lbool ret, FILE* res);
//File reading
void readInAFile(const std::string& filename, Solver& solver);
void readInStandardInput(Solver& solver);
void parseInAllFiles(Solver& solver);
FILE* openOutputFile();
void setDoublePrecision(const uint32_t verbosity);
void printVersionInfo(const uint32_t verbosity);
int correctReturnValue(const lbool ret) const;
SolverConf conf;
GaussConf gaussconfig;
bool grouping;
bool debugLib;
bool debugNewVar;
bool printResult;
uint32_t max_nr_of_solutions;
bool fileNamePresent;
bool twoFileNamesPresent;
std::vector<std::string> filesToRead;
SharedData sharedData;
int argc;
char** argv;
};
}
#endif //MAIN_H
|