Skip to content

Commit

Permalink
Remove boogie filter (#5090)
Browse files Browse the repository at this point in the history
Fix for #5088

### Description
Remove `--boogie-filter` option, because there's now a better
`--filter-symbol`

### How has this been tested?
Tests for the removed feature have been removed.

<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>
  • Loading branch information
keyboardDrummer authored Mar 14, 2024
1 parent 28f3a62 commit 8774643
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 34 deletions.
11 changes: 1 addition & 10 deletions Source/DafnyCore/Options/BoogieOptionBag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
namespace Microsoft.Dafny;

public static class BoogieOptionBag {
public static readonly Option<IEnumerable<string>> BoogieFilter = new("--boogie-filter", @"
(obsolete, use --filter-symbol instead) Only check proofs whose Boogie name is matched by pattern <p>. This option may be specified multiple times to match multiple patterns. The pattern <p> may contain * wildcards which match any character zero or more times. If you are unsure of how Boogie names are generated, please pre- and postfix your pattern with a wildcard to enable matching on Dafny proof names."
.TrimStart()) {
ArgumentHelpName = "pattern",
IsHidden = true,
};

public static readonly Option<IEnumerable<string>> BoogieArguments = new("--boogie",
"Specify arguments that are passed to Boogie, a tool used to verify Dafny programs.") {
ArgumentHelpName = "arguments",
Expand Down Expand Up @@ -103,7 +96,6 @@ public static class BoogieOptionBag {
static BoogieOptionBag() {
Cores.SetDefaultValue((uint)((Environment.ProcessorCount + 1) / 2));

DafnyOptions.RegisterLegacyBinding(BoogieFilter, (o, f) => o.ProcsToCheck.AddRange(f));
DafnyOptions.RegisterLegacyBinding(BoogieArguments, (o, boogieOptions) => {
var splitOptions = boogieOptions.SelectMany(SplitArguments).ToArray();
if (splitOptions.Any()) {
Expand Down Expand Up @@ -161,8 +153,7 @@ static BoogieOptionBag() {
SolverOptionHelp,
SolverPath,
SolverPlugin,
SolverResourceLimit,
BoogieFilter
SolverResourceLimit
);
}

Expand Down
1 change: 0 additions & 1 deletion Source/DafnyDriver/Commands/VerifyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public static Command Create() {
new Option[] {
FilterSymbol,
FilterPosition,
BoogieOptionBag.BoogieFilter,
}.Concat(DafnyCommands.VerificationOptions).
Concat(DafnyCommands.ConsoleOutputOptions).
Concat(DafnyCommands.ResolverOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
// RUN: %diff "%s.expect" "%t"
// Crashes size x is nothing real
// ## %verify --solver-plugin x --solver-plugin x "%s" >> "%t"
// Not testing --boogi, --boogie-filter

module A {}

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions docs/DafnyRef/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ Various options control the verification process, in addition to all those descr
- `--relax-definite-assignment`
- `--track-print-effects`
- `--disable-nonlinear-arithmetic`
- `--filter-symbol`

- Control of the proof engine
- `--manual-lemma-induction`
- `--verification-time-limit`
- `--boogie`
- `--boogie-filter`
- `--solver-path`


Expand Down Expand Up @@ -2643,8 +2643,6 @@ terminology.

* `--solver-plugin` - specifies a plugin to use as the SMT solver, instead of an external pdafny translaterocess

* `--boogie-filter` - restricts the set of verification tasks (for debugging)

* `--boogie` - arguments to send to boogie

Legacy options:
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/news/4816.feat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- Add an option `--filter-position` to the `dafny verify` command. The option filters what gets verified based on a source location. The location is specified as a file path suffix, optionally followed by a colon and a line number. For example, `dafny verify dfyconfig.toml --filter-position=source1.dfy:5` will only verify things that range over line 5 in the file `source1.dfy`. In combination with ``--isolate-assertions`, individual assertions can be verified by filtering on the line that contains them. When processing a single file, the filename can be skipped, for example: `dafny verify MyFile.dfy --filter-position=:23`
- Add an option `--filter-symbol` to the `dafny verify` command, that only verifies symbols whose fully qualified contains the given argument. For example, `dafny verify dfyconfig.toml --filter-symbol=MyModule` will verify everything inside `MyModule`.
- Add an option `--filter-symbol` to the `dafny verify` command, that only verifies symbols whose fully qualified name contains the given argument. For example, `dafny verify dfyconfig.toml --filter-symbol=MyModule` will verify everything inside `MyModule`.
- The option `--boogie-filter` has been removed in favor of --filter-symbol

0 comments on commit 8774643

Please sign in to comment.