Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (26 sloc) 0.702 kB
3203bc4 @Wenling bug fixed
authored
1 #ifndef formula_h
2 #define formula_h
3
4 #include <fstream>
5 #include <vector>
6
7 namespace Sat {
8
9 class Clause;
10
11 class Formula {
12 int maxVar; // maximum variable in this formula
13
14 public:
15 // Constructor and Destructor
16 Formula() : maxVar(0) {}
17 virtual ~Formula() {}
18
19 // Read the formula from the input stream
20 void readClauses(std::istream& is);
21
22 // Dump formuls to cout
23 void dumpClauses();
24
25 // Add a new Clause to the Formula
26 // Return a reference to the new clause
27 virtual Clause& addClause() = 0;
28
29 // Get the number of clauses
30 virtual int numClauses() const = 0;
31
32 // Get the i^th clause in the formula
33 virtual Clause& getClause(int i) = 0;
34 };
35
36 } // end of namespace Sat
37
38 #endif
Something went wrong with that request. Please try again.