From: Tianyi Liang Date: Tue, 3 Dec 2013 19:53:47 +0000 (-0600) Subject: string fmf perfomance fix X-Git-Tag: cvc5-1.0.0~7218^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=359258592d0b048645f53a6f77d52a72177c128f;p=cvc5.git string fmf perfomance fix --- diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp index 4e20ac248..a4c0c00b8 100644 --- a/src/theory/strings/theory_strings.cpp +++ b/src/theory/strings/theory_strings.cpp @@ -356,12 +356,12 @@ void TheoryStrings::preRegisterTerm(TNode n) { if(n.getKind() == kind::VARIABLE || n.getKind()==kind::SKOLEM) { if( std::find( d_length_intro_vars.begin(), d_length_intro_vars.end(), n )==d_length_intro_vars.end() ){ Node n_len = NodeManager::currentNM()->mkNode( kind::STRING_LENGTH, n); - //Node n_len_geq_zero = NodeManager::currentNM()->mkNode( kind::GEQ, n_len, d_zero); - Node n_len_geq_zero = NodeManager::currentNM()->mkNode( kind::OR, - n_len.eqNode( d_zero ), - NodeManager::currentNM()->mkNode( kind::GT, n_len, d_zero) ); + Node n_len_eq_z = n_len.eqNode( d_zero ); + Node n_len_geq_zero = NodeManager::currentNM()->mkNode( kind::OR, n_len_eq_z, + NodeManager::currentNM()->mkNode( kind::GT, n_len, d_zero) ); Trace("strings-lemma") << "Strings::Lemma LENGTH geq 0 : " << n_len_geq_zero << std::endl; d_out->lemma(n_len_geq_zero); + d_out->requirePhase( n_len_eq_z, true ); } // FMF if( n.getKind() == kind::VARIABLE ) {//options::stringFMF() &&