summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/model_engine.h
blob: 394ceaf42eb5637a239bbe3f8963d89923928319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*********************                                                        */
/*! \file model_engine.h
 ** \verbatim
 ** Original author: ajreynol
 ** Major contributors: mdeters
 ** Minor contributors (to current version): none
 ** This file is part of the CVC4 prototype.
 ** Copyright (c) 2009-2012  New York University and The University of Iowa
 ** See the file COPYING in the top-level source directory for licensing
 ** information.\endverbatim
 **
 ** \brief Model Engine class
 **/

#include "cvc4_private.h"

#ifndef __CVC4__THEORY__QUANTIFIERS__MODEL_ENGINE_H
#define __CVC4__THEORY__QUANTIFIERS__MODEL_ENGINE_H

#include "theory/quantifiers_engine.h"
#include "theory/quantifiers/model_builder.h"
#include "theory/model.h"
#include "theory/quantifiers/relevant_domain.h"

namespace CVC4 {
namespace theory {
namespace quantifiers {

class ModelEngine : public QuantifiersModule
{
  friend class RepSetIterator;
private:
  /** builder class */
  ModelEngineBuilder* d_builder;
private:    //analysis of current model:
  //relevant domain
  RelevantDomain d_rel_domain;
  //is the exhaustive instantiation incomplete?
  bool d_incomplete_check;
private:
  //options
  bool optOneInstPerQuantRound();
  bool optUseRelevantDomain();
  bool optOneQuantPerRound();
  bool optExhInstEvalSkipMultiple();
private:
  enum{
    check_model_full,
    check_model_no_inst_gen,
  };
  //check model
  int checkModel( int checkOption );
  //exhaustively instantiate quantifier (possibly using mbqi), return number of lemmas produced
  int exhaustiveInstantiate( Node f, bool useRelInstDomain = false );
private:
  //temporary statistics
  int d_triedLemmas;
  int d_testLemmas;
  int d_totalLemmas;
  int d_relevantLemmas;
public:
  ModelEngine( context::Context* c, QuantifiersEngine* qe );
  ~ModelEngine(){}
  //get the builder
  ModelEngineBuilder* getModelBuilder() { return d_builder; }
public:
  void check( Theory::Effort e );
  void registerQuantifier( Node f );
  void assertNode( Node f );
  Node explain(TNode n){ return Node::null(); }
  void debugPrint( const char* c );
public:
  /** statistics class */
  class Statistics {
  public:
    IntStat d_inst_rounds;
    IntStat d_eval_formulas;
    IntStat d_eval_uf_terms;
    IntStat d_eval_lits;
    IntStat d_eval_lits_unknown;
    IntStat d_exh_inst_lemmas;
    Statistics();
    ~Statistics();
  };
  Statistics d_statistics;
};/* class ModelEngine */

}/* CVC4::theory::quantifiers namespace */
}/* CVC4::theory namespace */
}/* CVC4 namespace */

#endif /* __CVC4__THEORY__QUANTIFIERS__MODEL_ENGINE_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback