// build term index
d_eqcInfo.clear();
d_termIndex.clear();
- d_stringsEqc.clear();
+ d_stringLikeEqc.clear();
Trace("strings-base") << "BaseSolver::checkInit" << std::endl;
// count of congruent, non-congruent per operator (independent of type),
std::map<Kind, TermIndex>& tti = d_termIndex[tn];
if (tn.isStringLike())
{
- d_stringsEqc.push_back(eqc);
+ d_stringLikeEqc.push_back(eqc);
emps = Word::mkEmptyWord(tn);
}
Node var;
// between lengths of string terms that are disequal (DEQ-LENGTH-SP).
std::map<TypeNode, std::vector<std::vector<Node> > > cols;
std::map<TypeNode, std::vector<Node> > lts;
- d_state.separateByLength(d_stringsEqc, cols, lts);
+ d_state.separateByLength(d_stringLikeEqc, cols, lts);
for (std::pair<const TypeNode, std::vector<std::vector<Node> > >& c : cols)
{
checkCardinalityType(c.first, c.second, lts[c.first]);
return Node::null();
}
-const std::vector<Node>& BaseSolver::getStringEqc() const
+const std::vector<Node>& BaseSolver::getStringLikeEqc() const
{
- return d_stringsEqc;
+ return d_stringLikeEqc;
}
Node BaseSolver::TermIndex::add(TNode n,
/**
* Get the set of equivalence classes of type string.
*/
- const std::vector<Node>& getStringEqc() const;
+ const std::vector<Node>& getStringLikeEqc() const;
//-----------------------end query functions
private:
* for more information.
*/
std::map<Node, BaseEqcInfo> d_eqcInfo;
- /** The list of equivalence classes of type string */
- std::vector<Node> d_stringsEqc;
+ /** The list of equivalence classes of string-like types */
+ std::vector<Node> d_stringLikeEqc;
/** A term index for each type, function kind pair */
std::map<TypeNode, std::map<Kind, TermIndex> > d_termIndex;
/** the cardinality of the alphabet */
d_eqc.clear();
// Rebuild strings eqc based on acyclic ordering, first copy the equivalence
// classes from the base solver.
- const std::vector<Node>& eqc = d_bsolver.getStringEqc();
+ const std::vector<Node>& eqc = d_bsolver.getStringLikeEqc();
d_strings_eqc.clear();
for (const Node& r : eqc)
{
void TheoryStrings::checkRegisterTermsPreNormalForm()
{
- const std::vector<Node>& seqc = d_bsolver.getStringEqc();
+ const std::vector<Node>& seqc = d_bsolver.getStringLikeEqc();
for (const Node& eqc : seqc)
{
eq::EqClassIterator eqc_i = eq::EqClassIterator(eqc, d_equalityEngine);
// str.code applied to the proxy variables for each equivalence classes that
// are constants of size one
std::vector<Node> const_codes;
- const std::vector<Node>& seqc = d_bsolver.getStringEqc();
+ const std::vector<Node>& seqc = d_bsolver.getStringLikeEqc();
for (const Node& eqc : seqc)
{
+ if (!eqc.getType().isString())
+ {
+ continue;
+ }
+
NormalForm& nfe = d_csolver.getNormalForm(eqc);
if (nfe.d_nf.size() == 1 && nfe.d_nf[0].isConst())
{
void TheoryStrings::checkRegisterTermsNormalForms()
{
- const std::vector<Node>& seqc = d_bsolver.getStringEqc();
+ const std::vector<Node>& seqc = d_bsolver.getStringLikeEqc();
for (const Node& eqc : seqc)
{
NormalForm& nfi = d_csolver.getNormalForm(eqc);
regress0/seq/issue5665-invalid-model.smt2
regress0/seq/issue6337-seq.smt2
regress0/seq/len_simplify.smt2
+ regress0/seq/proj-issue340.smt2
regress0/seq/seq-2var.smt2
regress0/seq/seq-ex1.smt2
regress0/seq/seq-ex2.smt2
--- /dev/null
+(set-logic QF_SLIA)
+(declare-const x0 Bool)
+(declare-const x2 (Seq Bool))
+(declare-const i Int)
+(assert (= i (str.to_int (str.from_code (seq.len x2)))))
+(assert (not (seq.nth x2 i)))
+(assert (>= i 0))
+(set-info :status sat)
+(check-sat)