-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewriting: Do not collect rewritten arithmetic inequalities
The information about which inequalities originated from arithmetic equalities were recorded during preprocessing. However, this makes it difficult to separate preprocessing passes and make them more independent, i.e., so we can run them on single formula as well as on group of formulas. If this information is needed, it should be obtain in a different way. At the moment, this information is only used by the lookahead solver for partitioning, where the strategy is to not split on such inequalities. However, I do not see benefit in such strategy. Since the need to record this information is blocking further refactoring that has the potential to unlock performance improvements in incremental solving, I propose to just not record this information anymore.
- Loading branch information
Showing
4 changed files
with
3 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2021-2023, Martin Blicha <[email protected]> | ||
* Copyright (c) 2021-2024, Martin Blicha <[email protected]> | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
|
@@ -12,14 +12,9 @@ | |
|
||
class EqualityRewriterConfig : public DefaultRewriterConfig { | ||
ArithLogic & logic; | ||
std::unique_ptr<Map<PTRef, bool, PTRefHash>> notOkToPartition; | ||
|
||
public: | ||
EqualityRewriterConfig(ArithLogic & logic) : logic(logic), notOkToPartition(new Map<PTRef, bool, PTRefHash>()) {} | ||
|
||
std::unique_ptr<Map<PTRef, bool, PTRefHash>> getAndClearNotOkToPartition() { | ||
return std::exchange(notOkToPartition, std::make_unique<Map<PTRef, bool, PTRefHash>>()); | ||
} | ||
explicit EqualityRewriterConfig(ArithLogic & logic) : logic(logic) {} | ||
|
||
bool previsit(PTRef term) override { return logic.hasSortBool(term) and not logic.isIte(term); } | ||
|
||
|
@@ -30,8 +25,6 @@ class EqualityRewriterConfig : public DefaultRewriterConfig { | |
PTRef a2 = p[1]; | ||
PTRef i1 = logic.mkLeq(a1, a2); | ||
PTRef i2 = logic.mkGeq(a1, a2); | ||
notOkToPartition->insert(i1, true); | ||
notOkToPartition->insert(i2, true); | ||
term = logic.mkAnd(i1, i2); | ||
} | ||
return term; | ||
|
@@ -44,9 +37,6 @@ class ArithmeticEqualityRewriter : public Rewriter<EqualityRewriterConfig> { | |
public: | ||
explicit ArithmeticEqualityRewriter(ArithLogic & logic) | ||
: Rewriter<EqualityRewriterConfig>(logic, config), config(logic) {} | ||
std::unique_ptr<Map<PTRef, bool, PTRefHash>> getAndClearNotOkToPartition() { | ||
return config.getAndClearNotOkToPartition(); | ||
} | ||
}; | ||
|
||
#endif // OPENSMT_ARITHMETICEQUALITYREWRITER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters