-
Notifications
You must be signed in to change notification settings - Fork 260
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
Support verification logs in JSON format #4907
Comments
### 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.
Is there any explanation about what makes the CSV logger "lossy", and what is gained by going the JSON route? |
My own notes, in case it helps those googling... JSON keeps most the information from the .text, only in a structured way. What is called "Assertion Batch" in both the text and the CSV formats is called "vcNum" in the JSON. (Looks like "Assertion Batch" and "Verification Condition" are used more or less interchangeably) |
Yes, that's all exactly right. We support CSV because it's quite convenient for a lot of statistical analysis processes, and is generally very easy to do quick queries on, import into spreadsheets, etc. But if you're building something custom, and importing JSON is easy, then it's probably the way to go. And thanks for noting the terminology differences. I think we could make things easier to understand by making those consistent. |
I found another difference: verificationResult.outcome is "Correct", but verificationResult.vcResult[].outcome is "Valid". |
Looks like in both positions the alternative is "OutOfResource"? |
Summary
Add support for providing JSON logs of verification results.
Background and Motivation
Verification results are naturally at least a little hierarchically structured, and a natural fit for JSON. The
text
andcsv
loggers are human-optimized and lossy, respectively. Both of these are sub-optimal for machine processing of all verification output.Proposed Feature
It would be very useful to have a
--log-format json
with a machine-readable version of what shows up in--log-format text
.Alternatives
There's also a
trx
format (using a specific XML schema), which supports more information, and more hierarchical structuring, than thecsv
output format. However, it's somewhat complex and rigidly oriented toward test results (even though it's extensible enough to capture many aspects of verification results).The text was updated successfully, but these errors were encountered: