Fixes a spurious error on kind benchmarks.
Note that we don't properly handle instantiated sort constructors currently, which I believe need to be handled as declared sorts when calling getModel.
api::Sort DeclareSortCommand::getSort() const { return d_sort; }
void DeclareSortCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
- // mark that it will be printed in the model
- sm->addModelDeclarationSort(d_sort);
+ // mark that it will be printed in the model, if it is an uninterpreted
+ // sort (arity 0)
+ if (d_arity == 0)
+ {
+ sm->addModelDeclarationSort(d_sort);
+ }
d_commandStatus = CommandSuccess::instance();
}
regress0/parser/define_sort.smt2
regress0/parser/force_logic_set_logic.smt2
regress0/parser/force_logic_success.smt2
+ regress0/parser/get-model-sort-constructor.smt2
regress0/parser/issue5163.smt2
regress0/parser/issue6908-get-value-uc.smt2
regress0/parser/issue7274.smt2
--- /dev/null
+; EXPECT: sat
+; EXPECT: (
+; EXPECT: )
+(set-option :produce-models true)
+(set-logic QF_UFLIRA)
+(declare-sort FArray 2)
+(check-sat)
+(get-model)