default = "false"
help = "use triggers that do not contain all free variables"
+[[option]]
+ name = "consExpandTriggers"
+ category = "regular"
+ long = "cons-exp-triggers"
+ type = "bool"
+ default = "false"
+ help = "use constructor expansion for single constructor datatypes triggers"
+
[[option]]
name = "multiTriggerWhenSingle"
category = "regular"
d_eqc = eqc;
d_op = op;
d_termIterList = d_treg.getTermDatabase()->getGroundTermList(d_op);
- if (d_termIterList == nullptr)
- {
- d_mode = cand_term_none;
- }
- else if (eqc.isNull())
+ if (eqc.isNull())
{
d_mode = cand_term_db;
}else{
Node CandidateGeneratorQE::getNextCandidateInternal()
{
if( d_mode==cand_term_db ){
- Assert(d_termIterList != nullptr);
+ if (d_termIterList == nullptr)
+ {
+ d_mode = cand_term_none;
+ return Node::null();
+ }
Debug("cand-gen-qe") << "...get next candidate in tbd" << std::endl;
//get next candidate term in the uf term database
- size_t tlSize = d_termIterList->d_list.size();
- while (d_termIter < tlSize)
+ size_t tlLimit = d_termIterList->d_list.size();
+ while (d_termIter < tlLimit)
{
Node n = d_termIterList->d_list[d_termIter];
d_termIter++;
d_termIter = 0;
if (eqc.isNull())
{
- d_termIterList = d_treg.getTermDatabase()->getGroundTermList(d_op);
- d_mode = d_termIterList == nullptr ? cand_term_none : cand_term_db;
+ // generates too many instantiations at top-level when eqc is null, thus
+ // set mode to none unless option is set.
+ if (options::consExpandTriggers())
+ {
+ d_termIterList = d_treg.getTermDatabase()->getGroundTermList(d_op);
+ d_mode = cand_term_db;
+ }
+ else
+ {
+ d_mode = cand_term_none;
+ }
}
else
{
* This modifies the candidates t1, ..., tn generated by CandidateGeneratorQE
* so that they are "expansions" of a fixed datatype constructor C. Assuming
* C has arity m, we instead return the stream:
- * C(sel_1( t1 ), ..., sel_m( tn )) ... C(sel_1( t1 ), ..., C( sel_m( tn ))
+ * C(sel_1( t1 ), ..., sel_m( t1 )) ... C(sel_1( tn ), ..., C( sel_m( tn ))
* where sel_1 ... sel_m are the selectors of C.
*/
class CandidateGeneratorConsExpand : public CandidateGeneratorQE