From: Hamed Date: Tue, 20 Jun 2017 18:12:02 +0000 (-0700) Subject: Commit after resolving conflicts X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fa74d0b740b20fa40af55404c5bb99570a8b40ca;p=satune.git Commit after resolving conflicts --- fa74d0b740b20fa40af55404c5bb99570a8b40ca diff --cc src/AST/element.c index 903256d,df29cfe..3746d25 --- a/src/AST/element.c +++ b/src/AST/element.c @@@ -1,22 -1,12 +1,23 @@@ #include "element.h" - +#include "structs.h" - - Element *allocElementSet(Set * s) { - ElementSet * tmp=(ElementSet *)ourmalloc(sizeof(ElementSet)); ++//FIXME: ELEMENTSET? + Element *allocElement(Set * s) { + Element * tmp=(Element *)ourmalloc(sizeof(Element)); + GETELEMENTTYPE(tmp)= ELEMSET; tmp->set=s; - return &tmp->base; + tmp->encoding=NULL; + return tmp; } +Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus){ + ElementFunction* ef = (ElementFunction*) ourmalloc(sizeof(ElementFunction)); + GETELEMENTTYPE(ef)= ELEMFUNCRETURN; + ef->function=function; + ef->overflowstatus = overflowstatus; + ef->Elements = allocVectorArrayElement(numArrays, array); + return &ef->base; +} + void deleteElement(Element *This) { ourfree(This); } diff --cc src/AST/element.h index 4119b7d,91d19db..0a23d88 --- a/src/AST/element.h +++ b/src/AST/element.h @@@ -2,28 -2,12 +2,31 @@@ #define ELEMENT_H #include "classlist.h" #include "mymemory.h" +#include "ops.h" +#include "structs.h" +#define GETELEMENTTYPE(o) (((Element*)o)->type) + ++//FIXME:TALK ABOUT ELEMENT struct Element { - ElementType type; ++ ElementType type; + Set * set; + ElementEncoding * encoding; }; +struct ElementSet { + Element base; + Set * set; +}; + +struct ElementFunction{ + Element base; + Function * function; + VectorElement* Elements; + Boolean * overflowstatus; +}; + - Element * allocElementSet(Set *s); + Element * allocElement(Set *s); +Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus); void deleteElement(Element *This); #endif diff --cc src/classlist.h index 14f43f8,237d529..3306ffe --- a/src/classlist.h +++ b/src/classlist.h @@@ -36,12 -38,8 +39,11 @@@ typedef struct IncrementalSolver Increm struct Set; typedef struct Set Set; - typedef struct Set MutableSet; +typedef struct ElementFunction ElementFunction; +typedef struct ElementSet ElementSet; + struct Element; typedef struct Element Element;