-
Notifications
You must be signed in to change notification settings - Fork 259
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
Feat: Support for --bprint
in language server.
#4206
Merged
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
db0d497
Feat: Support for `--bprint` in language server.
MikaelMayer a301600
Merge branch 'master' into feat-bprint-language-server
MikaelMayer 8cbd376
Merge branch 'master' into feat-bprint-language-server
MikaelMayer 387ec48
Review comments
MikaelMayer 6da5fa2
Merge branch 'master' into feat-bprint-language-server
keyboardDrummer d29d028
Merge branch 'master' into feat-bprint-language-server
keyboardDrummer a8d9fbe
Merge branch 'master' into feat-bprint-language-server
MikaelMayer 0e61c13
Update Source/DafnyLanguageServer/Language/DafnyProgramVerifier.cs
MikaelMayer 494856d
Update Source/DafnyLanguageServer/Language/DafnyProgramVerifier.cs
MikaelMayer 45f293b
Merge branch 'master' into feat-bprint-language-server
MikaelMayer fa13c39
Merge branch 'master' into feat-bprint-language-server
MikaelMayer 74b7a51
Merge branch 'master' into feat-bprint-language-server
MikaelMayer fb85eae
Merge branch 'master' into feat-bprint-language-server
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ public async Task<IReadOnlyList<IImplementationTask>> GetVerificationTasksAsync( | |
CancellationToken cancellationToken) { | ||
var program = document.Program; | ||
var errorReporter = (DiagnosticErrorReporter)program.Reporter; | ||
var nmodules = Translator.VerifiableModules(program).Count(); | ||
|
||
cancellationToken.ThrowIfCancellationRequested(); | ||
|
||
|
@@ -55,6 +56,12 @@ public async Task<IReadOnlyList<IImplementationTask>> GetVerificationTasksAsync( | |
return translated.SelectMany(t => { | ||
var (_, boogieProgram) = t; | ||
var results = engine.GetImplementationTasks(boogieProgram); | ||
if (engine.Options.PrintFile != null) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would put this in a separate traversal outside of the SelectMany. if (engine.Options.PrintFile) {
var nmodules = Translator.VerifiableModules(program).Count();
foreach(var boogieProgram in translated) {
..
}
} |
||
|
||
var nm = nmodules > 1 ? DafnyMain.BoogieProgramSuffix(engine.Options.PrintFile, t.Item1) : engine.Options.PrintFile; | ||
|
||
ExecutionEngine.PrintBplFile(engine.Options, nm, t.Item2, false, false, engine.Options.PrettyPrint); | ||
} | ||
return results; | ||
}).ToList(); | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Support for the `--bprint` option for language server arguments |
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.
Can you give the introduced variables fuller names?