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

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