id = "DATATYPES"
name = "Datatypes Theory"
-# How to handle selectors applied to incorrect constructors. If this option is set,
-# then we do not rewrite such a selector term to an arbitrary ground term.
-# For example, by default cvc5 considers cdr( nil ) = nil. If this option is set, then
-# cdr( nil ) has no set value.
-[[option]]
- name = "dtRewriteErrorSel"
- category = "expert"
- long = "dt-rewrite-error-sel"
- type = "bool"
- default = "false"
- help = "rewrite incorrectly applied selectors to arbitrary ground term"
-
-[[option]]
- name = "dtForceAssignment"
- category = "regular"
- long = "dt-force-assignment"
- type = "bool"
- default = "false"
- help = "force the datatypes solver to give specific values to all datatypes terms before answering sat"
-
[[option]]
name = "dtPoliteOptimize"
category = "expert"
d_true = NodeManager::currentNM()->mkConst( true );
d_zero = NodeManager::currentNM()->mkConstInt(Rational(0));
- d_dtfCounter = 0;
// indicate we are using the default theory state object
d_theoryState = &d_state;
}
}
}
- //if we want to force an assignment of constructors to all ground eqc
- //d_dtfCounter++;
- if (!needSplit && options().datatypes.dtForceAssignment
- && d_dtfCounter % 2 == 0)
- {
- Trace("datatypes-force-assign") << "Force assignment for " << n << std::endl;
- needSplit = true;
- consIndex = fconsIndex!=-1 ? fconsIndex : consIndex;
- }
if( needSplit ) {
if( dt.getNumConstructors()==1 ){
BoolMap d_collectTermsCacheU;
/** All the function terms that the theory has seen */
context::CDList<TNode> d_functionTerms;
- /** counter for forcing assignments (ensures fairness) */
- unsigned d_dtfCounter;
/** uninterpreted constant to variable map */
std::map< Node, Node > d_uc_to_fresh_var;
private:
-; COMMAND-LINE: --cegqi --dt-rewrite-error-sel
+; COMMAND-LINE: --cegqi
; EXPECT: unsat
(set-logic ALL)
(declare-datatypes ((List 0)) (((cons (head Int) (tail List)) (nil))))
-; COMMAND-LINE: --finite-model-find --dt-rewrite-error-sel -q
+; COMMAND-LINE: --finite-model-find -q
; EXPECT: sat
(set-logic ALL)
(declare-datatypes ((Nat 0) (Lst 0)) (((succ (pred Nat)) (zero)) ((cons (hd Nat) (tl Lst)) (nil))))