Changes
authorbdemsky <bdemsky@uci.edu>
Mon, 19 Jun 2017 22:58:58 +0000 (15:58 -0700)
committerbdemsky <bdemsky@uci.edu>
Mon, 19 Jun 2017 23:00:37 +0000 (16:00 -0700)
design/notes.txt
src/AST/element.c
src/AST/element.h
src/AST/function.h
src/Backend/satencoder.c [new file with mode: 0644]
src/Backend/satencoder.h [new file with mode: 0644]
src/Encoders/elementencoding.c
src/Encoders/functionencoding.c
src/Encoders/orderencoding.c [new file with mode: 0644]
src/Encoders/orderencoding.h [new file with mode: 0644]
src/classlist.h

index 1159c96..ce399c3 100644 (file)
@@ -6,3 +6,6 @@
 
 (4) Might need to indicate what variables we can query about in
 future?
+
+(5) Could simplify output of functions...  Maybe several outputs have
+same effect...
index 45117e1..df29cfe 100644 (file)
@@ -3,6 +3,7 @@
 Element *allocElement(Set * s) {
        Element * tmp=(Element *)ourmalloc(sizeof(Element));
        tmp->set=s;
+       tmp->encoding=NULL;
        return tmp;
 }
 
index 6cbf94c..91d19db 100644 (file)
@@ -5,6 +5,7 @@
 
 struct Element {
        Set * set;
+       ElementEncoding * encoding;
 };
 
 Element * allocElement(Set *s);
index 459f0b5..65a4b29 100644 (file)
@@ -4,6 +4,7 @@
 #include "mymemory.h"
 #include "ops.h"
 #include "structs.h"
+
 struct Function {
        ArithOp op;
        VectorSet* domains;
diff --git a/src/Backend/satencoder.c b/src/Backend/satencoder.c
new file mode 100644 (file)
index 0000000..5f2be2e
--- /dev/null
@@ -0,0 +1,10 @@
+#include "satencoder.h"
+
+SATEncoder * allocSATEncoder() {
+       SATEncoder *This=ourmalloc(sizeof (SATEncoder));
+       return This;
+}
+
+void deleteSATEncoder(SATEncoder *This) {
+       ourfree(This);
+}
diff --git a/src/Backend/satencoder.h b/src/Backend/satencoder.h
new file mode 100644 (file)
index 0000000..04c4923
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef SATENCODER_H
+#define SATENCODER_H
+
+#include "classlist.h"
+
+struct SATEncoder {
+
+};
+
+
+SATEncoder * allocSATEncoder();
+void deleteSATEncoder(SATEncoder *This);
+
+#endif
index fb2ce4a..08385db 100644 (file)
@@ -1,7 +1,7 @@
 #include "elementencoding.h"
 
 ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element) {
-       ElementEncoding * This=(ElementEncoding *)ourmalloc(sizeof(ElementEncoding));
+       ElementEncoding * This=ourmalloc(sizeof(ElementEncoding));
        This->element=element;
        This->type=type;
        This->variables=NULL;
index 282912d..c9c0e19 100644 (file)
@@ -1,14 +1,14 @@
 #include "functionencoding.h"
 
 FunctionEncoding * allocFunctionEncoding(FunctionEncodingType type, Element *function) {
-       FunctionEncoding * This=(FunctionEncoding *)ourmalloc(sizeof(FunctionEncoding));
+       FunctionEncoding * This=ourmalloc(sizeof(FunctionEncoding));
        This->op.function=function;
        This->type=type;
        return This;
 }
 
 FunctionEncoding * allocPredicateEncoding(FunctionEncodingType type, Boolean *predicate) {
-       FunctionEncoding * This=(FunctionEncoding *)ourmalloc(sizeof(FunctionEncoding));
+       FunctionEncoding * This=ourmalloc(sizeof(FunctionEncoding));
        This->op.predicate=predicate;
        This->type=type;
        return This;
diff --git a/src/Encoders/orderencoding.c b/src/Encoders/orderencoding.c
new file mode 100644 (file)
index 0000000..fcef2f3
--- /dev/null
@@ -0,0 +1,10 @@
+#include "orderencoding.h"
+
+OrderEncoding * allocOrderEncoding() {
+       OrderEncoding *This=ourmalloc(sizeof(OrderEncoding));
+       return This;
+}
+
+void deleteOrderEncoding(OrderEncoding *This) {
+       ourfree(This);
+}
diff --git a/src/Encoders/orderencoding.h b/src/Encoders/orderencoding.h
new file mode 100644 (file)
index 0000000..c0e4c00
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef ORDERENCODING_H
+#define ORDERENCODING_H
+#include "classlist.h"
+
+struct OrderEncoding {
+
+};
+
+OrderEncoding * allocOrderEncoding();
+void deleteOrderEncoding(OrderEncoding *This);
+
+#endif
index d232592..6335297 100644 (file)
@@ -18,6 +18,9 @@
 
 struct CSolver;
 typedef struct CSolver CSolver;
+struct SATEncoder;
+typedef struct SATEncoder SATEncoder;
+
 
 struct Constraint;
 typedef struct Constraint Constraint;
@@ -35,7 +38,6 @@ typedef struct IncrementalSolver IncrementalSolver;
 
 struct Set;
 typedef struct Set Set;
-
 typedef struct Set MutableSet;
 
 struct Element;
@@ -59,6 +61,9 @@ typedef struct ElementEncoding ElementEncoding;
 struct FunctionEncoding;
 typedef struct FunctionEncoding FunctionEncoding;
 
+struct OrderEncoding;
+typedef struct OrderEncoding OrderEncoding;
+
 struct TableEntry;
 typedef struct TableEntry TableEntry;