summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
authormakaimann <makaim@stanford.edu>2019-12-16 01:58:24 -0800
committerAndres Noetzli <andres.noetzli@gmail.com>2019-12-16 01:58:24 -0800
commitc1c8b61a03732cb485e358bc0f78e654242d58de (patch)
treec7943638645ed74976c1e5aa0fe7ddad59d57c0f /src/theory/theory_engine.cpp
parent0e5efa8c4ff22925d3fc011a3588a3e67c107d0e (diff)
Trace tags for dumping the decision tree in org-mode format (#2871)
This would add tracing options to print the decision tree in [org-mode](https://orgmode.org/) format which can be viewed with emacs or [vim-orgmode](https://github.com/jceb/vim-orgmode). In the raw format, the number of asterisks denote the decision level of a decision, and within a propagation node, the number of spaces denote the level. Most viewers render the asterisks as indented bullets. There are some options for controlling verbosity: `dtview` - prints the decisions (basic option) `dtview::command` - also prints smt-lib commands as they're issued `dtview::conflict` - also prints conflicts `dtview::prop` - also prints propagations Example usage: `cvc4 -t dtview -t dtview::command -t dtview::conflict -t dtview::prop <example smt2 file> &> example-trace.org` The resulting file when opened with an org-mode viewer has collapsible nodes, where "..." marks a node with children.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 7a72367de..0a70ddab4 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -259,6 +259,7 @@ void TheoryEngine::EngineOutputChannel::conflict(TNode conflictNode,
Trace("theory::conflict")
<< "EngineOutputChannel<" << d_theory << ">::conflict(" << conflictNode
<< ")" << std::endl;
+ Trace("dtview::conflict") << ":CONFLICT: " << conflictNode << std::endl;
Assert(!proof); // Theory shouldn't be producing proofs yet
++d_statistics.conflicts;
d_engine->d_outputChannelUsed = true;
@@ -1399,6 +1400,9 @@ void TheoryEngine::assertFact(TNode literal)
return;
}
+ Trace("dtview::prop") << std::string(d_context->getLevel(), ' ') << literal
+ << endl;
+
// Get the atom
bool polarity = literal.getKind() != kind::NOT;
TNode atom = polarity ? literal : literal[0];
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback