formula.h
Go to the documentation of this file.
00001 
00007 #ifndef _FORMULA_H
00008 #define _FORMULA_H_
00009 
00010 #include <vector>
00011 #include <string>
00012 #include <fstream>
00013 
00014 #include "clause.h"
00015 #include "variableset.h"
00016 
00017 #define CLAUSE_BUFFER_SIZE 10000
00018 
00019 namespace cnf {
00020 
00035 class Formula
00036 {
00037         private:
00044                 VariableSet * varSet;
00045 
00050                 std::vector<Clause*> cnfs;
00051 
00057                 Clause * bufferClause;
00058                 
00063                 std::ostream * output;
00064 
00065         public:
00080                 Formula(VariableSet*, std::ostream*, std::string);
00081 
00086                 ~Formula();
00087 
00092                 void newClause();
00093 
00103                 void addLit(unsigned int, bool, unsigned int, unsigned int);
00104 
00115                 void addLit(unsigned int, bool, unsigned int, unsigned int, unsigned int);
00116 
00124                 void addLitCode(int);
00125 
00130                 void pushClause();
00131 
00136                 void flush();
00137 };
00138 
00139 
00140 } // closing namespace
00141 
00142 #endif
 All Classes Namespaces Files Functions Variables Defines