GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arrays/inference_manager.h Lines: 1 1 100.0 %
Date: 2021-09-18 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(Env& env,
37
                   Theory& t,
38
                   TheoryState& state,
39
                   ProofNodeManager* pnm);
40
9937
  ~InferenceManager() {}
41
42
  /**
43
   * Assert inference. This sends an internal fact to the equality engine
44
   * immediately, possibly with proof support. The identifier id which
45
   * rule to apply when proofs are enabled. The order of children
46
   * and arguments to use in the proof step are determined internally in
47
   * this method.
48
   *
49
   * @return true if the fact was successfully asserted, and false if the
50
   * fact was redundant.
51
   */
52
  bool assertInference(TNode atom, bool polarity, InferenceId id, TNode reason, PfRule pfr);
53
  /**
54
   * Send lemma (exp => conc) based on proof rule id with properties p.
55
   */
56
  bool arrayLemma(Node conc,
57
                  InferenceId id,
58
                  Node exp,
59
                  PfRule pfr,
60
                  LemmaProperty p = LemmaProperty::NONE);
61
62
 private:
63
  /**
64
   * Converts a conclusion, explanation and proof rule id used by the array
65
   * theory to the set of arguments required for a proof rule application.
66
   */
67
  void convert(PfRule& id,
68
               Node conc,
69
               Node exp,
70
               std::vector<Node>& children,
71
               std::vector<Node>& args);
72
  /** Eager proof generator for lemmas from the above method */
73
  std::unique_ptr<EagerProofGenerator> d_lemmaPg;
74
};
75
76
}  // namespace arrays
77
}  // namespace theory
78
}  // namespace cvc5
79
80
#endif