From f9731697cf083436d8b422c83704260106457ca8 Mon Sep 17 00:00:00 2001 From: Hamed Date: Wed, 28 Jun 2017 18:20:47 -0700 Subject: [PATCH] Pushing my own branch, do some cleanings ... --- src/Encoders/elementencoding.h | 5 ++--- src/Encoders/naiveencoder.c | 14 +++----------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/Encoders/elementencoding.h b/src/Encoders/elementencoding.h index 15025cb..1528245 100644 --- a/src/Encoders/elementencoding.h +++ b/src/Encoders/elementencoding.h @@ -22,11 +22,10 @@ struct ElementEncoding { void initElementEncoding(ElementEncoding *This, Element *element); void setElementEncodingType(ElementEncoding* This, ElementEncodingType type); void deleteElementEncoding(ElementEncoding *This); -void baseBinaryIndexElementAssign(ElementEncoding *This); void allocEncodingArrayElement(ElementEncoding *This, uint size); void allocInUseArrayElement(ElementEncoding *This, uint size); -//FIXME: -//uint addNewVariableToEncodingArray(ElementEncoding* This, uint64_t); +//FIXME +//uint addNewVariableToEncodingArray(ElementEncoding* This, uint64_t var); static inline bool isinUseElement(ElementEncoding *This, uint offset) { return (This->inUseArray[(offset>>6)] >> (offset & 63)) &0x1; } diff --git a/src/Encoders/naiveencoder.c b/src/Encoders/naiveencoder.c index 17d1946..5b38732 100644 --- a/src/Encoders/naiveencoder.c +++ b/src/Encoders/naiveencoder.c @@ -21,17 +21,9 @@ void naiveEncodingDecision(CSolver* csolver){ //Whether it's a ElementFunction or ElementSet we should do the followings: setElementEncodingType(getElementEncoding(element), BINARYINDEX); baseBinaryIndexElementAssign(getElementEncoding(element)); - switch(GETELEMENTTYPE(element)){ - case ELEMSET: - //FIXME: Move next line to satEncoderInitializer! -// generateElementEncodingVariables(encoder,getElementEncoding(element)); - break; - case ELEMFUNCRETURN: - setFunctionEncodingType(getElementFunctionEncoding((ElementFunction*)element), - ENUMERATEIMPLICATIONS); - break; - default: - ASSERT(0); + if(GETELEMENTTYPE(element) == ELEMFUNCRETURN){ + setFunctionEncodingType(getElementFunctionEncoding((ElementFunction*)element), + ENUMERATEIMPLICATIONS); } } -- 2.34.1