Building the OrderGraph ...
[satune.git] / src / Encoders / ordergraphbuilder.c
1
2 #include "ordergraphbuilder.h"
3 #include "structs.h"
4 #include "csolver.h"
5 #include "boolean.h"
6 #include "ordergraph.h"
7
8
9 void buildOrderGraph(CSolver* This){
10         uint size = getSizeVectorBoolean(This->constraints);
11         OrderGraph* orderGraph = allocOrderGraph();
12         for(uint i=0; i<size; i++){
13                 Boolean* constraint = getVectorBoolean(This->constraints, i);
14                 if(GETBOOLEANTYPE(constraint) == ORDERCONST){
15                         addOrderConstraintToOrderGraph(orderGraph, constraint);
16                 }
17         }
18         //TODO: We should add the orderGraph to our encoder
19         deleteOrderGraph(orderGraph);
20 }
21