Fix tabbing
authorbdemsky <bdemsky@uci.edu>
Tue, 20 Jun 2017 20:38:33 +0000 (13:38 -0700)
committerbdemsky <bdemsky@uci.edu>
Tue, 20 Jun 2017 20:38:33 +0000 (13:38 -0700)
src/AST/boolean.h
src/AST/element.h
src/AST/function.h
src/AST/tableentry.h
src/Collections/vector.h
src/Encoders/elementencoding.h
src/csolver.c
src/csolver.h

index 3ec27e81f6a42ade900850d365f02abe2bdc8909..15ebd52b9a3532ff0a13c5e6ca1465f8fdc87dcb 100644 (file)
@@ -5,9 +5,9 @@
 #include "ops.h"
 #include "structs.h"
 
 #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)
 
 
 #define GETBOOLEANTYPE(o) (((Boolean *)(o))->btype)
 
@@ -35,10 +35,10 @@ struct BooleanLogic {
        Boolean * right;
 };
 
        Boolean * right;
 };
 
-struct BooleanPredicate{
-    Boolean base;
-    Predicate * predicate;
-    VectorElement* inputs;
+struct BooleanPredicate {
+       Boolean base;
+       Predicate * predicate;
+       VectorElement* inputs;
 };
 
 Boolean * allocBoolean(VarType t);
 };
 
 Boolean * allocBoolean(VarType t);
@@ -51,7 +51,7 @@ Boolean * allocBooleanLogic(LogicOp op, Boolean * left, Boolean* right);
  * @param op
  * @param array
  * @param asize
  * @param op
  * @param array
  * @param asize
- * @return 
+ * @return
  */
 Boolean * allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean ** array, uint asize);
 void deleteBoolean(Boolean * This);
  */
 Boolean * allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean ** array, uint asize);
 void deleteBoolean(Boolean * This);
index 986e380e0f03c9eb83ae1f299d4e3b95dc8abbcd..da9b994e7df39219659b087c2631d9d7ff39c99b 100644 (file)
@@ -9,20 +9,20 @@
 
 //FIXME:TALK ABOUT ELEMENT
 struct Element {
 
 //FIXME:TALK ABOUT ELEMENT
 struct Element {
-       ElementType type;
+       ElementType type;
 };
 
 struct ElementSet {
 };
 
 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);
 };
 
 Element * allocElementSet(Set *s);
index c04d6f2304ce2c32b5c78b916ae04486d052bb8b..50a59ec081c504b849fa1ce0349c0e6e9f35c36b 100644 (file)
@@ -7,8 +7,8 @@
 
 #define GETFUNCTIONTYPE(o) (((Function*)o)->type)
 
 
 #define GETFUNCTIONTYPE(o) (((Function*)o)->type)
 
-struct Function{
-    FunctionType type;
+struct Function {
+       FunctionType type;
 };
 
 struct FunctionOperator {
 };
 
 struct FunctionOperator {
@@ -20,7 +20,7 @@ struct FunctionOperator {
        OverFlowBehavior overflowbehavior;
 };
 
        OverFlowBehavior overflowbehavior;
 };
 
-struct FunctionTable{
+struct FunctionTable {
        Function base;
        Table* table;
 };
        Function base;
        Table* table;
 };
index 44ec39ba826f473b9f6d1fb1ce2bb6fe236fd91f..63c6fdefbde96707d617eb161b82e19546179565 100644 (file)
@@ -4,7 +4,7 @@
  * and open the template in the editor.
  */
 
  * and open the template in the editor.
  */
 
-/* 
+/*
  * File:   tableentry.h
  * Author: hamed
  *
  * File:   tableentry.h
  * Author: hamed
  *
 
 #include "classlist.h"
 #include "mymemory.h"
 
 #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);
 
 };
 
 TableEntry* allocTableEntry(uint64_t* inputs, uint inputSize, uint64_t result);
 void deleteTableEntry(TableEntry* tableEntry);
 
-#endif /* TABLEENTRY_H */
+#endif/* TABLEENTRY_H */
 
 
index a6da986ef854ed4fb459bf8ed2260b5fa8ead8f9..c069e9460da533ef03c773c2de7b2b87a4ba3d02 100644 (file)
@@ -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); \
        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)                                  \
        type * exposeArray ## name(Vector ## name * vector);
 
 #define VectorImpl(name, type, defcap)                                  \
@@ -58,8 +58,8 @@
        }                                                                     \
        void clearVector ## name(Vector ## name *vector) {                     \
                vector->size=0;                                                     \
        }                                                                     \
        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
        }
 #endif
index 8d142dab13ecd5b2f7d8345220166f3c3f39e333..bc173eaaaeb44d3b22e2b424d91f741bcad44a87 100644 (file)
@@ -11,10 +11,10 @@ typedef enum ElementEncodingType ElementEncodingType;
 struct ElementEncoding {
        ElementEncodingType type;
        Element * element;
 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);
 };
 
 ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element);
index 4c20e33538c658d6ca17b92d98370ee0492f5f32..5f330fd6112c70074522c17ac116739bf35746d6 100644 (file)
@@ -49,7 +49,7 @@ void deleteSolver(CSolver *This) {
                deleteTable(getVectorTable(This->allTables, i));
        }
        deleteVectorTable(This->allTables);
                deleteTable(getVectorTable(This->allTables, i));
        }
        deleteVectorTable(This->allTables);
-       
+
        size=getSizeVectorPredicate(This->allPredicates);
        for(uint i=0;i<size;i++) {
                deletePredicate(getVectorPredicate(This->allPredicates, i));
        size=getSizeVectorPredicate(This->allPredicates);
        for(uint i=0;i<size;i++) {
                deletePredicate(getVectorPredicate(This->allPredicates, i));
@@ -61,7 +61,7 @@ void deleteSolver(CSolver *This) {
                deleteOrder(getVectorOrder(This->allOrders, i));
        }
        deleteVectorOrder(This->allOrders);
                deleteOrder(getVectorOrder(This->allOrders, i));
        }
        deleteVectorOrder(This->allOrders);
-       
+
        size=getSizeVectorFunction(This->allFunctions);
        for(uint i=0;i<size;i++) {
                deleteFunction(getVectorFunction(This->allFunctions, i));
        size=getSizeVectorFunction(This->allFunctions);
        for(uint i=0;i<size;i++) {
                deleteFunction(getVectorFunction(This->allFunctions, 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 * 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) {
 }
 
 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) {
 }
 
 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 * 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 * 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 * 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) {
 }
 
 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) {
 }
 
 void addBoolean(CSolver *This, Boolean * constraint) {
index ace6e78fb514f1d5803277d1df3f97b0a73a1163..95809dda5b7bb5db420feee6ce23824313b8592f 100644 (file)
@@ -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 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 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 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 order structs that we have allocated. */
        VectorOrder * allOrders;
-       
+
        /** This is a vector of all function structs that we have allocated. */
        VectorFunction* allFunctions;
 };
        /** This is a vector of all function structs that we have allocated. */
        VectorFunction* allFunctions;
 };