5 #include "ordergraph.h"
9 #include "mutableset.h"
12 #include "orderanalysis.h"
14 #include "transform.h"
16 #include "integerencoding.h"
17 #include "decomposeordertransform.h"
19 void orderAnalysis(CSolver *This) {
20 Vector<Order *> *orders = This->getOrders();
21 uint size = orders->getSize();
22 for (uint i = 0; i < size; i++) {
23 Order *order = orders->get(i);
24 DecomposeOrderTransform* decompose = new DecomposeOrderTransform(This, order);
25 if (!decompose->canExecuteTransform()){
30 OrderGraph *graph = buildOrderGraph(order);
31 if (order->type == PARTIAL) {
32 //Required to do SCC analysis for partial order graphs. It
33 //makes sure we don't incorrectly optimize graphs with negative
35 completePartialOrderGraph(graph);
39 bool mustReachGlobal = GETVARTUNABLE(This->getTuner(), order->type, MUSTREACHGLOBAL, &onoff);
42 reachMustAnalysis(This, graph, false);
44 bool mustReachLocal = GETVARTUNABLE(This->getTuner(), order->type, MUSTREACHLOCAL, &onoff);
47 //This pair of analysis is also optional
48 if (order->type == PARTIAL) {
49 localMustAnalysisPartial(This, graph);
51 localMustAnalysisTotal(This, graph);
55 bool mustReachPrune = GETVARTUNABLE(This->getTuner(), order->type, MUSTREACHPRUNE, &onoff);
58 removeMustBeTrueNodes(This, graph);
60 //This is needed for splitorder
61 computeStronglyConnectedComponentGraph(graph);
62 decompose->setOrderGraph(graph);
63 decompose->doTransform();
68 IntegerEncodingTransform* integerEncoding = new IntegerEncodingTransform(This, order);
69 if(!integerEncoding->canExecuteTransform()){
70 delete integerEncoding;
73 integerEncoding->doTransform();
74 delete integerEncoding;*/