long = "full-saturate-quant"
type = "bool"
default = "false"
- help = "when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown"
+ help = "enumerative instantiation: instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown"
[[option]]
name = "fullSaturateQuantRd"
type = "bool"
default = "true"
read_only = true
- help = "whether to use relevant domain first for full saturation instantiation strategy"
+ help = "whether to use relevant domain first for enumerative instantiation strategy"
+[[option]]
+ name = "fullSaturateLimit"
+ category = "regular"
+ long = "full-saturate-quant-limit=N"
+ type = "int"
+ default = "-1"
+ read_only = true
+ help = "maximum number of rounds of enumerative instantiation to apply (-1 means no limit)"
+
[[option]]
name = "fullSaturateInterleave"
category = "regular"
type = "bool"
default = "false"
read_only = true
- help = "interleave full saturate instantiation with other techniques"
+ help = "interleave enumerative instantiation with other techniques"
[[option]]
name = "fullSaturateStratify"
namespace quantifiers {
InstStrategyEnum::InstStrategyEnum(QuantifiersEngine* qe, RelevantDomain* rd)
- : QuantifiersModule(qe), d_rd(rd)
+ : QuantifiersModule(qe), d_rd(rd), d_fullSaturateLimit(-1)
{
}
-
+void InstStrategyEnum::presolve()
+{
+ d_fullSaturateLimit = options::fullSaturateLimit();
+}
bool InstStrategyEnum::needsCheck(Theory::Effort e)
{
+ if (d_fullSaturateLimit == 0)
+ {
+ return false;
+ }
if (options::fullSaturateInterleave())
{
if (d_quantEngine->getInstWhenNeedsCheck(e))
{
bool doCheck = false;
bool fullEffort = false;
- if (options::fullSaturateInterleave())
+ if (d_fullSaturateLimit != 0)
{
- // we only add when interleaved with other strategies
- doCheck = quant_e == QEFFORT_STANDARD && d_quantEngine->hasAddedLemma();
- }
- if (options::fullSaturateQuant() && !doCheck)
- {
- doCheck = quant_e == QEFFORT_LAST_CALL;
- fullEffort = !d_quantEngine->hasAddedLemma();
+ if (options::fullSaturateInterleave())
+ {
+ // we only add when interleaved with other strategies
+ doCheck = quant_e == QEFFORT_STANDARD && d_quantEngine->hasAddedLemma();
+ }
+ if (options::fullSaturateQuant() && !doCheck)
+ {
+ doCheck = quant_e == QEFFORT_LAST_CALL;
+ fullEffort = !d_quantEngine->hasAddedLemma();
+ }
}
if (!doCheck)
{
Trace("fs-engine") << "Finished full saturation engine, time = "
<< (clSet2 - clSet) << std::endl;
}
+ if (d_fullSaturateLimit > 0)
+ {
+ d_fullSaturateLimit--;
+ }
}
bool InstStrategyEnum::process(Node f, bool fullEffort, bool isRd)
public:
InstStrategyEnum(QuantifiersEngine* qe, RelevantDomain* rd);
~InstStrategyEnum() {}
+ /** Presolve */
+ void presolve() override;
/** Needs check. */
bool needsCheck(Theory::Effort e) override;
/** Reset round. */
* term instantiations.
*/
bool process(Node q, bool fullEffort, bool isRd);
+ /**
+ * A limit on the number of rounds to apply this strategy, where a value < 0
+ * means no limit. This value is set to the value of fullSaturateLimit()
+ * during presolve.
+ */
+ int32_t d_fullSaturateLimit;
}; /* class InstStrategyEnum */
} /* CVC4::theory::quantifiers namespace */