-
Notifications
You must be signed in to change notification settings - Fork 265
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
Bring new CLI options up to par with legacy options #3468
Comments
My add: --use-basename-for-filename should not be jsut a developer option -- I would find it essential for testing as a user. Also --error-limit, --random-seed |
I would suggest
What does What's the use-case of How do you feel about letting customers use |
It appears to me that there is a whole set of options whose point is to print out various kinds of debug information (/trace among them). They could be combined into a hidden option --debug. |
Oh, does It's true that We could make it so that, if For I think I'd prefer to have |
Aaron - are you using /trace to show progress? I've though before that on large projects I'd want a --progress option to show progress through the files and methods as they are verified. |
Yeah, that's generally what I'm using it for, along with frequently wanting to see time and resource use statistics as they go by. Ultimately, what we might want is a |
I don't understand Maybe Could you elaborate on the use-case of --log-format? What information does that give when you're doing
👍 |
Boogie has a separate plugin mechanism, different from the Dafny plugin mechanism, which it specifically uses for solver plugins. It would be possible, however, for Dafny to introspect a plugin to figure out what kind it is, which I think could be a better user experience. We could support both with The The I like the idea of using |
Ah, I was thinking Dafny users could use a Dafny plugin to configure a different solver back-end, but I guess you're saying Dafny users should be able to use Boogie plugins as well, so they don't need two separate .dlls. While this sounds like a nice UX, it also sounds a little complicated to me. If a Boogie plugin was built against a particular Boogie version, how do you know whether it works with a particular Dafny version? That said, I'm OK with having a different option, like |
I'm skeptical about providing an 'API' through the CLI that is not meant for user consumption, because I feel it clutters the CLI and there are good alternatives. If customers want their software to integration with Dafny, they can consume one of Dafny's .NET packages and integrate with a C# API. Alternatively, the language server has verification related APIs as well. We could consider providing an One thing is that Regarding the CSV format, things are grouped by assertion batches, but it's not clear which assertions are in each batch, so I don't understand what a user can do to evaluate these batches. To me it seems like assertion batches can only be defined by the assertions in them. If you don't provide that definition, it seems better to group by named verifiable (method/function/constant/datatype), so the user doesn't have to aggregate the information for each batch in a verifiable.
Regarding the text format, one of the tests (https://github.com/dafny-lang/dafny/blob/master/Test/logger/TextLogger.dfy#L14) produces an output where many of the verification batches have no assertion in them. What does that mean? There are also many repeated occurrences of the same batch, which is because multiple iterations have been specified, but it would be nice if the iteration number is shown so it's clear why there are multiple occurrences. |
Textual formats are a lot more portable than programmatic APIs. Using Dafny as a library is only really feasible from another .NET application. CSV files are supported by a nearly endless range of tools. I sometimes load the output of this analysis into a spreadsheet, for example, and it can be used with tools like
I don't think it would remove the need for CSV output. To functionality we provide, whether in an external executable or an internal command, will always be somewhat limited. If anyone wants to query the data in a way that we haven't implemented, it's nice for that to be an easy process. More significantly, though, we're actively using all of this functionality in practice. If we don't make these options available in the new CLI, I don't think even a single one of my regular uses Dafny could be migrated away from using the old-style options.
This format exists primarily for performance analysis, and therefore I think it makes sense to group things according to the unit for which performance data is available, which is at the level of SMT queries.
Regarding the first issue, the implementation of splitting that's currently in place frequently (or maybe always?) generates a split that has no assertions in it, and therefore that shows up in the verification results. I think we should fix that, for a number of reasons, but it seems to me that it's somewhat separate from the question of adding these command-line options. Thanks for pointing out the lack of iteration number in the |
* `--error-limit` is available everywhere * `--solver-log` is available for `verify` and `measure-complexity` * `--solver-plugin` is available for `verify` and `measure-complexity` * `--resource-limit` is available for `verify` and `measure-complexity` * `--isolate-assertions` and `--format` are also available for `verify` with `--format` renamed `--log-format` Addresses #3468 By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license. Co-authored-by: David Cok <david.r.cok@gmail.com>
Yes, but I do wonder whether it would be better to expose output that is optimised for machine but not human consumption, like JSON for example, or the assertion batch grouped CSV, through a separate
That sounds sensible, but what is a user supposed to do with the batch grouping, not knowing which assertions belong to a particular batch? One thing they can do is aggregate the batches per named thing (symbol), and then try to improve the performance of one those symbols. Is there another thing they can do? I guess the report generator determines a standard deviation per assertion batch, so then the grouping per batch makes sense. However, you could also expose the lowest level information: have a row for each assertion, and a column that mentions the batch number. Assertions belonging to the same batch will be in consecutive rows that contain the same data except for the assertion's source location and possibly a code snippet. To me it seems (too) difficult to design an output format that will be used by downstream tools, without knowing what those tools will be. Currently we have the report-generator as a downstream tool but we're planning to replace that (right?).
Sounds good. Just wanted to point it out since I looked at the output of the options. Another thing I would consider is to add a 'code snippet' for each assertion, in addition to the description that's already there, like Also, it seems like that users, when reading this output, would have to switch back and forth between their editor and the output a lot. It might be interesting to define a problem matcher for the Dafny IDE that works in conjunction with
These options are already available in |
Adds a `--solver-option` flag to correspond to the old (Boogie) `/proverOpt` flag. In the process, this also refactors a few things: * Rearranges some of the option code to move some Boogie-related options from `CommonOptionBag` to `BoogieOptionBag`. * Makes `--solver-option`, `--solver-path`, `--solver-plugin`, `--solver-log`, and `--resource-limit` available to the `generate-tests` and `find-dead-code` commands. Includes some refactoring to DafnyTestGenerator, thanks to @Dargones, to make it easier to support arbitrary options there. Addresses #3468 but doesn't entirely resolve it. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: Dargones <sasha.fedchin@gmail.com> Co-authored-by: Remy Willems <rwillems@amazon.com>
Summary
Currently, the new top-level commands for Dafny provide most but not all of the frequently-used features of the tool. This issue is to track remaining options to fill in before 4.0.
Background and Motivation
Particularly when working on proof debugging and solver performance investigation, several of the most useful options are missing.
Proposed Feature
--isolate-assertions
toverify
(not justcheck-complexity
)/verificationLogger
--log-format
and--log-file
options toverify
/vcsLoad
--solver-load
option toverify
/errorLimit
--error-limit
option toresolve
[DRC: to all commands] -- this one needed to support testing with new CLI/rLimit
--resource-limit
option toverify
/trace
--verbosity
withsilent
,quiet
, andtrace
options/proverDll
--solver-plugin
option toverify
/proverLog
--solver-log
option toverify
/proverOpt
--solver-option
option toverify
--stdin
toresolve
(and everything else, transitively)DRC: Anything for verify needs to be available on translate/build/run in case those verify
DRC: Others to consider:
--random-seed
--help-attr
--deprecation
something like /noCheating:0 to allow mix of assert and expect and assume
something to easily /extractCounterexample
I fear if we don't supply what users need to tinker with proof performance, they may just not use the new CLI.
So maybe also
--legacy=" ... string of old options in old format "
just in case
Alternatives
No response
The text was updated successfully, but these errors were encountered: