mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 08:23:17 +00:00
add a basic printer into graphviz (http://graphviz.org/) for proofs
- proofs are output into file `proof.dot` if `(get-proof-graph)` is in the input - use `dot -Txlib proof.dot` to see the proof - use `dot -Tsvg proof.dot` to get a svg file
This commit is contained in:
parent
7f254710aa
commit
d630838b38
4 changed files with 172 additions and 0 deletions
24
src/ast/ast_pp_dot.h
Normal file
24
src/ast/ast_pp_dot.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*++
|
||||
|
||||
Abstract: Pretty-printer for proofs in Graphviz format
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include "ast_pp.h"
|
||||
|
||||
class ast_pp_dot {
|
||||
ast_manager & m_manager;
|
||||
proof * const m_pr;
|
||||
|
||||
public:
|
||||
ast_pp_dot(proof *pr, ast_manager &m) : m_manager(m), m_pr(pr) {}
|
||||
ast_pp_dot(proof_ref &e) : m_manager(e.m()), m_pr(e.get()) {}
|
||||
|
||||
std::ostream & pp(std::ostream & out) const;
|
||||
ast_manager & get_manager() const { return m_manager; }
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const ast_pp_dot & p);
|
Loading…
Add table
Add a link
Reference in a new issue