GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/theory_quantifiers.h Lines: 1 3 33.3 %
Date: 2021-09-29 Branches: 0 2 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Tim King, Morgan Deters
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
 * Theory of quantifiers.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H
19
#define CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H
20
21
#include "expr/node.h"
22
#include "theory/quantifiers/proof_checker.h"
23
#include "theory/quantifiers/quantifiers_inference_manager.h"
24
#include "theory/quantifiers/quantifiers_registry.h"
25
#include "theory/quantifiers/quantifiers_rewriter.h"
26
#include "theory/quantifiers/quantifiers_state.h"
27
#include "theory/quantifiers/term_registry.h"
28
#include "theory/quantifiers_engine.h"
29
#include "theory/theory.h"
30
#include "theory/valuation.h"
31
32
namespace cvc5 {
33
namespace theory {
34
namespace quantifiers {
35
36
class QuantifiersMacros;
37
38
class TheoryQuantifiers : public Theory {
39
 public:
40
  TheoryQuantifiers(Env& env, OutputChannel& out, Valuation valuation);
41
  ~TheoryQuantifiers();
42
43
  //--------------------------------- initialization
44
  /** get the official theory rewriter of this theory */
45
  TheoryRewriter* getTheoryRewriter() override;
46
  /** get the proof checker of this theory */
47
  ProofRuleChecker* getProofChecker() override;
48
  /** finish initialization */
49
  void finishInit() override;
50
  /** needs equality engine */
51
  bool needsEqualityEngine(EeSetupInfo& esi) override;
52
  //--------------------------------- end initialization
53
54
  void preRegisterTerm(TNode n) override;
55
  void presolve() override;
56
  /**
57
   * Preprocess assert, which solves for quantifier macros when enabled.
58
   */
59
  PPAssertStatus ppAssert(TrustNode tin,
60
                          TrustSubstitutionMap& outSubstitutions) override;
61
  void ppNotifyAssertions(const std::vector<Node>& assertions) override;
62
  //--------------------------------- standard check
63
  /** Post-check, called after the fact queue of the theory is processed. */
64
  void postCheck(Effort level) override;
65
  /** Pre-notify fact, return true if processed. */
66
  bool preNotifyFact(TNode atom,
67
                     bool pol,
68
                     TNode fact,
69
                     bool isPrereg,
70
                     bool isInternal) override;
71
  //--------------------------------- end standard check
72
  /** Collect model values in m based on the relevant terms given by termSet */
73
  bool collectModelValues(TheoryModel* m,
74
                          const std::set<Node>& termSet) override;
75
6262
  void shutdown() override {}
76
  std::string identify() const override
77
  {
78
    return std::string("TheoryQuantifiers");
79
  }
80
81
 private:
82
  /** The theory rewriter for this theory. */
83
  QuantifiersRewriter d_rewriter;
84
  /** The proof rule checker */
85
  QuantifiersProofRuleChecker d_checker;
86
  /** The quantifiers state */
87
  QuantifiersState d_qstate;
88
  /** The quantifiers registry */
89
  QuantifiersRegistry d_qreg;
90
  /** The term registry */
91
  TermRegistry d_treg;
92
  /** The quantifiers inference manager */
93
  QuantifiersInferenceManager d_qim;
94
  /** The quantifiers engine, which lives here */
95
  std::unique_ptr<QuantifiersEngine> d_qengine;
96
  /** The quantifiers macro module, used for ppAssert. */
97
  std::unique_ptr<QuantifiersMacros> d_qmacros;
98
};/* class TheoryQuantifiers */
99
100
}  // namespace quantifiers
101
}  // namespace theory
102
}  // namespace cvc5
103
104
#endif /* CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H */