more edits
[satune.git] / src / Backend / cnfexpr.h
1 #ifndef CNFEXPR_H
2 #define CNFEXPR_H
3 #include "classlist.h"
4 #include "vector.h"
5
6 typedef int Literal;
7
8
9 struct LitVector {
10         uint size;
11         uint capacity;
12         Literal *literals;
13 };
14 typedef CNFClause CNFClause;
15
16 VectorDef(LitVector, LitVector *)
17
18 struct CNFExpr {
19         uint litSize;
20         bool isTrue;
21         VectorLitVector clauses;
22         LitVector singletons;
23 };
24
25 typedef CNFExpr CNFExpr;
26
27 bool alwaysTrueCNF(CNFExpr * This);
28 bool alwaysFalseCNF(CNFExpr * This);
29 uint getLitSizeCNF(CNFExpr * This);
30 void clearCNF(CNFExpr *This, bool isTrue);
31 uint getClauseSizeCNF(CNFExpr * This);
32 #endif