GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/fmf/model_engine.h Lines: 1 1 100.0 %
Date: 2021-08-17 Branches: 1 2 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Mathias Preiner, 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
 * Model Engine class.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__THEORY__QUANTIFIERS__MODEL_ENGINE_H
19
#define CVC5__THEORY__QUANTIFIERS__MODEL_ENGINE_H
20
21
#include "theory/quantifiers/fmf/model_builder.h"
22
#include "theory/quantifiers/quant_module.h"
23
#include "theory/theory_model.h"
24
25
namespace cvc5 {
26
namespace theory {
27
namespace quantifiers {
28
29
class ModelEngine : public QuantifiersModule
30
{
31
  friend class RepSetIterator;
32
private:
33
  //check model
34
  int checkModel();
35
  //exhaustively instantiate quantifier (possibly using mbqi)
36
  void exhaustiveInstantiate( Node f, int effort = 0 );
37
private:
38
  //temporary statistics
39
  //is the exhaustive instantiation incomplete?
40
  bool d_incomplete_check;
41
  int d_addedLemmas;
42
  int d_triedLemmas;
43
  int d_totalLemmas;
44
public:
45
 ModelEngine(QuantifiersState& qs,
46
             QuantifiersInferenceManager& qim,
47
             QuantifiersRegistry& qr,
48
             TermRegistry& tr,
49
             QModelBuilder* builder);
50
 virtual ~ModelEngine();
51
52
public:
53
 bool needsCheck(Theory::Effort e) override;
54
 QEffort needsModel(Theory::Effort e) override;
55
 void reset_round(Theory::Effort e) override;
56
 void check(Theory::Effort e, QEffort quant_e) override;
57
 bool checkComplete(IncompleteId& incId) override;
58
 bool checkCompleteFor(Node q) override;
59
 void registerQuantifier(Node f) override;
60
 Node explain(TNode n) { return Node::null(); }
61
 void debugPrint(const char* c);
62
 /** Identify this module */
63
28378
 std::string identify() const override { return "ModelEngine"; }
64
65
private:
66
 /** Should we process quantified formula q? */
67
 bool shouldProcess(Node q);
68
 /** Pointer to the model builder of quantifiers engine */
69
 QModelBuilder* d_builder;
70
 /** set of quantified formulas for which check was incomplete */
71
 std::unordered_set<Node> d_incompleteQuants;
72
};/* class ModelEngine */
73
74
}  // namespace quantifiers
75
}  // namespace theory
76
}  // namespace cvc5
77
78
#endif /* CVC5__THEORY__QUANTIFIERS__MODEL_ENGINE_H */