GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/theory_quantifiers.h Lines: 1 3 33.3 %
Date: 2021-08-14 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(context::Context* c,
41
                    context::UserContext* u,
42
                    OutputChannel& out,
43
                    Valuation valuation,
44
                    const LogicInfo& logicInfo,
45
                    ProofNodeManager* pnm = nullptr);
46
  ~TheoryQuantifiers();
47
48
  //--------------------------------- initialization
49
  /** get the official theory rewriter of this theory */
50
  TheoryRewriter* getTheoryRewriter() override;
51
  /** get the proof checker of this theory */
52
  ProofRuleChecker* getProofChecker() override;
53
  /** finish initialization */
54
  void finishInit() override;
55
  /** needs equality engine */
56
  bool needsEqualityEngine(EeSetupInfo& esi) override;
57
  //--------------------------------- end initialization
58
59
  void preRegisterTerm(TNode n) override;
60
  void presolve() override;
61
  /**
62
   * Preprocess assert, which solves for quantifier macros when enabled.
63
   */
64
  PPAssertStatus ppAssert(TrustNode tin,
65
                          TrustSubstitutionMap& outSubstitutions) override;
66
  void ppNotifyAssertions(const std::vector<Node>& assertions) override;
67
  //--------------------------------- standard check
68
  /** Post-check, called after the fact queue of the theory is processed. */
69
  void postCheck(Effort level) override;
70
  /** Pre-notify fact, return true if processed. */
71
  bool preNotifyFact(TNode atom,
72
                     bool pol,
73
                     TNode fact,
74
                     bool isPrereg,
75
                     bool isInternal) override;
76
  //--------------------------------- end standard check
77
  /** Collect model values in m based on the relevant terms given by termSet */
78
  bool collectModelValues(TheoryModel* m,
79
                          const std::set<Node>& termSet) override;
80
9847
  void shutdown() override {}
81
  std::string identify() const override
82
  {
83
    return std::string("TheoryQuantifiers");
84
  }
85
  void setUserAttribute(const std::string& attr,
86
                        Node n,
87
                        std::vector<Node> node_values,
88
                        std::string str_value) override;
89
90
 private:
91
  /** The theory rewriter for this theory. */
92
  QuantifiersRewriter d_rewriter;
93
  /** The proof rule checker */
94
  QuantifiersProofRuleChecker d_checker;
95
  /** The quantifiers state */
96
  QuantifiersState d_qstate;
97
  /** The quantifiers registry */
98
  QuantifiersRegistry d_qreg;
99
  /** The term registry */
100
  TermRegistry d_treg;
101
  /** The quantifiers inference manager */
102
  QuantifiersInferenceManager d_qim;
103
  /** The quantifiers engine, which lives here */
104
  std::unique_ptr<QuantifiersEngine> d_qengine;
105
  /** The quantifiers macro module, used for ppAssert. */
106
  std::unique_ptr<QuantifiersMacros> d_qmacros;
107
};/* class TheoryQuantifiers */
108
109
}  // namespace quantifiers
110
}  // namespace theory
111
}  // namespace cvc5
112
113
#endif /* CVC5__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H */