GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/unsat_core_manager.h Lines: 2 2 100.0 %
Date: 2021-05-22 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Haniel Barbosa
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * The unsat core manager of SmtEngine.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__SMT__UNSAT_CORE_MANAGER_H
19
#define CVC5__SMT__UNSAT_CORE_MANAGER_H
20
21
#include "context/cdlist.h"
22
#include "expr/node.h"
23
#include "expr/proof_node.h"
24
25
namespace cvc5 {
26
27
namespace smt {
28
29
class Assertions;
30
31
/**
32
 * This class is responsible for managing the proof output of SmtEngine, as
33
 * well as setting up the global proof checker and proof node manager.
34
 */
35
class UnsatCoreManager
36
{
37
 public:
38
3600
  UnsatCoreManager() {}
39
3600
  ~UnsatCoreManager(){};
40
41
  /** Gets the unsat core.
42
   *
43
   * The unsat core is the intersection of the assertions in as and the free
44
   * assumptions of the underlying refutation proof of pfn. Note that pfn must
45
   * be a "final proof", which means that it's a proof of false under a scope
46
   * containing all assertions.
47
   *
48
   * The unsat core is stored in the core argument.
49
   */
50
  void getUnsatCore(std::shared_ptr<ProofNode> pfn,
51
                    Assertions& as,
52
                    std::vector<Node>& core);
53
54
  /** Gets the relevant instaniations for the refutation.
55
   *
56
   * The relevant instantiations are all the conclusions of proof nodes of type
57
   * INSTANTIATE that occur in pfn.
58
   *
59
   * This method populates the insts map from quantified formulas occurring as
60
   * premises of INSTANTIATE proof nodes to its instantiations, which are a
61
   * matrix with each row corresponding to the terms with which the respective
62
   * quantified formula is instiated.
63
   */
64
  void getRelevantInstantiations(
65
      std::shared_ptr<ProofNode> pfn,
66
      std::map<Node, std::vector<std::vector<Node>>>& insts);
67
68
}; /* class UnsatCoreManager */
69
70
}  // namespace smt
71
}  // namespace cvc5
72
73
#endif /* CVC5__SMT__UNSAT_CORE_MANAGER_H */