new (&d_str) String;
d_str = other.d_str;
break;
+ case UCONST:
+ new (&d_uc)
+ UninterpretedConstant(other.d_uc.getType(), other.d_uc.getIndex());
+ break;
case INVALID: break;
}
}
new (&d_str) String;
d_str = other.d_str;
break;
+ case UCONST:
+ new (&d_uc)
+ UninterpretedConstant(other.d_uc.getType(), other.d_uc.getIndex());
+ break;
case INVALID: break;
}
}
{
d_str.~String();
break;
-
- default: break;
}
+ case UCONST:
+ {
+ d_uc.~UninterpretedConstant();
+ break;
+ }
+ default: break;
}
}
case EvalResult::BITVECTOR: return nm->mkConst(d_bv);
case EvalResult::RATIONAL: return nm->mkConst(d_rat);
case EvalResult::STRING: return nm->mkConst(d_str);
+ case EvalResult::UCONST: return nm->mkConst(d_uc);
default:
{
Trace("evaluator") << "Missing conversion from " << d_tag << " to node"
results[currNode] = EvalResult(r);
break;
}
-
+ case kind::UNINTERPRETED_CONSTANT:
+ {
+ const UninterpretedConstant& uc =
+ currNodeVal.getConst<UninterpretedConstant>();
+ results[currNode] = EvalResult(uc);
+ break;
+ }
case kind::PLUS:
{
Rational res = results[currNode[0]].d_rat;
results[currNode] = EvalResult(lhs.d_str == rhs.d_str);
break;
}
+ case EvalResult::UCONST:
+ {
+ results[currNode] = EvalResult(lhs.d_uc == rhs.d_uc);
+ break;
+ }
default:
{
#include "base/output.h"
#include "expr/node.h"
+#include "expr/uninterpreted_constant.h"
#include "util/bitvector.h"
#include "util/rational.h"
#include "util/string.h"
BITVECTOR,
RATIONAL,
STRING,
+ UCONST,
INVALID
} d_tag;
BitVector d_bv;
Rational d_rat;
String d_str;
+ UninterpretedConstant d_uc;
};
EvalResult(const EvalResult& other);
EvalResult(const BitVector& bv) : d_tag(BITVECTOR), d_bv(bv) {}
EvalResult(const Rational& i) : d_tag(RATIONAL), d_rat(i) {}
EvalResult(const String& str) : d_tag(STRING), d_str(str) {}
+ EvalResult(const UninterpretedConstant& u) : d_tag(UCONST), d_uc(u) {}
EvalResult& operator=(const EvalResult& other);
regress1/sygus/dt-test-ns.sy
regress1/sygus/dup-op.sy
regress1/sygus/error1-dt.sy
+ regress1/sygus/eval-uc.sy
regress1/sygus/extract.sy
regress1/sygus/fast-enum-backtrack.sy
regress1/sygus/fg_polynomial3.sy
--- /dev/null
+; EXPECT: unsat
+; COMMAND-LINE: --lang=sygus2 --sygus-out=status --uf-ho
+(set-logic ALL)
+(declare-sort S 0)
+(declare-var f Bool)
+(declare-var u (-> S Bool))
+(declare-var new_f Bool)
+(declare-var new_u (-> S Bool))
+(define-fun init ((f Bool) (u (-> S Bool))) Bool (and f (forall ((x S)) (not (u x)))))
+(define-fun trans ((f Bool) (u (-> S Bool)) (new_f Bool) (new_u (-> S Bool))) Bool (and (not new_f) (exists ((x S)) (forall ((y S)) (= (new_u y) (or (u y) (= y x)))))))
+;(define-fun trans ((f Bool) (u (-> S Bool)) (new_f Bool) (new_u (-> S Bool))) Bool (and new_f (exists ((x S)) (forall ((y S)) (= (new_u y) (or (u y) (= y x)))))))
+(synth-fun inv_matrix ((f Bool) (u (-> S Bool)) (x S)) Bool ((Start Bool)) ((Start Bool ( (or (not
+(u x)) (not f))))))
+(define-fun inv ((f Bool) (u (-> S Bool))) Bool (forall ((x S)) (inv_matrix f u x)))
+(constraint (=> (and (inv f u) (trans f u new_f new_u)) (inv new_f new_u)))
+(check-synth)