Fixes #8118.
type = "bool"
help = "after SAT/INVALID/UNKNOWN, check that the generated model satisfies user and internal assertions"
+[[option]]
+ name = "modelVarElimUneval"
+ category = "expert"
+ long = "model-var-elim-uneval"
+ type = "bool"
+ default = "true"
+ help = "allow variable elimination based on unevaluatable terms to variables"
+
[[option]]
name = "modelCoresMode"
category = "regular"
{
return false;
}
- if (!options().smt.produceModels && !logicInfo().isQuantified())
+ if (!options().smt.produceModels || options().smt.modelVarElimUneval)
{
- // Don't care about the model and logic is not quantified, we can eliminate.
+ // Don't care about the model, or we allow variables to be eliminated by
+ // unevaluatable terms, we can eliminate. Notice that when
+ // options().smt.modelVarElimUneval is true, val may contain unevaluatable
+ // kinds. This means that e.g. a Boolean variable may be eliminated based on
+ // an equality (= b (forall ((x)) (P x))), where its model value is (forall
+ // ((x)) (P x)).
return true;
}
// If models are enabled, then it depends on whether the term contains any
regress1/nl/issue7924-sqrt-partial.smt2
regress1/nl/issue8016-iand-rewrite.smt2
regress1/nl/issue8052-iand-rewrite.smt2
+ regress1/nl/issue8118-elim-sin.smt2
regress1/nl/metitarski-1025.smt2
regress1/nl/metitarski-3-4.smt2
regress1/nl/metitarski_3_4_2e.smt2
--- /dev/null
+(set-logic ALL)
+(set-info :status sat)
+(declare-sort R 0)
+(declare-fun m (R R) Bool)
+(declare-fun e () R)
+(declare-fun t () R)
+(declare-fun v () Real)
+(declare-fun x () R)
+(assert (= (m x e) (distinct (m x t) (m x x))))
+(assert (= v (sin 1.0)))
+(check-sat)
-; EXIT: 1
-; EXPECT: (error "Extended set operators are not supported in default mode, try --sets-ext.")
(set-logic ALL)
(set-option :incremental true)
(set-option :produce-models true)
+(set-info :status sat)
(declare-fun x () (Set Bool))
(declare-fun y () (Set Bool))
(declare-fun z () (Set Bool))
(check-sat)
(pop 1)
-
-(get-model)
-; COMMAND-LINE: --produce-models
-; EXPECT: (error "Extended set operators are not supported in default mode, try --sets-ext.")
-; EXIT: 1
+; EXPECT: sat
(set-logic ALL)
+(set-info :status sat)
(declare-fun a () Int)
(declare-fun f ((Set Bool)) Int)
(declare-fun s () (Set Bool))