rename
authorbdemsky <bdemsky@uci.edu>
Fri, 16 Jun 2017 18:44:06 +0000 (11:44 -0700)
committerbdemsky <bdemsky@uci.edu>
Fri, 16 Jun 2017 18:44:06 +0000 (11:44 -0700)
src/Encoders/elementencoder.c [deleted file]
src/Encoders/elementencoder.h [deleted file]
src/Encoders/elementencoding.c [new file with mode: 0644]
src/Encoders/elementencoding.h [new file with mode: 0644]
src/Encoders/functionencoder.c [deleted file]
src/Encoders/functionencoder.h [deleted file]
src/Encoders/functionencoding.c [new file with mode: 0644]
src/Encoders/functionencoding.h [new file with mode: 0644]
src/classlist.h

diff --git a/src/Encoders/elementencoder.c b/src/Encoders/elementencoder.c
deleted file mode 100644 (file)
index 407a478..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "elementencoder.h"
-
-ElementEncoder * allocElementEncoder(ElementEncoderType type, Element *element) {
-       ElementEncoder * this=(ElementEncoder *)ourmalloc(sizeof(ElementEncoder));
-       this->element=element;
-       this->type=type;
-       return this;
-}
-
-void deleteElementEncoder(ElementEncoder *this) {
-       ourfree(this);
-}
diff --git a/src/Encoders/elementencoder.h b/src/Encoders/elementencoder.h
deleted file mode 100644 (file)
index d4f214f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef ELEMENTENCODER_H
-#define ELEMENTENCODER_H
-#include "classlist.h"
-
-enum ElementEncoderType {
-       ONEHOT, UNARY, BINARYINDEX, ONEHOTBINARY, BINARYVAL
-};
-
-typedef enum ElementEncoderType ElementEncoderType;
-
-struct ElementEncoder {
-       ElementEncoderType type;
-       Element * element;
-};
-
-ElementEncoder * allocElementEncoder(ElementEncoderType type, Element *element);
-void deleteElementEncoder(ElementEncoder *this);
-#endif
diff --git a/src/Encoders/elementencoding.c b/src/Encoders/elementencoding.c
new file mode 100644 (file)
index 0000000..b97fee0
--- /dev/null
@@ -0,0 +1,12 @@
+#include "elementencoding.h"
+
+ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element) {
+       ElementEncoding * this=(ElementEncoding *)ourmalloc(sizeof(ElementEncoding));
+       this->element=element;
+       this->type=type;
+       return this;
+}
+
+void deleteElementEncoding(ElementEncoding *this) {
+       ourfree(this);
+}
diff --git a/src/Encoders/elementencoding.h b/src/Encoders/elementencoding.h
new file mode 100644 (file)
index 0000000..b94632c
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef ELEMENTENCODING_H
+#define ELEMENTENCODING_H
+#include "classlist.h"
+
+enum ElementEncodingType {
+       ONEHOT, UNARY, BINARYINDEX, ONEHOTBINARY, BINARYVAL
+};
+
+typedef enum ElementEncodingType ElementEncodingType;
+
+struct ElementEncoding {
+       ElementEncodingType type;
+       Element * element;
+};
+
+ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element);
+void deleteElementEncoding(ElementEncoding *this);
+#endif
diff --git a/src/Encoders/functionencoder.c b/src/Encoders/functionencoder.c
deleted file mode 100644 (file)
index fa51fba..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "functionencoder.h"
-
-FunctionEncoder * allocFunctionEncoder(FunctionEncoderType type, Element *function) {
-       FunctionEncoder * this=(FunctionEncoder *)ourmalloc(sizeof(FunctionEncoder));
-       this->op.function=function;
-       this->type=type;
-       return this;
-}
-
-FunctionEncoder * allocPredicateEncoder(FunctionEncoderType type, Boolean *predicate) {
-       FunctionEncoder * this=(FunctionEncoder *)ourmalloc(sizeof(FunctionEncoder));
-       this->op.predicate=predicate;
-       this->type=type;
-       return this;
-}
-
-void deleteFunctionEncoder(FunctionEncoder *this) {
-       ourfree(this);
-}
diff --git a/src/Encoders/functionencoder.h b/src/Encoders/functionencoder.h
deleted file mode 100644 (file)
index 18a8f4b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef FUNCTIONENCODER_H
-#define FUNCTIONENCODER_H
-#include "classlist.h"
-
-enum FunctionEncoderType {
-       ENUMERATEIMPLICATIONS, CIRCUIT
-};
-
-typedef enum FunctionEncoderType FunctionEncoderType;
-
-union ElementPredicate {
-       Element * function;
-       Boolean * predicate;
-};
-
-typedef union ElementPredicate ElementPredicate;
-
-struct FunctionEncoder {
-       FunctionEncoderType type;
-       bool isFunction;//true for function, false for predicate
-       ElementPredicate op;
-};
-
-FunctionEncoder * allocFunctionEncoder(FunctionEncoderType type, Element *function);
-FunctionEncoder * allocPredicateEncoder(FunctionEncoderType type, Boolean *predicate);
-void deleteFunctionEncoder(FunctionEncoder *this);
-#endif
diff --git a/src/Encoders/functionencoding.c b/src/Encoders/functionencoding.c
new file mode 100644 (file)
index 0000000..887972b
--- /dev/null
@@ -0,0 +1,19 @@
+#include "functionencoding.h"
+
+FunctionEncoding * allocFunctionEncoding(FunctionEncodingType type, Element *function) {
+       FunctionEncoding * this=(FunctionEncoding *)ourmalloc(sizeof(FunctionEncoding));
+       this->op.function=function;
+       this->type=type;
+       return this;
+}
+
+FunctionEncoding * allocPredicateEncoding(FunctionEncodingType type, Boolean *predicate) {
+       FunctionEncoding * this=(FunctionEncoding *)ourmalloc(sizeof(FunctionEncoding));
+       this->op.predicate=predicate;
+       this->type=type;
+       return this;
+}
+
+void deleteFunctionEncoding(FunctionEncoding *this) {
+       ourfree(this);
+}
diff --git a/src/Encoders/functionencoding.h b/src/Encoders/functionencoding.h
new file mode 100644 (file)
index 0000000..4cd5c86
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef FUNCTIONENCODING_H
+#define FUNCTIONENCODING_H
+#include "classlist.h"
+
+enum FunctionEncodingType {
+       ENUMERATEIMPLICATIONS, CIRCUIT
+};
+
+typedef enum FunctionEncodingType FunctionEncodingType;
+
+union ElementPredicate {
+       Element * function;
+       Boolean * predicate;
+};
+
+typedef union ElementPredicate ElementPredicate;
+
+struct FunctionEncoding {
+       FunctionEncodingType type;
+       bool isFunction;//true for function, false for predicate
+       ElementPredicate op;
+};
+
+FunctionEncoding * allocFunctionEncoding(FunctionEncodingType type, Element *function);
+FunctionEncoding * allocPredicateEncoding(FunctionEncodingType type, Boolean *predicate);
+void deleteFunctionEncoding(FunctionEncoding *this);
+#endif
index 8b412ea..361dcb6 100644 (file)
@@ -48,11 +48,11 @@ typedef struct Table Table;
 struct Order;
 typedef struct Order Order;
 
-struct ElementEncoder;
-typedef struct ElementEncoder ElementEncoder;
+struct ElementEncoding;
+typedef struct ElementEncoding ElementEncoding;
 
-struct FunctionEncoder;
-typedef struct FunctionEncoder FunctionEncoder;
+struct FunctionEncoding;
+typedef struct FunctionEncoding FunctionEncoding;
 
 typedef unsigned int uint;
 typedef uint64_t VarType;