This also consolidates the option strictTriggers into userPatMode.
Fixes #6996.
default = "false"
help = "consider ground terms within bodies of quantified formulas for matching"
-[[option]]
- name = "strictTriggers"
- category = "regular"
- long = "strict-triggers"
- type = "bool"
- default = "false"
- help = "only instantiate quantifiers with user patterns based on triggers"
-
[[option]]
name = "relevantTriggers"
category = "regular"
[[option.mode.TRUST]]
name = "trust"
help = "When provided, use only user-provided patterns for a quantified formula."
+[[option.mode.STRICT]]
+ name = "trust"
+ help = "When provided, use only user-provided patterns for a quantified formula, and do not use any other instantiation techniques."
[[option.mode.RESORT]]
name = "resort"
help = "Use user-provided patterns only after auto-generated patterns saturate."
}
}
// implied options...
- if (opts.quantifiers.strictTriggers)
- {
- if (!opts.quantifiers.userPatternsQuantWasSetByUser)
- {
- opts.quantifiers.userPatternsQuant = options::UserPatMode::TRUST;
- }
- }
if (opts.quantifiers.qcfModeWasSetByUser || opts.quantifiers.qcfTConstraint)
{
opts.quantifiers.quantConflictFind = true;
int e)
{
options::UserPatMode upMode = getInstUserPatMode();
- if (hasUserPatterns(f) && upMode == options::UserPatMode::TRUST)
+ // we don't auto-generate triggers if the mode is trust or strict
+ if (hasUserPatterns(f)
+ && (upMode == options::UserPatMode::TRUST
+ || upMode == options::UserPatMode::STRICT))
{
return InstStrategyStatus::STATUS_UNKNOWN;
}
void InstantiationEngine::checkOwnership(Node q)
{
- if( options::strictTriggers() && q.getNumChildren()==3 ){
+ if (options::userPatternsQuant() == options::UserPatMode::STRICT
+ && q.getNumChildren() == 3)
+ {
//if strict triggers, take ownership of this quantified formula
bool hasPat = false;
- for( unsigned i=0; i<q[2].getNumChildren(); i++ ){
- if( q[2][i].getKind()==INST_PATTERN || q[2][i].getKind()==INST_NO_PATTERN ){
+ for (const Node& qc : q)
+ {
+ if (qc.getKind() == INST_PATTERN || qc.getKind() == INST_NO_PATTERN)
+ {
hasPat = true;
break;
}
bool QAttributes::isStandard() const
{
- return !d_sygus && !d_quant_elim && !isFunDef() && d_name.isNull()
- && !d_isInternal;
+ return !d_sygus && !d_quant_elim && !isFunDef() && !d_isInternal;
}
QuantAttributes::QuantAttributes() {}
* perform destructive updates (variable elimination, miniscoping, etc).
*
* A quantified formula is not standard if it is sygus, one for which
- * we are performing quantifier elimination, is a function definition, or
- * has a name.
+ * we are performing quantifier elimination, or is a function definition.
*/
bool isStandard() const;
};
{
bool is_strict_trigger =
qa.d_hasPattern
- && options::userPatternsQuant() == options::UserPatMode::TRUST;
+ && options::userPatternsQuant() == options::UserPatMode::STRICT;
bool is_std = qa.isStandard() && !is_strict_trigger;
if (computeOption == COMPUTE_ELIM_SYMBOLS)
{
regress0/quantifiers/issue5645-dt-cm-spurious.smt2
regress0/quantifiers/issue5693-prenex.smt2
regress0/quantifiers/issue6603-dt-bool-cegqi.smt2
+ regress0/quantifiers/issue6996-trivial-elim.smt2
regress0/quantifiers/lra-triv-gn.smt2
regress0/quantifiers/macro-back-subs-sat.smt2
regress0/quantifiers/macros-int-real.smt2
--- /dev/null
+(set-logic ALL)
+(set-info :status unsat)
+(declare-datatypes ((@ 0)) (((V))))
+(declare-fun I (@ Int) Bool)
+(assert (forall ((v @) (i Int)) (! false :qid |outputbpl.122:24| :pattern ((I v i)))))
+(check-sat)