Improve debbuging for lifted knowledge compilation

This commit is contained in:
Tiago Gomes 2012-11-26 14:46:45 +00:00
parent 1f1d194326
commit 610e55a4a2
2 changed files with 18 additions and 19 deletions

View File

@ -170,13 +170,12 @@ LiftedCircuit::LiftedCircuit (const LiftedWCNF* lwcnf)
root_ = 0; root_ = 0;
Clauses clauses = lwcnf->clauses(); Clauses clauses = lwcnf->clauses();
compile (&root_, clauses); compile (&root_, clauses);
exportToGraphViz("circuit.dot"); if (Globals::verbosity > 1) {
smoothCircuit (root_); smoothCircuit (root_);
exportToGraphViz("circuit.smooth.dot"); exportToGraphViz("circuit.smooth.dot");
cout << "--------------------------------------------------" << endl; double wmc = LogAware::exp (getWeightedModelCount());
cout << "--------------------------------------------------" << endl; cout << "WEIGHTED MODEL COUNT: " << wmc << endl << endl;
double wmc = LogAware::exp (getWeightedModelCount()); }
cout << "WEIGHTED MODEL COUNT = " << wmc << endl;
} }

View File

@ -388,18 +388,18 @@ LiftedWCNF::LiftedWCNF (const ParfactorList& pfList)
addWeight (1, LogAware::log(2.0), LogAware::log(5.0)); addWeight (1, LogAware::log(2.0), LogAware::log(5.0));
freeLiteralId_ = 2; freeLiteralId_ = 2;
*/ */
cout << "FORMULA INDICATORS:" << endl; if (Globals::verbosity > 1) {
printFormulaIndicators(); cout << "FORMULA INDICATORS:" << endl;
cout << endl; printFormulaIndicators();
cout << endl;
cout << "WEIGHTS:" << endl; cout << "WEIGHTED INDICATORS:" << endl;
printWeights(); printWeights();
cout << endl; cout << endl;
cout << "CLAUSES:" << endl;
cout << "CLAUSES:" << endl; printClauses();
printClauses(); cout << endl;
cout << endl; }
} }