Fixes cases where models can be wrong for FMF with Boolean variables in the bodies of quantified formulas.
Fixes #6744, all benchmarks on that issue are fixed. This PR adds 2 of the regressions from that issue.
Node r = n;
if( !n.isConst() ){
TypeNode tn = n.getType();
- if( !fm->hasTerm(n) && tn.isFirstClass() ){
- r = getSomeDomainElement(fm, tn );
+ if (!fm->hasTerm(n) && tn.isFirstClass())
+ {
+ // if the term is unknown, we do not assume any value for it
+ r = Node::null();
+ }
+ else
+ {
+ r = fm->getRepresentative(r);
}
- r = fm->getRepresentative( r );
}
Trace("fmc-debug") << "Add constant entry..." << std::endl;
d.addEntry(fm, mkCondDefault(fm, f), r);
regress1/fmf/issue4225-univ-fun.smt2
regress1/fmf/issue5738-dt-interp-finite.smt2
regress1/fmf/issue6690-re-enum.smt2
+ regress1/fmf/issue6744-2-unc-bool-var.smt2
+ regress1/fmf/issue6744-3-unc-bool-var.smt2
regress1/fmf/issue916-fmf-or.smt2
regress1/fmf/jasmin-cdt-crash.smt2
regress1/fmf/loopy_coda.smt2
--- /dev/null
+(set-logic ALL)
+(set-option :finite-model-find true)
+(set-info :status sat)
+(declare-fun v () Bool)
+(declare-fun v2 () Bool)
+(assert (exists ((q (Array Bool (Array Bool (Array Int Bool))))) (forall ((q3 (Array Bool (Array Bool (Array Int Bool))))) (xor v2 v2 v v2 (or v2 (not (= q3 q)))))))
+(check-sat)
--- /dev/null
+(set-logic UFC)
+(set-info :status sat)
+(declare-fun v () Bool)
+(assert (and (forall ((q Bool)) (not (xor v (exists ((q Bool)) true) (and (not v) (not q)))))))
+(check-sat)