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 "proof/proof_node.h" |
24 |
|
#include "theory/quantifiers/instantiation_list.h" |
25 |
|
|
26 |
|
namespace cvc5 { |
27 |
|
|
28 |
|
namespace smt { |
29 |
|
|
30 |
|
class Assertions; |
31 |
|
|
32 |
|
/** |
33 |
|
* This class is responsible for managing the proof output of SmtEngine, as |
34 |
|
* well as setting up the global proof checker and proof node manager. |
35 |
|
*/ |
36 |
|
class UnsatCoreManager |
37 |
|
{ |
38 |
|
public: |
39 |
3769 |
UnsatCoreManager() {} |
40 |
3769 |
~UnsatCoreManager(){}; |
41 |
|
|
42 |
|
/** Gets the unsat core. |
43 |
|
* |
44 |
|
* The unsat core is the intersection of the assertions in as and the free |
45 |
|
* assumptions of the underlying refutation proof of pfn. Note that pfn must |
46 |
|
* be a "final proof", which means that it's a proof of false under a scope |
47 |
|
* containing all assertions. |
48 |
|
* |
49 |
|
* The unsat core is stored in the core argument. |
50 |
|
*/ |
51 |
|
void getUnsatCore(std::shared_ptr<ProofNode> pfn, |
52 |
|
Assertions& as, |
53 |
|
std::vector<Node>& core); |
54 |
|
|
55 |
|
/** Gets the relevant instaniations for the refutation. |
56 |
|
* |
57 |
|
* The relevant instantiations are all the conclusions of proof nodes of type |
58 |
|
* INSTANTIATE that occur in pfn. |
59 |
|
* |
60 |
|
* This method populates the insts map from quantified formulas occurring as |
61 |
|
* premises of INSTANTIATE proof nodes to its instantiations, which are a |
62 |
|
* matrix with each row corresponding to the terms with which the respective |
63 |
|
* quantified formula is instiated. |
64 |
|
*/ |
65 |
|
void getRelevantInstantiations(std::shared_ptr<ProofNode> pfn, |
66 |
|
std::map<Node, InstantiationList>& insts, |
67 |
|
bool getDebugInfo = false); |
68 |
|
|
69 |
|
}; /* class UnsatCoreManager */ |
70 |
|
|
71 |
|
} // namespace smt |
72 |
|
} // namespace cvc5 |
73 |
|
|
74 |
|
#endif /* CVC5__SMT__UNSAT_CORE_MANAGER_H */ |