GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/fmf/model_engine.h Lines: 1 1 100.0 %
Date: 2021-09-29 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 "smt/env_obj.h"
22
#include "theory/quantifiers/fmf/model_builder.h"
23
#include "theory/quantifiers/quant_module.h"
24
#include "theory/theory_model.h"
25
26
namespace cvc5 {
27
namespace theory {
28
namespace quantifiers {
29
30
class ModelEngine : public QuantifiersModule
31
{
32
  friend class RepSetIterator;
33
private:
34
  //check model
35
  int checkModel();
36
  //exhaustively instantiate quantifier (possibly using mbqi)
37
  void exhaustiveInstantiate( Node f, int effort = 0 );
38
private:
39
  //temporary statistics
40
  //is the exhaustive instantiation incomplete?
41
  bool d_incomplete_check;
42
  int d_addedLemmas;
43
  int d_triedLemmas;
44
  int d_totalLemmas;
45
public:
46
 ModelEngine(Env& env,
47
             QuantifiersState& qs,
48
             QuantifiersInferenceManager& qim,
49
             QuantifiersRegistry& qr,
50
             TermRegistry& tr,
51
             QModelBuilder* builder);
52
 virtual ~ModelEngine();
53
54
public:
55
 bool needsCheck(Theory::Effort e) override;
56
 QEffort needsModel(Theory::Effort e) override;
57
 void reset_round(Theory::Effort e) override;
58
 void check(Theory::Effort e, QEffort quant_e) override;
59
 bool checkComplete(IncompleteId& incId) override;
60
 bool checkCompleteFor(Node q) override;
61
 void registerQuantifier(Node f) override;
62
 Node explain(TNode n) { return Node::null(); }
63
 void debugPrint(const char* c);
64
 /** Identify this module */
65
20602
 std::string identify() const override { return "ModelEngine"; }
66
67
private:
68
 /** Should we process quantified formula q? */
69
 bool shouldProcess(Node q);
70
 /** Pointer to the model builder of quantifiers engine */
71
 QModelBuilder* d_builder;
72
 /** set of quantified formulas for which check was incomplete */
73
 std::unordered_set<Node> d_incompleteQuants;
74
};/* class ModelEngine */
75
76
}  // namespace quantifiers
77
}  // namespace theory
78
}  // namespace cvc5
79
80
#endif /* CVC5__THEORY__QUANTIFIERS__MODEL_ENGINE_H */