-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve match before compile #2734
Merged
keyboardDrummer
merged 364 commits into
dafny-lang:master
from
keyboardDrummer:resolveMatchBeforeCompile
Jan 4, 2023
Merged
Changes from all commits
Commits
Show all changes
364 commits
Select commit
Hold shift + click to select a range
7527220
Small fix
keyboardDrummer bbeb012
Run formatter
keyboardDrummer 135fc5e
Refactor CompileNestedMatch
keyboardDrummer 2e86af7
Refactor CompileNestedMatch take2
keyboardDrummer ed423c9
Further refactoring of CompileNestedMatch
keyboardDrummer 1fdc9c9
Refactoring
keyboardDrummer 9edf54d
Fix bugs related to nested match constructs
keyboardDrummer ff6e47a
Move unnested match AST
keyboardDrummer 4127e8e
Override ToString for statements
keyboardDrummer 7a41faf
Fix accidental Body reuse bug
keyboardDrummer 58e711f
Printing changes
keyboardDrummer 63de739
Allow cloning with resolved fields
keyboardDrummer 619b238
PatternMatching.dfy passes
keyboardDrummer 7a11b6b
Ran formatter
keyboardDrummer c9a59df
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 6d89b73
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 3eaa042
More cloning if resolved fields
keyboardDrummer 373e422
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer ae8b336
Tiny refac
keyboardDrummer 4f32cec
Remove bad cast
keyboardDrummer e91b271
Ran formatter
keyboardDrummer 83c9458
Bring back pre-resolve processing of explicit bound variable types
keyboardDrummer a437955
Ran formatter
keyboardDrummer 5991bc6
Add missing type annotation
keyboardDrummer 6977673
Update cloner for all inheritors of ConcreteSyntaxExpression
keyboardDrummer f76bd59
NameSegment creation improvement, refactoring, and test updates
keyboardDrummer 40b5dfd
Let IdPattern use a BoundVar or LocalVariable depending on the contex…
keyboardDrummer 3ee3856
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer e2c2b71
Add missing clone
keyboardDrummer 4ee1f58
Remove obsolete print statement
keyboardDrummer 9afc71d
Various cloner and .Children fixes
keyboardDrummer 92a772f
Improve .Children, run formatter
keyboardDrummer 3f719e8
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 6396e5b
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer e06890a
Lambda related changes
keyboardDrummer a5a78af
Various fixes
keyboardDrummer 5b2711c
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer de2c3bb
Fix for CloneCallAndAddK
keyboardDrummer 1d902ea
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer 429d26a
Cloner improvements for AutoGenExpr
keyboardDrummer d498ecd
Ran formatter
keyboardDrummer 48372f0
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 5748253
Fixes for CloneXAndAddK
keyboardDrummer 80b04bb
Fixes
keyboardDrummer 9aceefd
Commit formatting changes
keyboardDrummer 88f74c7
Fix ChainingExpression
keyboardDrummer 0126747
Various fixes for CoPrefix
keyboardDrummer 9232cfb
ExtremeLemmaBodyCloner fix
keyboardDrummer cacb03c
Copy BoundVar.IsGhost when substituting
keyboardDrummer a3e83d7
Some IsGhost assignments that may be useful
keyboardDrummer 2b57634
Pat resolve order change
keyboardDrummer 2c7d126
Undo bug
keyboardDrummer ce10e4a
Fix children of Calc
keyboardDrummer c509ad8
Let cloner take into account reference and non-reference variables
keyboardDrummer 2493e34
Refactoring
keyboardDrummer 5bfffdd
Allow cloning resolved attributes
keyboardDrummer a430987
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer e7b58af
Allocated1 passes after computing ghost interesting after compiling N…
keyboardDrummer 788e907
CoPrefix passes
keyboardDrummer c432818
Add TODO
keyboardDrummer 943420b
Added null checks to make cloner more robust, Datatypes passes now
keyboardDrummer d6cf02d
Fix NoTypeArgs test
keyboardDrummer 962a39b
Fix CallStmt cloning
keyboardDrummer ffe829b
Move TailRecursion to separate class and add case for NestedMatch*
keyboardDrummer ed2b77b
Update BranchCoverage test expect tokens
keyboardDrummer 3b83c46
Update Various expect file
keyboardDrummer a9047ae
Update ghostness checks in NestedMatchStmt
keyboardDrummer da460ff
Fix Abstemious check and ModuleExport expect file
keyboardDrummer 19e23b5
Fix cloning of existsExpr
keyboardDrummer 81d2243
Substitution.dfy passes
keyboardDrummer 0c4f99e
Calculations passes
keyboardDrummer 33fc142
Going over all FilledByResolution attributes to make sure the cloner …
keyboardDrummer 72ffd01
More usages of ICloneable
keyboardDrummer d85c68c
Remove ConcreteSyntaxStatement since it's not used
keyboardDrummer 50f20fe
All FilledInByResolution Statements and Expressions now inherit from …
keyboardDrummer ce443b8
Fix cloning bugs
keyboardDrummer 11c24d8
Fix cloning bug in LetExpr
keyboardDrummer eafe06b
QuantifierExpr.SubExpressions 'fix', test update
keyboardDrummer efcf155
Update test
keyboardDrummer 4535ea1
Remove redundancy warnings
keyboardDrummer 11150be
Move illegal pattern check to resolution, away from nested match comp…
keyboardDrummer 6ddd2fc
Revert "Move illegal pattern check to resolution, away from nested ma…
keyboardDrummer 76aa52a
Less WOOP
keyboardDrummer dd11006
PatternMatchingErrors now passes
keyboardDrummer 9ecf20e
Moved extremaLemmaCloner files
keyboardDrummer b3b1359
constructorCaseWithoutParentheses passes
keyboardDrummer 84176d8
SimpleCompiler passes
keyboardDrummer 9711944
Override contracts with an empty implementation
keyboardDrummer 08ef2d8
Add contract class to overwrite contracts
keyboardDrummer 16b490a
Fix Children traversal for ApplySuffix and ActualBindings
keyboardDrummer 771f0a4
Fix trigger generation for NestedMatchExpr
keyboardDrummer 3c8fa3c
Clone stmt in nested match compilation
keyboardDrummer 335d711
Refactoring
keyboardDrummer 1c555c4
Cleanup
keyboardDrummer 6678b3b
Correctly clone Bounds, Wellfounded now passes
keyboardDrummer a1003d9
Ran formatter
keyboardDrummer b03409a
Fix refinement transformer
keyboardDrummer 3f4d176
Small cloner fixes
keyboardDrummer 6f3e5cb
Refactored out CheckTypeInferenceVisitor
keyboardDrummer 0741daf
Fix unary minus lit pattern check, and update 889b test
keyboardDrummer ce333da
Ran formatter
keyboardDrummer c977c9a
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 0a8c889
Add missing null check
keyboardDrummer 47200f4
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer 13ff3dc
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 70a3c69
Merge commit 'f65c111a' into resolveMatchBeforeCompile
keyboardDrummer d1a82d6
Merge commit '99d8ac3' into resolveMatchBeforeCompile
keyboardDrummer c7c99e7
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 7727f33
Move more code to prep from resolveNestedMatch
keyboardDrummer 6ce2bef
Capitalise first letter of some public members
keyboardDrummer a5f6baf
Remove WOOP files
keyboardDrummer 593f6ae
Add case
keyboardDrummer 4277427
No longer denest matches as part of resolution
keyboardDrummer 169d55a
Fix call Stmt children
keyboardDrummer 4897660
Add AST changes
keyboardDrummer 368cfa6
Compiles now
keyboardDrummer 74dfdb7
Most tests pass now, except the ones that fail because of StaticRecei…
keyboardDrummer b2aa68d
Run formatter
keyboardDrummer 0be6b16
Weird static state crash only when running all DefinitionTest tests
keyboardDrummer 4cdef82
Definition tests pass
keyboardDrummer 7990148
Remove base.Children call in StaticRecExpr.Children
keyboardDrummer 6c62dbd
Fixes for static receiver expr
keyboardDrummer ffbb783
Ran formatter
keyboardDrummer f785f46
Fix TODO
keyboardDrummer 35b4f2a
Merge branch 'codeMoves2' into updateChildren
keyboardDrummer 4e46577
Merge commit 'f2d1f5d5~1' into updateChildren
keyboardDrummer 01ce3a4
Merge commit 'f2d1f5d5' into updateChildren
keyboardDrummer bd976a8
Merge remote-tracking branch 'origin/master' into updateChildren
keyboardDrummer 1e3a028
Merge branch 'updateChildren' of github.com:keyboardDrummer/dafny int…
keyboardDrummer db6cd10
Delete StatementsOld
keyboardDrummer 670b10e
Refactoring
keyboardDrummer 3bafbe9
Merge remote-tracking branch 'origin/master' into updateChildren
keyboardDrummer 4ea6b9d
Bring back some removed code
keyboardDrummer 22a5ab6
Fix NRE in UpdateStmt
keyboardDrummer 0d68478
Fix another UpdateStatement.ResolvedStatements bug
keyboardDrummer 9544d76
Turn RangeToken computing into a method instead of a property
keyboardDrummer 9959513
Turn RangeToken computing into a method instead of a property
keyboardDrummer 2b415ba
Converted properties to method in attempt to fix debugging, but ToStr…
keyboardDrummer c60a9b8
Temporarily shorten test file
keyboardDrummer 6edfaff
Make Token a class
keyboardDrummer 5fb11a1
Ran formatter
keyboardDrummer 522cbaf
Merge branch 'master' into fixDebugging
keyboardDrummer fb96dff
Repair accidentaly changed test file
keyboardDrummer ef2b371
Merge branch 'fixDebugging' into updateChildren
keyboardDrummer 2997659
Fix QuantifierExpr.SubExpressions
keyboardDrummer 2a20720
Fix ExtremeLemmaBodyCloner
keyboardDrummer fd0efc5
Merge remote-tracking branch 'origin/master' into updateChildren
keyboardDrummer c8c3858
Fix ForLoopStmt.Clone
keyboardDrummer 9e97cff
Fix bug in MatchAst.Clone
keyboardDrummer d44fb20
Fix AutoGhostIdentifierExpr.Clone
keyboardDrummer 9566329
Run formatter
keyboardDrummer 5c1f966
Fix Tok and GetRangeToken of AttributedExpression
keyboardDrummer 1bab8b3
Format and remove .Reverse
keyboardDrummer 4007e69
Merge branch 'updateChildren' of github.com:keyboardDrummer/dafny int…
keyboardDrummer dcef971
Fix bug
keyboardDrummer 8fe135d
Merge branch 'master' into updateChildren
keyboardDrummer 2f68010
Delete ResolvedCloner
keyboardDrummer a4a58fd
Resolve comments
keyboardDrummer 43c65ef
Merge branch 'updateChildren' of github.com:keyboardDrummer/dafny int…
keyboardDrummer 5d53048
Merge remote-tracking branch 'origin/master' into updateChildren
keyboardDrummer 066be92
Merge remote-tracking branch 'origin/master' into updateChildren
keyboardDrummer ce3edc5
Trigger CI
keyboardDrummer 02e32ca
Merge branch 'updateChildren' into resolveMatchBeforeCompile
keyboardDrummer f5c154f
Merge commit '2d6d0e43cc6' into resolveMatchBeforeCompile
keyboardDrummer 5af1720
Merge commit '051c71b76d94' into resolveMatchBeforeCompile
keyboardDrummer e448083
Add ghost interest computation for NestedMatch
keyboardDrummer cae57df
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer f96bf92
Undo unintentional change
keyboardDrummer 3af00f7
Move ExtendedPatterns to separate files, and move illegal subpatterns…
keyboardDrummer e1328b0
Bring back .Reverse()
keyboardDrummer 16f59ba
Fix denesting during translation to properly visit all modules
keyboardDrummer 4e1fc38
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer ac41345
Fix handling in tuples in match cases
keyboardDrummer ea29cdd
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer cf97258
Fill in some missing nestedMatchExpr cases
keyboardDrummer 8ba8e41
Moved classes, many inside Rewriter.cs, into separate files
keyboardDrummer edfaaf5
Move infer decreases clauses code into a separate file
keyboardDrummer 9e1a5a0
Prevent NRE in GhostInterestVisitor when calling ExpressionTester
keyboardDrummer 0de2347
Fix NRE in cloning constructor of OneBodyLoopStmt
keyboardDrummer 4ec6cfc
Fix cloner issue related to Statement.Labels and BreakStmt.TargetStmt
keyboardDrummer 582b8a0
Let tail recursion detection work for nested match expressions
keyboardDrummer d0c7d04
Tiny refactoring
keyboardDrummer e683701
Temp fix for MatchDenester traversal
keyboardDrummer 80209f2
Fix expect file
keyboardDrummer cc38782
Make denester part of resolution, but store the result in a separate …
keyboardDrummer 95615c4
Various .Denested fixes
keyboardDrummer ff96f44
032 runs without crashing
keyboardDrummer ee0701d
032 passes
keyboardDrummer 8626ee4
FStarQuicksort passes
keyboardDrummer 9b97497
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 5f4ace4
Fix SimpleCoinduction.dfy
keyboardDrummer 7eb6723
Fix for literally nested match constructs
keyboardDrummer 73238a0
Fix bug in match wellformedness check
keyboardDrummer ca1bad5
Add missing NestedMatchExpr case
keyboardDrummer 909ad0d
Fix NRE in ForallStmt
keyboardDrummer 1aa94de
Fix 503
keyboardDrummer 0429ae1
Fix 133
keyboardDrummer cf29536
Fix 686 test
keyboardDrummer 498dcf9
Fix ComprehensionExpr clone so Calculations.dfy passes
keyboardDrummer 8b03ac7
Fix 686 expect file
keyboardDrummer b127542
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer a457420
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer c748421
Fix 1665 expect file
keyboardDrummer af69bfa
Fix nested patterns expect
keyboardDrummer f7d23db
Fix printer to handle Denested well
keyboardDrummer f455011
Fix tail recursion code, so BranchCoverage passes
keyboardDrummer 62c46a4
Ran formatter
keyboardDrummer 41c00dc
Fix 1665 expect file
keyboardDrummer a3f6883
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 542182e
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 9ef0a73
Fix 686 expect file
keyboardDrummer 0328ec3
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer cf0237b
Refactoring
keyboardDrummer 1e14501
Delete StatementsOld.cs
keyboardDrummer f38dd2f
Update 1665 expect file
keyboardDrummer 7ca28c5
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 0f7202b
Merge commit '2b23d2ed' into resolveMatchBeforeCompile
keyboardDrummer 31eaf85
Merge commit '185282eff' into resolveMatchBeforeCompile
keyboardDrummer a72bf13
Merge remote-tracking branch 'origin/master' into resolveMatchBeforeC…
keyboardDrummer 59faebf
Renamed folder
keyboardDrummer 629bf63
Refactoring
keyboardDrummer 6284aaa
Remove match debug code
keyboardDrummer 38ce8b1
Move the first half of the nested match resolve code out of Resolver.cs
keyboardDrummer 79439d0
Rename
keyboardDrummer 93fccb5
Rename denested to flattened
keyboardDrummer 1220b94
Cleanup and renames
keyboardDrummer 5c253a7
Undo Body->Term inline
keyboardDrummer eb7f315
Fix comp errors
keyboardDrummer ccf0b91
Reduce code duplication
keyboardDrummer 837039d
Small refactoring
keyboardDrummer bc91c60
Delete resolve code for simple matches
keyboardDrummer 24fe226
Remove OrigUnresolved
keyboardDrummer fbaf092
Refactor and fix bug
keyboardDrummer 0abef8d
Remove obsolete argument
keyboardDrummer c97e7d3
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer 07c6cd4
Fix print expect file
keyboardDrummer ed72062
Run formatter
keyboardDrummer 55ae49f
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer 3059618
Fix comp error
keyboardDrummer ba64de2
Code review
keyboardDrummer 0e850be
Apply TODO
keyboardDrummer 5ecb444
Merge branch 'master' into resolveMatchBeforeCompile
keyboardDrummer 2ed841c
Merge branch 'resolveMatchBeforeCompile' of github.com:keyboardDrumme…
keyboardDrummer 2040d73
Move SinglyLinkedList
keyboardDrummer 74e7ecd
Resolve TODO that removes SyntaxContainer
keyboardDrummer 4589aed
Remove TODO
keyboardDrummer b319033
Remove .Reverse call
keyboardDrummer 513fe70
Fix
keyboardDrummer 97d3fb3
Refactor
keyboardDrummer 6644b8c
Fix NRE
keyboardDrummer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to see this go away!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but
NestedMatchStmt.Flattened
came in its place so I'm not sure if it's an improvement 😅 I considered changingConcreteSyntaxStatement
andConcreteSyntaxExpression
so they would have not only aresolvedX
but also acompiledX
field, instead of the currentFlattened
property. That would reduce the code added toTranslator.cs
andSinglePassCompiler.cs
, and add opportunities for other post resolution compilation passes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. But one advantage to
NestedMatchStmt.Flattened
is that it's clear that it's used for one thing, whereasConcreteSyntaxStatement
sounds like it could cover many instances of concrete syntax, even if it didn't, in practice.