diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-04-15 17:09:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 17:09:40 -0500 |
commit | 912b65006615fe4074cde54b080f48e3d6c12042 (patch) | |
tree | 99b1d0ad565ac79d7ebaaa305a42d5052d06b206 /src/expr/proof_rule.cpp | |
parent | eacb636406e609299b6e5b64e93f1cf5b73f4ba3 (diff) |
Add ProofNode data structure (#4311)
This is the core data structure for proofs in the new proofs infrastructure. PfRule is a global enumeration of ids of proof nodes (analogous to Kind for Nodes).
Diffstat (limited to 'src/expr/proof_rule.cpp')
-rw-r--r-- | src/expr/proof_rule.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/expr/proof_rule.cpp b/src/expr/proof_rule.cpp new file mode 100644 index 000000000..2c10e09e6 --- /dev/null +++ b/src/expr/proof_rule.cpp @@ -0,0 +1,39 @@ +/********************* */ +/*! \file proof_rule.cpp + ** \verbatim + ** Top contributors (to current version): + ** Andrew Reynolds + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2019 by the authors listed in the file AUTHORS + ** in the top-level source directory) and their institutional affiliations. + ** All rights reserved. See the file COPYING in the top-level source + ** directory for licensing information.\endverbatim + ** + ** \brief Implementation of proof rule + **/ + +#include "expr/proof_rule.h" + +#include <iostream> + +namespace CVC4 { + +const char* toString(PfRule id) +{ + switch (id) + { + //================================================= Core rules + case PfRule::ASSUME: return "ASSUME"; + //================================================= Unknown rule + case PfRule::UNKNOWN: return "UNKNOWN"; + default: return "?"; + } +} + +std::ostream& operator<<(std::ostream& out, PfRule id) +{ + out << toString(id); + return out; +} + +} // namespace CVC4 |