GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/quantifiers/fmf/model_builder.h Lines: 5 6 83.3 %
Date: 2021-03-22 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file model_builder.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds, Mathias Preiner
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Model Builder class
13
 **/
14
15
#include "cvc4_private.h"
16
17
#ifndef CVC4__THEORY__QUANTIFIERS__MODEL_BUILDER_H
18
#define CVC4__THEORY__QUANTIFIERS__MODEL_BUILDER_H
19
20
#include "expr/node.h"
21
#include "theory/quantifiers/inst_match.h"
22
#include "theory/theory_model_builder.h"
23
24
namespace CVC4 {
25
namespace theory {
26
namespace quantifiers {
27
28
class FirstOrderModel;
29
class QuantifiersState;
30
class QuantifiersRegistry;
31
32
836
class QModelBuilder : public TheoryEngineModelBuilder
33
{
34
 protected:
35
  // must call preProcessBuildModelStd
36
  bool preProcessBuildModel(TheoryModel* m) override;
37
  bool preProcessBuildModelStd(TheoryModel* m);
38
  /** number of lemmas generated while building model */
39
  unsigned d_addedLemmas;
40
  unsigned d_triedLemmas;
41
42
 public:
43
  QModelBuilder(QuantifiersState& qs, QuantifiersRegistry& qr);
44
  //!!!!!!!!!!!!!!!!!!!!! temporary (project #15)
45
822
  void finishInit(QuantifiersEngine* qe) { d_qe = qe; }
46
47
  //do exhaustive instantiation
48
  // 0 :  failed, but resorting to true exhaustive instantiation may work
49
  // >0 : success
50
  // <0 : failed
51
168
  virtual int doExhaustiveInstantiation( FirstOrderModel * fm, Node f, int effort ) { return false; }
52
  //whether to construct model
53
  virtual bool optUseModel();
54
  /** exist instantiation ? */
55
  virtual bool existsInstantiation( Node f, InstMatch& m, bool modEq = true, bool modInst = false ) { return false; }
56
  //debug model
57
  void debugModel(TheoryModel* m) override;
58
  //statistics
59
22216
  unsigned getNumAddedLemmas() { return d_addedLemmas; }
60
22216
  unsigned getNumTriedLemmas() { return d_triedLemmas; }
61
62
 protected:
63
  /** Pointer to quantifiers engine */
64
  QuantifiersEngine* d_qe;
65
  /** The quantifiers state object */
66
  QuantifiersState& d_qstate;
67
  /** Reference to the quantifiers registry */
68
  QuantifiersRegistry& d_qreg;
69
};
70
71
}/* CVC4::theory::quantifiers namespace */
72
}/* CVC4::theory namespace */
73
}/* CVC4 namespace */
74
75
#endif /* CVC4__THEORY__QUANTIFIERS__MODEL_BUILDER_H */