GETPREDICATETYPE(predicate) = TABLEPRED;
predicate->table=table;
predicate->undefinedbehavior=undefBehavior;
- return predicate;
+ return &predicate->base;
}
void deletePredicate(Predicate* predicate){
uint size= getSizeVectorBoolean(orderConstrs);
for(uint i=0; i<size; i++){
ASSERT(GETBOOLEANTYPE( getVectorBoolean(orderConstrs, i)) == ORDERCONST );
- BooleanOrder* tmp = (BooleanPredicate*)getVectorBoolean(orderConstrs, i);
+ BooleanOrder* tmp = (BooleanOrder*)getVectorBoolean(orderConstrs, i);
BooleanOrder* newBool;
- Constraint* first, second;
+ Constraint *first, *second;
if(tmp->second==boolOrder->first){
newBool = (BooleanOrder*)allocBooleanOrder(tmp->order,tmp->first,boolOrder->second);
first = encodeTotalOrderSATEncoder(This, tmp);
#include "structs.h"
#include "mymemory.h"
+#include "boolean.h"
VectorImpl(Table, Table *, 4);
VectorImpl(Set, Set *, 4);
VectorImpl(ASTNode, ASTNode *, 4);
VectorImpl(Int, uint64_t, 4);
+unsigned int BooleanOrder_hash_Function(BooleanOrder* This){
+ return ((This->first+This->second)*(This->first+This->second+1))/2 + This->second;
+}
+
+unsigned int BooleanOrder_equals(BooleanOrder* key1, BooleanOrder* key2){
+ return key1->first== key2->first && key1->second == key2->second;
+}
+
HashTableImpl(BoolConst, BooleanOrder *, Constraint *, BooleanOrder_hash_Function, BooleanOrder_equals);
return key1 == key2;
}
-inline unsigned int BooleanOrder_hash_Function(BooleanOrder* This){
- return ((This->first+This->second)(This->first+This->second+1))/2 + This->second;
-}
-
-inline unsigned int BooleanOrder_equals(BooleanOrder* key1, BooleanOrder* key2){
- return key1->first== key2->first && key1->second == key2->second;
-}
+unsigned int BooleanOrder_hash_Function(BooleanOrder* This);
+unsigned int BooleanOrder_equals(BooleanOrder* key1, BooleanOrder* key2);
HashTableDef(Void, void *, void *, Ptr_hash_function, Ptr_equals);
HashTableDef(BoolConst, BooleanOrder *, Constraint *, BooleanOrder_hash_Function, BooleanOrder_equals);