summaryrefslogtreecommitdiff
path: root/src/expr/proof_ensure_closed.h
blob: 8a74612870a17e3362a926d2ff3d795c7a9645a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*********************                                                        */
/*! \file proof_ensure_closed.h
 ** \verbatim
 ** Top contributors (to current version):
 **   Andrew Reynolds, Gereon Kremer
 ** This file is part of the CVC4 project.
 ** Copyright (c) 2009-2021 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 Debug checks for ensuring proofs are closed
 **/

#include "cvc4_private.h"

#ifndef CVC5__EXPR__PROOF_ENSURE_CLOSED_H
#define CVC5__EXPR__PROOF_ENSURE_CLOSED_H

#include "expr/node.h"

namespace cvc5 {

class ProofGenerator;
class ProofNode;

/**
 * Debug check closed on Trace c. Context ctx is string for debugging.
 * This method throws an assertion failure if pg cannot provide a closed
 * proof for fact proven. This is checked only if --proof-eager-checking
 * is enabled or the Trace c is enabled.
 *
 * @param reqGen Whether we consider a null generator to be a failure.
 */
void pfgEnsureClosed(Node proven,
                     ProofGenerator* pg,
                     const char* c,
                     const char* ctx,
                     bool reqGen = true);

/**
 * Debug check closed with Trace c. Context ctx is string for debugging and
 * assumps is the set of allowed open assertions. This method throws an
 * assertion failure if pg cannot provide a proof for fact proven whose
 * free assumptions are contained in assumps.
 *
 * @param reqGen Whether we consider a null generator to be a failure.
 */
void pfgEnsureClosedWrt(Node proven,
                        ProofGenerator* pg,
                        const std::vector<Node>& assumps,
                        const char* c,
                        const char* ctx,
                        bool reqGen = true);

/**
 * Debug check closed with Trace c, proof node versions. This gives an
 * assertion failure if pn is not closed. Detailed information is printed
 * on trace c. Context ctx is a string used for debugging.
 */
void pfnEnsureClosed(ProofNode* pn, const char* c, const char* ctx);
/**
 * Same as above, but throws an assertion failure only if the free assumptions
 * of pn are not contained in assumps.
 */
void pfnEnsureClosedWrt(ProofNode* pn,
                        const std::vector<Node>& assumps,
                        const char* c,
                        const char* ctx);
}  // namespace cvc5

#endif /* CVC5__EXPR__PROOF_ENSURE_CLOSED_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback