-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract multi-patterns when pattern can be decomposed
deals with fluke regression for F* reported by Guido Martinez Background: The automatic pattern inference facility looks for terms that contains all bound variables of a quantifier. It may end up with a term that contains all bound variables but the extracted term can be simplified. Example. The pattern (ApplyTT (ApplyTT @X3!1 (ApplyTT @X4!0 (:var 1))) (ApplyTT @X4!0 (:var 0))) can be decomposed into a multi-pattern (ApplyTT @X4!0 (:var 1))) (ApplyTT @X4!0 (:var 0)) The multi-pattern may enable a quantifier instantiation while the original pattern does not. The multi-pattern should be preferred. The regression showed up based on a change that should not be considered harmful but turned out to be noticeable. The change was a simplification of and-or expressions based on sorting. This played with the case split queue used by F* (smt.case_split = 3) that uses a top-level case split of clauses to avoid redundant branches. The net effect was that without sorting, the benchmarks would always choose the opportune branch that enabled matching against the larger term. With sorting it would mostly choose inopportune branches.
- Loading branch information
1 parent
a849a29
commit a62e4b2
Showing
3 changed files
with
43 additions
and
2 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