From: bdemsky Date: Tue, 20 Jun 2017 20:38:33 +0000 (-0700) Subject: Fix tabbing X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=commitdiff_plain;h=487b405f45bfc928a981a2b3613c08f26cf4a9e5 Fix tabbing --- diff --git a/src/AST/boolean.h b/src/AST/boolean.h index 3ec27e8..15ebd52 100644 --- a/src/AST/boolean.h +++ b/src/AST/boolean.h @@ -5,9 +5,9 @@ #include "ops.h" #include "structs.h" -/** - This is a little sketchy, but apparently legit. - https://www.python.org/dev/peps/pep-3123/ */ +/** + This is a little sketchy, but apparently legit. + https://www.python.org/dev/peps/pep-3123/ */ #define GETBOOLEANTYPE(o) (((Boolean *)(o))->btype) @@ -35,10 +35,10 @@ struct BooleanLogic { Boolean * right; }; -struct BooleanPredicate{ - Boolean base; - Predicate * predicate; - VectorElement* inputs; +struct BooleanPredicate { + Boolean base; + Predicate * predicate; + VectorElement* inputs; }; Boolean * allocBoolean(VarType t); @@ -51,7 +51,7 @@ Boolean * allocBooleanLogic(LogicOp op, Boolean * left, Boolean* right); * @param op * @param array * @param asize - * @return + * @return */ Boolean * allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean ** array, uint asize); void deleteBoolean(Boolean * This); diff --git a/src/AST/element.h b/src/AST/element.h index 986e380..da9b994 100644 --- a/src/AST/element.h +++ b/src/AST/element.h @@ -9,20 +9,20 @@ //FIXME:TALK ABOUT ELEMENT struct Element { - ElementType type; + ElementType type; }; struct ElementSet { - Element base; - Set * set; - ElementEncoding * encoding; + Element base; + Set * set; + ElementEncoding * encoding; }; -struct ElementFunction{ - Element base; - Function * function; - VectorElement* Elements; - Boolean * overflowstatus; +struct ElementFunction { + Element base; + Function * function; + VectorElement* Elements; + Boolean * overflowstatus; }; Element * allocElementSet(Set *s); diff --git a/src/AST/function.h b/src/AST/function.h index c04d6f2..50a59ec 100644 --- a/src/AST/function.h +++ b/src/AST/function.h @@ -7,8 +7,8 @@ #define GETFUNCTIONTYPE(o) (((Function*)o)->type) -struct Function{ - FunctionType type; +struct Function { + FunctionType type; }; struct FunctionOperator { @@ -20,7 +20,7 @@ struct FunctionOperator { OverFlowBehavior overflowbehavior; }; -struct FunctionTable{ +struct FunctionTable { Function base; Table* table; }; diff --git a/src/AST/tableentry.h b/src/AST/tableentry.h index 44ec39b..63c6fde 100644 --- a/src/AST/tableentry.h +++ b/src/AST/tableentry.h @@ -4,7 +4,7 @@ * and open the template in the editor. */ -/* +/* * File: tableentry.h * Author: hamed * @@ -16,13 +16,13 @@ #include "classlist.h" #include "mymemory.h" -struct TableEntry{ - uint64_t output; - uint64_t inputs[]; +struct TableEntry { + uint64_t output; + uint64_t inputs[]; }; TableEntry* allocTableEntry(uint64_t* inputs, uint inputSize, uint64_t result); void deleteTableEntry(TableEntry* tableEntry); -#endif /* TABLEENTRY_H */ +#endif/* TABLEENTRY_H */ diff --git a/src/Collections/vector.h b/src/Collections/vector.h index a6da986..c069e94 100644 --- a/src/Collections/vector.h +++ b/src/Collections/vector.h @@ -15,9 +15,9 @@ void pushVector ## name(Vector ## name *vector, type item); \ type getVector ## name(Vector ## name *vector, uint index); \ void setVector ## name(Vector ## name *vector, uint index, type item); \ - uint getSizeVector ## name(Vector ## name *vector); \ - void deleteVector ## name(Vector ## name *vector); \ - void clearVector ## name(Vector ## name *vector); \ + uint getSizeVector ## name(Vector ## name *vector); \ + void deleteVector ## name(Vector ## name *vector); \ + void clearVector ## name(Vector ## name *vector); \ type * exposeArray ## name(Vector ## name * vector); #define VectorImpl(name, type, defcap) \ @@ -58,8 +58,8 @@ } \ void clearVector ## name(Vector ## name *vector) { \ vector->size=0; \ - } \ - type * exposeArray ## name(Vector ## name * vector) { \ - return vector->array; \ + } \ + type * exposeArray ## name(Vector ## name * vector) { \ + return vector->array; \ } #endif diff --git a/src/Encoders/elementencoding.h b/src/Encoders/elementencoding.h index 8d142da..bc173ea 100644 --- a/src/Encoders/elementencoding.h +++ b/src/Encoders/elementencoding.h @@ -11,10 +11,10 @@ typedef enum ElementEncodingType ElementEncodingType; struct ElementEncoding { ElementEncodingType type; Element * element; - Constraint ** variables; /* List Variables Used To Encode Element */ - uint64_t * encodingArray; /* List the Variables in the appropriate order */ - uint64_t * inUseArray; /* Bitmap to track variables in use */ - uint numVars; /* Number of variables */ + Constraint ** variables;/* List Variables Used To Encode Element */ + uint64_t * encodingArray; /* List the Variables in the appropriate order */ + uint64_t * inUseArray;/* Bitmap to track variables in use */ + uint numVars; /* Number of variables */ }; ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element); diff --git a/src/csolver.c b/src/csolver.c index 4c20e33..5f330fd 100644 --- a/src/csolver.c +++ b/src/csolver.c @@ -49,7 +49,7 @@ void deleteSolver(CSolver *This) { deleteTable(getVectorTable(This->allTables, i)); } deleteVectorTable(This->allTables); - + size=getSizeVectorPredicate(This->allPredicates); for(uint i=0;iallPredicates, i)); @@ -61,7 +61,7 @@ void deleteSolver(CSolver *This) { deleteOrder(getVectorOrder(This->allOrders, i)); } deleteVectorOrder(This->allOrders); - + size=getSizeVectorFunction(This->allFunctions); for(uint i=0;iallFunctions, i)); @@ -111,9 +111,9 @@ Boolean * getBooleanVar(CSolver *solver, VarType type) { } Function * createFunctionOperator(CSolver *solver, ArithOp op, Set ** domain, uint numDomain, Set * range,OverFlowBehavior overflowbehavior) { - Function* function = allocFunctionOperator(op, domain, numDomain, range, overflowbehavior); - pushVectorFunction(solver->allFunctions, function); - return function; + Function* function = allocFunctionOperator(op, domain, numDomain, range, overflowbehavior); + pushVectorFunction(solver->allFunctions, function); + return function; } Predicate * createPredicateOperator(CSolver *solver, CompOp op, Set ** domain, uint numDomain) { @@ -129,29 +129,29 @@ Table * createTable(CSolver *solver, Set **domains, uint numDomain, Set * range) } void addTableEntry(CSolver *solver, Table* table, uint64_t* inputs, uint inputSize, uint64_t result) { - addNewTableEntry(table,inputs, inputSize,result); + addNewTableEntry(table,inputs, inputSize,result); } Function * completeTable(CSolver *solver, Table * table) { - Function* function = allocFunctionTable(table); - pushVectorFunction(solver->allFunctions,function); - return function; + Function* function = allocFunctionTable(table); + pushVectorFunction(solver->allFunctions,function); + return function; } Element * applyFunction(CSolver *solver, Function * function, Element ** array, uint numArrays, Boolean * overflowstatus) { - Element* element= allocElementFunction(function,array,numArrays,overflowstatus); - pushVectorElement(solver->allElements, element); - return element; + Element* element= allocElementFunction(function,array,numArrays,overflowstatus); + pushVectorElement(solver->allElements, element); + return element; } Boolean * applyPredicate(CSolver *solver, Predicate * predicate, Element ** inputs, uint numInputs) { - Boolean* boolean= allocBooleanPredicate(predicate, inputs, numInputs); - pushVectorBoolean(solver->allBooleans, boolean); - return boolean; + Boolean* boolean= allocBooleanPredicate(predicate, inputs, numInputs); + pushVectorBoolean(solver->allBooleans, boolean); + return boolean; } Boolean * applyLogicalOperation(CSolver *solver, LogicOp op, Boolean ** array, uint asize) { - return allocBooleanLogicArray(solver, op, array, asize); + return allocBooleanLogicArray(solver, op, array, asize); } void addBoolean(CSolver *This, Boolean * constraint) { diff --git a/src/csolver.h b/src/csolver.h index ace6e78..95809dd 100644 --- a/src/csolver.h +++ b/src/csolver.h @@ -16,16 +16,16 @@ struct CSolver { /** This is a vector of all element structs that we have allocated. */ VectorElement * allElements; - + /** This is a vector of all predicate structs that we have allocated. */ VectorPredicate * allPredicates; - + /** This is a vector of all table structs that we have allocated. */ VectorTable * allTables; - + /** This is a vector of all order structs that we have allocated. */ VectorOrder * allOrders; - + /** This is a vector of all function structs that we have allocated. */ VectorFunction* allFunctions; };