File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -11,27 +11,27 @@ using namespace std;
1111
1212namespace smt {
1313
14- void AndExpr::add (const expr &e) {
14+ void AndExpr::add (const expr &e, unsigned limit ) {
1515 if (e.isTrue ())
1616 return ;
1717
1818 expr a, b;
19- if (e.isAnd (a, b)) {
20- add (move (a));
21- add (move (b));
19+ if (limit > 0 && e.isAnd (a, b)) {
20+ add (move (a), limit- 1 );
21+ add (move (b), limit- 1 );
2222 return ;
2323 }
2424 exprs.insert (e);
2525}
2626
27- void AndExpr::add (expr &&e) {
27+ void AndExpr::add (expr &&e, unsigned limit ) {
2828 if (e.isTrue ())
2929 return ;
3030
3131 expr a, b;
32- if (e.isAnd (a, b)) {
33- add (move (a));
34- add (move (b));
32+ if (limit > 0 && e.isAnd (a, b)) {
33+ add (move (a), limit- 1 );
34+ add (move (b), limit- 1 );
3535 return ;
3636 }
3737 exprs.insert (move (e));
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ class AndExpr {
2424 template <typename T>
2525 AndExpr (T &&e) { add (std::forward<T>(e)); }
2626
27- void add (const expr &e);
28- void add (expr &&e);
27+ void add (const expr &e, unsigned limit = 16 );
28+ void add (expr &&e, unsigned limit = 16 );
2929 void add (const AndExpr &other);
3030 void del (const AndExpr &other);
3131 void reset ();
You can’t perform that action at this time.
0 commit comments