bool Smt2::getTesterName(api::Term cons, std::string& name)
{
- if (v2_6() && strictModeEnabled())
+ if ((v2_6() || sygus_v2()) && strictModeEnabled())
{
// 2.6 or above uses indexed tester symbols, if we are in strict mode,
// we do not automatically define is-cons for constructor cons.
return ilang == language::input::LANG_SYGUS
|| ilang == language::input::LANG_SYGUS_V2;
}
+
bool Smt2::sygus_v1() const
{
return getLanguage() == language::input::LANG_SYGUS;
}
+bool Smt2::sygus_v2() const
+{
+ return getLanguage() == language::input::LANG_SYGUS_V2;
+}
+
void Smt2::setInfo(const std::string& flag, const SExpr& sexpr) {
// TODO: ???
}
bool sygus() const;
/** Are we using the sygus version 1.0 format? */
bool sygus_v1() const;
+ /** Are we using the sygus version 2.0 format? */
+ bool sygus_v2() const;
/**
* Returns true if the language that we are parsing (SMT-LIB version >=2.5
; EXPECT: unsat
; COMMAND-LINE: --lang=sygus2 --cegqi-si=all --sygus-out=status
-(set-logic LIA)
+(set-logic DTLIA)
(declare-datatypes ((List 0)) (((cons (head Int) (tail List)) (nil))))
(declare-var x Int)
-(constraint (is-cons (f x)))
+(constraint ((_ is cons) (f x)))
(constraint (and (= (head (f x)) x) (= (head (f x)) (+ 5 (head (tail (f x)))))))
(check-synth)