From 3abc4365ea744c8b2327aa5fdee3878867711ce1 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 16 Jun 2017 11:44:06 -0700 Subject: [PATCH] rename --- src/Encoders/elementencoder.c | 12 ------------ src/Encoders/elementencoder.h | 18 ------------------ src/Encoders/elementencoding.c | 12 ++++++++++++ src/Encoders/elementencoding.h | 18 ++++++++++++++++++ src/Encoders/functionencoder.c | 19 ------------------- src/Encoders/functionencoder.h | 27 --------------------------- src/Encoders/functionencoding.c | 19 +++++++++++++++++++ src/Encoders/functionencoding.h | 27 +++++++++++++++++++++++++++ src/classlist.h | 8 ++++---- 9 files changed, 80 insertions(+), 80 deletions(-) delete mode 100644 src/Encoders/elementencoder.c delete mode 100644 src/Encoders/elementencoder.h create mode 100644 src/Encoders/elementencoding.c create mode 100644 src/Encoders/elementencoding.h delete mode 100644 src/Encoders/functionencoder.c delete mode 100644 src/Encoders/functionencoder.h create mode 100644 src/Encoders/functionencoding.c create mode 100644 src/Encoders/functionencoding.h diff --git a/src/Encoders/elementencoder.c b/src/Encoders/elementencoder.c deleted file mode 100644 index 407a478..0000000 --- a/src/Encoders/elementencoder.c +++ /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 index d4f214f..0000000 --- a/src/Encoders/elementencoder.h +++ /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 index 0000000..b97fee0 --- /dev/null +++ b/src/Encoders/elementencoding.c @@ -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 index 0000000..b94632c --- /dev/null +++ b/src/Encoders/elementencoding.h @@ -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 index fa51fba..0000000 --- a/src/Encoders/functionencoder.c +++ /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 index 18a8f4b..0000000 --- a/src/Encoders/functionencoder.h +++ /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 index 0000000..887972b --- /dev/null +++ b/src/Encoders/functionencoding.c @@ -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 index 0000000..4cd5c86 --- /dev/null +++ b/src/Encoders/functionencoding.h @@ -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 diff --git a/src/classlist.h b/src/classlist.h index 8b412ea..361dcb6 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -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; -- 2.34.1