Split Boolean into separate file
authorbdemsky <bdemsky@uci.edu>
Wed, 14 Jun 2017 22:15:34 +0000 (15:15 -0700)
committerbdemsky <bdemsky@uci.edu>
Wed, 14 Jun 2017 22:15:34 +0000 (15:15 -0700)
src/Makefile
src/boolean.cc [new file with mode: 0644]
src/boolean.h [new file with mode: 0644]
src/classlist.h
src/csolver.h
src/mymemory.h

index 6ca77fc..ff0452f 100644 (file)
@@ -4,7 +4,7 @@ PHONY += directories
 MKDIR_P = mkdir -p
 OBJ_DIR = bin
 
-CPP_SOURCES := constraint.cc inc_solver.cc set.cc mutableset.cc element.cc function.cc order.cc table.cc predicate.cc
+CPP_SOURCES := constraint.cc inc_solver.cc set.cc mutableset.cc element.cc function.cc order.cc table.cc predicate.cc boolean.cc
 
 OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o)
 
diff --git a/src/boolean.cc b/src/boolean.cc
new file mode 100644 (file)
index 0000000..13070fa
--- /dev/null
@@ -0,0 +1 @@
+#include "boolean.h"
diff --git a/src/boolean.h b/src/boolean.h
new file mode 100644 (file)
index 0000000..98e727e
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef BOOLEAN_H
+#define BOOLEAN_H
+#include "classlist.h"
+#include "mymemory.h"
+
+class Boolean {
+ public:
+       MEMALLOC;
+ private:
+};
+#endif
index cb9f19b..4c48778 100644 (file)
@@ -14,6 +14,7 @@
 #include <inttypes.h>
 
 class Constraint;
+class Boolean;
 class IncrementalSolver;
 class Set;
 class MutableSet;
index 1d398ce..b03adb7 100644 (file)
@@ -6,7 +6,6 @@
 class CSolver {
 public:
        CSolver();
-
        Set * createSet(Type type, uint64_t ** elements);
        Set * createSet(Type type, uint64_t lowrange, uint64_t highrange);
        MutableSet * createMutableSet(Type type);
@@ -18,7 +17,8 @@ public:
        Constraint * getBooleanVar();
 
        Function * createFunctionOperator(enum ArithOp op, Set ** domain, Set * range, enum OverFlowBehavior overflowbehavior, Constraint * overflowstatus);
-       Function * createFunctionOperator(enum ArithOp op);                                                                                                                                                                                                                                                                                                                                                                                                                                                                             //Does Not Overflow
+       //Does Not Overflow
+       Function * createFunctionOperator(enum ArithOp op);
        Predicate * createPredicateOperator(enum CompOp op, Set ** domain);
 
        Table * createTable(Set **domains, Set * range);
@@ -34,6 +34,6 @@ public:
        Order * createOrder(enum OrderType type, Set * set);
        Constraint * orderedConstraint(Order * order, uint64_t first, uint64_t second);
 private:
-
+       ModelVector<Constraint *> constraints;
 };
 #endif
index 0ce450d..aabb169 100644 (file)
@@ -34,8 +34,8 @@
        void operator delete[](void *p, size_t size) { \
                model_free(p); \
        } \
-       void * operator new(size_t size, void *p) {     \
-return p;                                                                                                                                                              \
+       void * operator new(size_t size, void *p) {     \
+               return p;                                                                                                                                                               \
        }
 
 void *model_malloc(size_t size);