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
73
74
75
76
|
/********************* */
/*! \file inference_manager.h
** \verbatim
** Top contributors (to current version):
** Andrew Reynolds, Gereon Kremer, Morgan Deters
** 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 Arrays inference manager
**/
#include "cvc4_private.h"
#ifndef CVC5__THEORY__ARRAYS__INFERENCE_MANAGER_H
#define CVC5__THEORY__ARRAYS__INFERENCE_MANAGER_H
#include "expr/node.h"
#include "expr/proof_rule.h"
#include "theory/eager_proof_generator.h"
#include "theory/theory_inference_manager.h"
namespace cvc5 {
namespace theory {
namespace arrays {
/**
* The arrays inference manager.
*/
class InferenceManager : public TheoryInferenceManager
{
public:
InferenceManager(Theory& t, TheoryState& state, ProofNodeManager* pnm);
~InferenceManager() {}
/**
* Assert inference. This sends an internal fact to the equality engine
* immediately, possibly with proof support. The identifier id which
* rule to apply when proofs are enabled. The order of children
* and arguments to use in the proof step are determined internally in
* this method.
*
* @return true if the fact was successfully asserted, and false if the
* fact was redundant.
*/
bool assertInference(TNode atom, bool polarity, InferenceId id, TNode reason, PfRule pfr);
/**
* Send lemma (exp => conc) based on proof rule id with properties p.
*/
bool arrayLemma(Node conc,
InferenceId id,
Node exp,
PfRule pfr,
LemmaProperty p = LemmaProperty::NONE);
private:
/**
* Converts a conclusion, explanation and proof rule id used by the array
* theory to the set of arguments required for a proof rule application.
*/
void convert(PfRule& id,
Node conc,
Node exp,
std::vector<Node>& children,
std::vector<Node>& args);
/** Eager proof generator for lemmas from the above method */
std::unique_ptr<EagerProofGenerator> d_lemmaPg;
};
} // namespace arrays
} // namespace theory
} // namespace cvc5
#endif
|