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 1159c96aa11a37202a54f6cb49c2bdbfa280bf65..ce399c3dad0558df114fe9188003be550f30124f 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 45117e1dccf6abc9f05958eea6d12badd79610a1..df29cfecc00e69d3a22ba7a4038e2b478a5e14f3 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 6cbf94cef1cb6d9a75d3ce3bc4da737659c00110..91d19dba19fe6830d63334f2630ca594a08dde4d 100644 (file)
@@ -5,6 +5,7 @@
 
 struct Element {
        Set * set;
+       ElementEncoding * encoding;
 };
 
 Element * allocElement(Set *s);
index 459f0b55d3b3c8ee1c2195b7ef173f048d27cac0..65a4b29fe3607bc75774808ac65ce4e990b06685 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 fb2ce4aa4ea2536843c6812bd25283d309223926..08385db6921096a5bb6b3fcd3c010ae4f3360c7b 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 282912d2d09e6df861fbea1e5468921babcfd589..c9c0e199d52bccb4cc5283e967d48742a08146fc 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 d232592fef332c3d58cbe6670569f3e03ce0cfe0..6335297f5088143c38dbbfd1ea5bb5add7318683 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;