module STRINGS "theory/strings/options.h" Strings theory
option stringCharCardinality str-alphabet-card --str-alphabet-card=N int16_t :default 256 :read-write
- the cardinality of the characters used by the theory of string, default 256
+ the cardinality of the characters used by the theory of strings, default 256
option stringRegExpUnrollDepth str-regexp-depth --str-regexp-depth=N int16_t :default 10 :read-write
- the depth of unrolloing regular expression used by the theory of string, default 10
+ the depth of unrolloing regular expression used by the theory of strings, default 10
+
+option stringFMF fmf-strings --fmf-strings bool :default false
+ the finite model finding used by the theory of strings
endmodule
//option
d_regexp_unroll_depth = options::stringRegExpUnrollDepth();
+ d_fmf = options::stringFMF();
}
TheoryStrings::~TheoryStrings() {
Trace("strings-lemma") << "Strings: Add lemma " << n_len_geq_zero << std::endl;
d_out->lemma(n_len_geq_zero);
}
+ // FMF
+ if( d_fmf && n.getKind() == kind::VARIABLE ) {
+ if( std::find(d_in_vars.begin(), d_in_vars.end(), n) == d_in_vars.end() ) {
+ d_in_vars.push_back( n );
+ }
+ }
}
if (n.getType().isBoolean()) {
// Get triggered for both equal and dis-equal
} else if( a[i].getKind()==kind::NOT && a[i][0].getKind()==kind::EQUAL ){
Assert( hasTerm(a[i][0][0]) );
Assert( hasTerm(a[i][0][1]) );
- Assert( d_equalityEngine.areDisequal(a[i][0][0], a[i][0][1], true) );
+ AlwaysAssert( d_equalityEngine.areDisequal(a[i][0][0], a[i][0][1], true) );
}
if( exp ){
unsigned ps = antec_exp.size();
}
}
-/*
Node TheoryStrings::getNextDecisionRequest() {
- if( d_lit_to_decide_index.get()<d_lit_to_decide.size() ){
- Node l = d_lit_to_decide[d_lit_to_decide_index.get()];
- d_lit_to_decide_index.set( d_lit_to_decide_index.get() + 1 );
- Trace("strings-ind") << "Strings-ind : decide on " << l << std::endl;
- return l;
- }else{
- return Node::null();
+ if(d_fmf) {
+ Trace("strings-decide") << "Get next decision request." << std::endl;
+ Trace("strings-fmf-debug") << "Input variables: ";
+ for(std::vector< Node >::iterator itr = d_in_vars.begin();
+ itr != d_in_vars.end(); ++itr) {
+ Trace("strings-fmf-debug") << " " << (*itr) ;
+ }
+ Trace("strings-fmf-debug") << std::endl;
}
+
+ return Node::null();
}
-*/
+
}/* CVC4::theory::strings namespace */
}/* CVC4::theory namespace */
}/* CVC4 namespace */
bool propagate(TNode literal);
void explain( TNode literal, std::vector<TNode>& assumptions );
Node explain( TNode literal );
+ Node getNextDecisionRequest();
// NotifyClass for equality engine
Node d_true;
Node d_false;
Node d_zero;
+ // Finite Model Finding
+ bool d_fmf;
+ std::vector< Node > d_in_vars;
// RegExp depth
int d_regexp_unroll_depth;
//list of pairs of nodes to merge