Skip to content

Support logging verification results in JSON#4951

Merged
keyboardDrummer merged 11 commits into
dafny-lang:masterfrom
atomb:json-verification-logger
Jan 11, 2024
Merged

Support logging verification results in JSON#4951
keyboardDrummer merged 11 commits into
dafny-lang:masterfrom
atomb:json-verification-logger

Conversation

@atomb

@atomb atomb commented Jan 8, 2024

Copy link
Copy Markdown
Member

Description

Implement support for dafny verify --log-format json to log the information provided in the text format logger in JSON format.

Fixes #4907

How has this been tested?

logger/JsonLogger.dfy

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@atomb atomb marked this pull request as ready for review January 9, 2024 18:26
@atomb atomb requested review from MikaelMayer and robin-aws and removed request for robin-aws January 9, 2024 18:26
}

public IEnumerable<ProofDependency> GetOrderedFullDependencies(IEnumerable<TrackedNodeComponent> components) {
return components.Select(GetFullIdDependency).OrderBy(dep => (dep.RangeString(), dep.Description));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find ordering by RangeString to be strange. Why not order on the unprinted object: dep.Range.StartToken or dep.Range ?

Also, Instead of the tuple, you can also use the C# chaining ordering API, OrderBy(dep => dep.Range.StartToken).ThenBy(dep => dep.Description), which I think is a little easier to read.

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) January 10, 2024 16:53

@alex-chew alex-chew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes since Remy's last approval LGTM.

@@ -0,0 +1,453 @@
// RUN: %diff "%s" "%s"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is there a reason there's so many empty lines at the start of this file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because those lines used to be comments and the expected messages in some tests have line numbers based on the contents of this file before removing those comments. I should really update the test to remove the blank lines, and re-number the lines in the expected test output, but that'll be a bit time-consuming, so I haven't yet.

@keyboardDrummer keyboardDrummer merged commit 95b36cc into dafny-lang:master Jan 11, 2024
atomb added a commit to atomb/dafny that referenced this pull request Jan 11, 2024
keyboardDrummer pushed a commit that referenced this pull request Jan 12, 2024
### Description

Add a feature description for the feature added in #4951.

By submitting this pull request, I confirm that my contribution is made
under the terms of the MIT license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support verification logs in JSON format

3 participants