d_normal_forms.clear();
d_normal_forms_exp.clear();
std::map< Node, Node > nf_to_eqc;
+ std::map< Node, Node > eqc_to_nf;
std::map< Node, Node > eqc_to_exp;
for( unsigned i=0; i<d_strings_eqc.size(); i++ ) {
Node eqc = d_strings_eqc[i];
sendInference( nf_exp, eq, "Normal_Form" );
} else {
nf_to_eqc[nf_term] = eqc;
+ eqc_to_nf[eqc] = nf_term;
eqc_to_exp[eqc] = mkAnd( d_normal_forms_exp[eqc] );
}
}
if( !hasProcessed() ){
if(Trace.isOn("strings-nf")) {
Trace("strings-nf") << "**** Normal forms are : " << std::endl;
- for( std::map< Node, Node >::iterator it = nf_to_eqc.begin(); it != nf_to_eqc.end(); ++it ){
- Trace("strings-nf") << " N[" << it->second << "] = " << it->first << std::endl;
- Trace("strings-nf") << " exp: " << eqc_to_exp[it->first] << std::endl;
+ for( std::map< Node, Node >::iterator it = eqc_to_exp.begin(); it != eqc_to_exp.end(); ++it ){
+ Trace("strings-nf") << " N[" << it->first << "] (base " << d_normal_forms_base[it->first] << ") = " << eqc_to_nf[it->first] << std::endl;
+ Trace("strings-nf") << " exp: " << it->second << std::endl;
}
Trace("strings-nf") << std::endl;
}
}
getConcatVec( eqc_c, d_normal_forms[eqc] );
d_normal_forms_base[eqc] = eqc_c;
+ if( eqc_c!=eqc ){
+ d_normal_forms_exp[eqc].push_back( eqc_c.eqNode( eqc ) );
+ }
}else{
int nf_index = 0;
//nf.insert( nf.end(), normal_forms[nf_index].begin(), normal_forms[nf_index].end() );
cmu-2db2-extf-reg.smt2 \
norn-nel-bug-052116.smt2 \
cmu-disagree-0707-dd.smt2 \
- cmu-5042-0707-2.smt2
+ cmu-5042-0707-2.smt2 \
+ cmu-dis-0707-3.smt2
FAILING_TESTS =
# and make sure to distribute it
EXTRA_DIST +=
+#norn-dis-0707-3.smt2
+
# synonyms for "check"
.PHONY: regress regress0 test
regress regress0 test: check
--- /dev/null
+(set-logic ALL_SUPPORTED)
+(set-info :status sat)
+(set-option :strings-exp true)
+(declare-fun value () String)
+(declare-fun name () String)
+(assert (not (not (not (= (ite (str.contains value "?") 1 0) 0)))))
+(assert (not (not (= (ite (str.contains value "#") 1 0) 0))))
+(assert (not (not (= (ite (= (str.substr value 0 (- 2 0)) "//") 1 0) 0))))
+(assert (not (not (= (ite (> (str.indexof value ":" 0) 0) 1 0) 0))))
+(assert (not (= (ite (not (= (str.len value) 0)) 1 0) 0)))
+(assert (not (not (= (ite (str.contains value "'") 1 0) 0))))
+(assert (not (not (= (ite (str.contains value "\"") 1 0) 0))))
+(assert (not (not (= (ite (str.contains value ">") 1 0) 0))))
+(assert (not (not (= (ite (str.contains value "<") 1 0) 0))))
+(assert (not (not (= (ite (str.contains value "&") 1 0) 0))))
+(assert (not (not (= (ite (str.contains name "'") 1 0) 0))))
+(assert (not (not (= (ite (str.contains name "\"") 1 0) 0))))
+(assert (not (not (= (ite (str.contains name ">") 1 0) 0))))
+(assert (not (not (= (ite (str.contains name "<") 1 0) 0))))
+(assert (not (not (= (ite (str.contains name "&") 1 0) 0))))
+(assert (not (= (ite (not (= value "")) 1 0) 0)))
+(assert (not (= (ite (str.contains value "javascript:alert(1);") 1 0) 0)))
+(assert (not (not (= (ite (str.contains name "javascript:alert(1);") 1 0) 0))))
+(check-sat)
--- /dev/null
+(set-logic QF_S)
+(set-info :status sat)
+(set-option :strings-exp true)
+
+(declare-fun var_0 () String)
+(declare-fun var_1 () String)
+(declare-fun var_2 () String)
+(declare-fun var_3 () String)
+(declare-fun var_4 () String)
+(declare-fun var_5 () String)
+(declare-fun var_6 () String)
+(declare-fun var_7 () String)
+(declare-fun var_8 () String)
+(declare-fun var_9 () String)
+(declare-fun var_10 () String)
+(declare-fun var_11 () String)
+(declare-fun var_12 () String)
+
+(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (str.to.re "a") (re.++ (str.to.re "b") (re.++ (re.* (re.union (str.to.re "b") (str.to.re "a"))) (str.to.re "z"))))) (re.++ (str.to.re "b") (re.* (re.union (str.to.re "b") (str.to.re "a")))))))
+(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (re.union (str.to.re "z") (str.to.re "a")) (re.++ (str.to.re "b") (re.++ (re.* (str.to.re "b")) (re.union (str.to.re "z") (str.to.re "a")))))) (re.++ (str.to.re "b") (re.* (str.to.re "b"))))))
+(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (str.to.re "a") (re.++ (str.to.re "b") (re.++ (re.* (re.union (str.to.re "z") (str.to.re "a"))) (str.to.re "b"))))) (re.++ (str.to.re "b") (re.* (re.union (str.to.re "z") (str.to.re "a")))))))
+(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.* (re.++ (re.union (str.to.re "b") (str.to.re "a")) (re.++ (re.* (str.to.re "a")) (re.union (str.to.re "z") (str.to.re "b")))))))
+(assert (str.in.re var_9 (re.* (re.range "a" "u"))))
+(assert (str.in.re var_8 (re.* (re.range "a" "u"))))
+(assert (not (str.in.re (str.++ "b" var_8 "z" "b" var_9 ) (re.++ (re.* (re.++ (str.to.re "b") (str.to.re "z"))) (str.to.re "b")))))
+(check-sat)