~Transformer();
IntegerEncodingTransform* getIntegerEncodingTransform(){ return integerEncoding; }
void orderAnalysis();
-private:
+ CMEMALLOC;
+ private:
//For now we can just add transforms here, but in future we may want take a smarter approach.
IntegerEncodingTransform* integerEncoding;
DecomposeOrderTransform* decomposeOrder;
Boolean *b=array[i];
if (b->type == BOOLCONST) {
if (b->isTrue())
- return b;
+ return boolTrue;
else
continue;
} else
newarray[newindex++]=b;
}
- if (newindex==1)
+ if (newindex==0) {
+ return boolFalse;
+ } else if (newindex==1)
return newarray[0];
else if (newindex == 2) {
bool isNot0 = (newarray[0]->type==BOOLCONST) && ((BooleanLogic *)newarray[0])->op == SATC_NOT;
if (b->isTrue())
continue;
else
- return b;
+ return boolFalse;
} else
newarray[newindex++]=b;
}
- if(newindex==1) {
+ if (newindex==0) {
+ return boolTrue;
+ } else if(newindex==1) {
return newarray[0];
} else {
array = newarray;
}
}
+ ASSERT(asize != 0);
Boolean *boolean = new BooleanLogic(this, op, array, asize);
Boolean *b = boolMap.get(boolean);
if (b == NULL) {
void * ourcalloc(size_t count, size_t size);
void * ourrealloc(void *ptr, size_t size);
*/
+void * model_malloc(size_t size);
+void model_free(void *ptr);
+void * model_calloc(size_t count, size_t size);
+void * model_realloc(void *ptr, size_t size);
+
+#define ourmalloc model_malloc
+#define ourfree model_free
+#define ourrealloc model_realloc
+#define ourcalloc model_calloc
+/*
static inline void *ourmalloc(size_t size) { return malloc(size); }
static inline void ourfree(void *ptr) { free(ptr); }
static inline void *ourcalloc(size_t count, size_t size) { return calloc(count, size); }
-static inline void *ourrealloc(void *ptr, size_t size) { return realloc(ptr, size); }
+static inline void *ourrealloc(void *ptr, size_t size) { return realloc(ptr, size); }*/
#define CMEMALLOC \
void *operator new(size_t size) { \