From cf5376c18d8e4d6b3ed2d7b341279cf65fc16418 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 17 Aug 2021 12:07:00 -0500 Subject: Fix policy for eliminating quantified formulas (#7017) This also consolidates the option strictTriggers into userPatMode. Fixes #6996. --- src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp | 5 ++++- src/theory/quantifiers/ematching/instantiation_engine.cpp | 10 +++++++--- src/theory/quantifiers/quantifiers_attributes.cpp | 3 +-- src/theory/quantifiers/quantifiers_attributes.h | 3 +-- src/theory/quantifiers/quantifiers_rewriter.cpp | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) (limited to 'src/theory') diff --git a/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp b/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp index ab237fc6c..8901ec314 100644 --- a/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp +++ b/src/theory/quantifiers/ematching/inst_strategy_e_matching.cpp @@ -111,7 +111,10 @@ InstStrategyStatus InstStrategyAutoGenTriggers::process(Node f, 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; } diff --git a/src/theory/quantifiers/ematching/instantiation_engine.cpp b/src/theory/quantifiers/ematching/instantiation_engine.cpp index d490dce83..d9bec820c 100644 --- a/src/theory/quantifiers/ematching/instantiation_engine.cpp +++ b/src/theory/quantifiers/ematching/instantiation_engine.cpp @@ -200,11 +200,15 @@ bool InstantiationEngine::checkCompleteFor( Node q ) { 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