diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-06-11 16:28:23 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-06-11 16:28:23 +0000 |
commit | 3378e253fcdb34c753407bb16d08929da06b3aaa (patch) | |
tree | db7c7118dd0d1594175b56866f845b42426ae0a7 /src/theory/quantifiers/theory_quantifiers.h | |
parent | 42794501e81c44dce5c2f7687af288af030ef63e (diff) |
Merge from quantifiers2-trunkmerge branch.
Adds TheoryQuantifiers and TheoryRewriteRules, QuantifiersEngine, and other infrastructure.
Adds theory instantiators to many theories.
Adds the UF strong solver.
Diffstat (limited to 'src/theory/quantifiers/theory_quantifiers.h')
-rw-r--r-- | src/theory/quantifiers/theory_quantifiers.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/theory/quantifiers/theory_quantifiers.h b/src/theory/quantifiers/theory_quantifiers.h new file mode 100644 index 000000000..05c3b9695 --- /dev/null +++ b/src/theory/quantifiers/theory_quantifiers.h @@ -0,0 +1,77 @@ +/********************* */ +/*! \file theory_quantifiers.h + ** \verbatim + ** Original author: ajreynol + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) + ** Courant Institute of Mathematical Sciences + ** New York University + ** See the file COPYING in the top-level source directory for licensing + ** information.\endverbatim + ** + ** \brief Theory of quantifiers. + ** + ** Theory of quantifiers. + **/ + +#include "cvc4_private.h" + +#ifndef __CVC4__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H +#define __CVC4__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H + +#include "theory/theory.h" +#include "util/hash.h" +#include "util/stats.h" + +#include <ext/hash_set> +#include <iostream> +#include <map> + +namespace CVC4 { +namespace theory { +namespace quantifiers { + +class TheoryEngine; + +class TheoryQuantifiers : public Theory { +private: + typedef context::CDHashMap< Node, bool, NodeHashFunction > BoolMap; + /** quantifiers that have been skolemized */ + std::map< Node, bool > d_skolemized; + /** number of instantiations */ + int d_numInstantiations; + int d_baseDecLevel; + /** number of restarts */ + int d_numRestarts; + + KEEP_STATISTIC(TimerStat, d_theoryTime, "theory::quantifiers::theoryTime"); + +public: + TheoryQuantifiers(context::Context* c, context::UserContext* u, OutputChannel& out, Valuation valuation, const LogicInfo& logicInfo, QuantifiersEngine* qe); + ~TheoryQuantifiers(); + + void addSharedTerm(TNode t); + void notifyEq(TNode lhs, TNode rhs); + void preRegisterTerm(TNode n); + void presolve(); + void check(Effort e); + void propagate(Effort level); + Node getValue(TNode n); + void shutdown() { } + std::string identify() const { return std::string("TheoryQuantifiers"); } + bool flipDecision(); +private: + void assertUniversal( Node n ); + void assertExistential( Node n ); + bool restart(); +public: + void performCheck(Effort e); +};/* class TheoryQuantifiers */ + +}/* CVC4::theory::quantifiers namespace */ +}/* CVC4::theory namespace */ +}/* CVC4 namespace */ + +#endif /* __CVC4__THEORY__QUANTIFIERS__THEORY_QUANTIFIERS_H */ |