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

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