option defaultExprDepth --default-expr-depth=N int :default 0 :predicate CVC4::expr::setDefaultExprDepth :predicate-include "expr/options_handlers.h"
print exprs to depth N (0 == default, -1 == no limit)
+undocumented-alias --expr-depth = --default-expr-depth
+
option defaultDagThresh default-dag-thresh --default-dag-thresh=N int :default 1 :predicate CVC4::expr::setDefaultDagThresh :predicate-include "expr/options_handlers.h"
dagify common subexprs appearing > N times (1 == default, 0 == don't dagify)
+undocumented-alias --dag-thresh = --default-dag-thresh
+undocumented-alias --dag-threshold = --default-dag-thresh
+
option - --print-expr-types void :handler CVC4::expr::setPrintExprTypes :handler-include "expr/options_handlers.h"
print types with variables when printing exprs
}
}
+void printStatsFilterZeros(std::ostream& out, const std::string& statsString) {
+ // read each line, if a number, check zero and skip if so
+ // Stat are assumed to one-per line: "<statName>, <statValue>"
+
+ std::istringstream iss(statsString);
+ std::string statName, statValue;
+
+ std::getline(iss, statName, ',');
+
+ while( !iss.eof() ) {
+
+ std::getline(iss, statValue, '\n');
+
+ double curFloat;
+ bool isFloat = (std::istringstream(statValue) >> curFloat);
+
+ if( (isFloat && curFloat == 0) ||
+ statValue == " \"0\"" ||
+ statValue == " \"[]\"") {
+ // skip
+ } else {
+ out << statName << "," << statValue << std::endl;
+ }
+
+ std::getline(iss, statName, ',');
+ }
+
+}
+
int runCvc4(int argc, char* argv[], Options& opts) {
// Timer statistic
// Set the global executor pointer to NULL first. If we get a
// signal while dumping statistics, we don't want to try again.
if(opts[options::statistics]) {
- pExecutor->flushStatistics(*opts[options::err]);
+ if(opts[options::statsHideZeros] == false) {
+ pExecutor->flushStatistics(*opts[options::err]);
+ } else {
+ std::ostringstream ossStats;
+ pExecutor->flushStatistics(ossStats);
+ printStatsFilterZeros(*opts[options::err], ossStats.str());
+ }
}
// make sure to flush replay output log before early-exit
in incremental mode, print stats after every satisfiability or validity query
undocumented-alias --statistics-every-query = --stats-every-query
undocumented-alias --no-statistics-every-query = --no-stats-every-query
+option statsHideZeros --stats-hide-zeros/--stats-show-zeros bool :default false
+ hide statistics which are zero
+/show statistics even when they are zero (default)
+undocumented-alias --hide-zero-stats = --stats-hide-zeros
+undocumented-alias --show-zero-stats = --stats-show-zeros
option parseOnly parse-only --parse-only bool :read-write
exit after parsing input