#include "theory/quantifiers/quant_util.h"
+#include "context/cdhashmap.h"
#include "context/context.h"
-#include "context/context_mm.h"
+#include "expr/attribute.h"
namespace CVC4 {
namespace theory {
class RepSetIterator;
+/**
+ * Attribute set to 1 for literals that comprise the bounds of a quantified
+ * formula. For example, for:
+ * forall x. ( 0 <= x ^ x <= n ) => P( x )
+ * the literals 0 <= x and x <= n are marked 1.
+ */
+struct BoundIntLitAttributeId
+{
+};
+typedef expr::Attribute<BoundIntLitAttributeId, uint64_t> BoundIntLitAttribute;
+
namespace quantifiers {
class BoundedIntegers : public QuantifiersModule
#include "theory/quantifiers/fmf/model_builder.h"
#include "options/quantifiers_options.h"
-#include "theory/quantifiers/ematching/trigger.h"
#include "theory/quantifiers/first_order_model.h"
#include "theory/quantifiers/fmf/model_engine.h"
+#include "theory/quantifiers/fun_def_process.h"
#include "theory/quantifiers/instantiate.h"
#include "theory/quantifiers/quant_rep_bound_ext.h"
-#include "theory/quantifiers/quantifiers_attributes.h"
-#include "theory/quantifiers/term_database.h"
-#include "theory/quantifiers/term_util.h"
#include "theory/quantifiers_engine.h"
-#include "theory/theory_engine.h"
#include "theory/uf/equality_engine.h"
-#include "theory/uf/theory_uf.h"
-#include "theory/uf/theory_uf_model.h"
using namespace std;
using namespace CVC4;
}
Node n = d_qe->getInstantiate()->getInstantiation(f, vars, terms);
Node val = fm->getValue( n );
- if (val != d_qe->getTermUtil()->d_true)
+ if (!val.isConst() || !val.getConst<bool>())
{
Trace("quant-check-model") << "******* Instantiation " << n << " for " << std::endl;
Trace("quant-check-model") << " " << f << std::endl;
#ifndef CVC4__QUANTIFIERS_FUN_DEF_PROCESS_H
#define CVC4__QUANTIFIERS_FUN_DEF_PROCESS_H
-#include <iostream>
-#include <string>
-#include <vector>
#include <map>
+#include <vector>
+#include "expr/attribute.h"
#include "expr/node.h"
#include "expr/type_node.h"
namespace CVC4 {
namespace theory {
+
+/**
+ * Attribute marked true for types that are used as abstraction types in
+ * the algorithm below.
+ */
+struct AbsTypeFunDefAttributeId
+{
+};
+typedef expr::Attribute<AbsTypeFunDefAttributeId, bool> AbsTypeFunDefAttribute;
+
namespace quantifiers {
//Preprocessing pass to allow finite model finding for admissible recursive function definitions
#define CVC4__THEORY__LOCAL_THEORY_EXT_H
#include "context/cdo.h"
+#include "expr/attribute.h"
#include "expr/node_trie.h"
#include "theory/quantifiers/quant_util.h"
namespace CVC4 {
namespace theory {
+
+/** Attribute true for quantifiers that do not need to be partially instantiated
+ */
+struct LtePartialInstAttributeId
+{
+};
+typedef expr::Attribute<LtePartialInstAttributeId, bool>
+ LtePartialInstAttribute;
+
namespace quantifiers {
class LtePartialInst : public QuantifiersModule {
#include <map>
#include <vector>
+#include "expr/attribute.h"
#include "theory/quantifiers/ematching/trigger.h"
#include "theory/quantifiers/quant_conflict_find.h"
#include "theory/quantifiers/quant_util.h"
namespace CVC4 {
namespace theory {
+
+/**
+ * An attribute for marking a priority value for rewrite rules.
+ */
+struct RrPriorityAttributeId
+{
+};
+typedef expr::Attribute<RrPriorityAttributeId, uint64_t> RrPriorityAttribute;
+
namespace quantifiers {
class RewriteEngine : public QuantifiersModule
#include "printer/sygus_print_callback.h"
#include "theory/quantifiers/quantifiers_attributes.h"
#include "theory/quantifiers/quantifiers_rewriter.h"
+#include "theory/quantifiers/sygus/sygus_grammar_cons.h"
#include "theory/quantifiers/term_util.h"
#include "theory/rewriter.h"
#include <map>
#include <vector>
+#include "expr/attribute.h"
#include "expr/node.h"
namespace CVC4 {
class QuantifiersEngine;
+/**
+ * Attribute for associating a function-to-synthesize with a first order
+ * variable whose type is a sygus datatype type that encodes its grammar.
+ */
+struct SygusSynthGrammarAttributeId
+{
+};
+typedef expr::Attribute<SygusSynthGrammarAttributeId, Node>
+ SygusSynthGrammarAttribute;
+
+/**
+ * Attribute for associating a function-to-synthesize with its formal argument
+ * list.
+ */
+struct SygusSynthFunVarListAttributeId
+{
+};
+typedef expr::Attribute<SygusSynthFunVarListAttributeId, Node>
+ SygusSynthFunVarListAttribute;
+
namespace quantifiers {
class SynthConjecture;
struct ContainsUConstAttributeId {};
typedef expr::Attribute<ContainsUConstAttributeId, uint64_t> ContainsUConstAttribute;
-//for bounded integers
-struct BoundIntLitAttributeId {};
-typedef expr::Attribute<BoundIntLitAttributeId, uint64_t> BoundIntLitAttribute;
-
//for quantifier instantiation level
struct QuantInstLevelAttributeId {};
typedef expr::Attribute<QuantInstLevelAttributeId, uint64_t> QuantInstLevelAttribute;
-//rewrite-rule priority
-struct RrPriorityAttributeId {};
-typedef expr::Attribute<RrPriorityAttributeId, uint64_t> RrPriorityAttribute;
-
-/** Attribute true for quantifiers that do not need to be partially instantiated */
-struct LtePartialInstAttributeId {};
-typedef expr::Attribute< LtePartialInstAttributeId, bool > LtePartialInstAttribute;
-
-// attribute for associating a synthesis function with a first order variable
-struct SygusSynthGrammarAttributeId {};
-typedef expr::Attribute<SygusSynthGrammarAttributeId, Node>
- SygusSynthGrammarAttribute;
-
-// attribute for associating a variable list with a synth fun
-struct SygusSynthFunVarListAttributeId {};
-typedef expr::Attribute<SygusSynthFunVarListAttributeId, Node> SygusSynthFunVarListAttribute;
-
-//attribute for fun-def abstraction type
-struct AbsTypeFunDefAttributeId {};
-typedef expr::Attribute<AbsTypeFunDefAttributeId, bool> AbsTypeFunDefAttribute;
-
/** Attribute for id number */
struct QuantIdNumAttributeId {};
typedef expr::Attribute< QuantIdNumAttributeId, uint64_t > QuantIdNumAttribute;