GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arrays/inference_manager.h Lines: 1 1 100.0 %
Date: 2021-03-23 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file inference_manager.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds, Gereon Kremer, Morgan Deters
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 Arrays inference manager
13
 **/
14
15
#include "cvc4_private.h"
16
17
#ifndef CVC4__THEORY__ARRAYS__INFERENCE_MANAGER_H
18
#define CVC4__THEORY__ARRAYS__INFERENCE_MANAGER_H
19
20
#include "expr/node.h"
21
#include "expr/proof_rule.h"
22
#include "theory/eager_proof_generator.h"
23
#include "theory/theory_inference_manager.h"
24
25
namespace CVC4 {
26
namespace theory {
27
namespace arrays {
28
29
/**
30
 * The arrays inference manager.
31
 */
32
class InferenceManager : public TheoryInferenceManager
33
{
34
 public:
35
  InferenceManager(Theory& t, TheoryState& state, ProofNodeManager* pnm);
36
8994
  ~InferenceManager() {}
37
38
  /**
39
   * Assert inference. This sends an internal fact to the equality engine
40
   * immediately, possibly with proof support. The identifier id which
41
   * rule to apply when proofs are enabled. The order of children
42
   * and arguments to use in the proof step are determined internally in
43
   * this method.
44
   *
45
   * @return true if the fact was successfully asserted, and false if the
46
   * fact was redundant.
47
   */
48
  bool assertInference(TNode atom, bool polarity, InferenceId id, TNode reason, PfRule pfr);
49
  /**
50
   * Send lemma (exp => conc) based on proof rule id with properties p.
51
   */
52
  bool arrayLemma(Node conc,
53
                  InferenceId id,
54
                  Node exp,
55
                  PfRule pfr,
56
                  LemmaProperty p = LemmaProperty::NONE);
57
58
 private:
59
  /**
60
   * Converts a conclusion, explanation and proof rule id used by the array
61
   * theory to the set of arguments required for a proof rule application.
62
   */
63
  void convert(PfRule& id,
64
               Node conc,
65
               Node exp,
66
               std::vector<Node>& children,
67
               std::vector<Node>& args);
68
  /** Eager proof generator for lemmas from the above method */
69
  std::unique_ptr<EagerProofGenerator> d_lemmaPg;
70
};
71
72
}  // namespace arrays
73
}  // namespace theory
74
}  // namespace CVC4
75
76
#endif