Uh oh!
There was an error while loading. Please reload this page.
[Lean Squad] feat(fv): Task 2 — informal spec for CommandLineParseResult.Equals - #7918
Conversation
Extract a precise informal specification for CommandLineParseResult.Equals, the structural-equality implementation for the command-line parse result type. The spec documents: - 19 properties across 6 groups (null-safety, extensionality, object.Equals consistency, order-sensitivity, Empty-value behaviour, ToolName comparison) - Algorithm walkthrough (O(n·m), pure, no exceptions for null input) - Edge cases: null other, case-sensitive ToolName, order-sensitive errors/options - Lean modelling plan: Option String for nullable, List for collections Next: Task 3 — write ArgumentArity.lean (highest priority Lean target) 🔬 Lean Squad — automated FV agent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds an informal, source-derived specification for Microsoft.Testing.Platform.CommandLine.CommandLineParseResult.Equals, to support the Lean Squad FV workflow and future Lean modelling work.
Changes:
- Introduces a new FV spec markdown document describing
CommandLineParseResult.Equals. - Documents equality properties (null-safety, extensionality, order-sensitivity,
Emptybehavior, ToolName comparison) and an algorithm walkthrough. - Captures Lean modelling notes/approximations for translating the behavior into Lean.
Show a summary per file
| File | Description |
|---|---|
| formal-verification/specs/commandlineparseresult_equals_informal.md | New informal spec for CommandLineParseResult.Equals intended as input to Lean formalisation. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 6
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
formal-verification/specs/commandlineparseresult_equals_informal.md:162
- The statement that
Equalsmodels whether the command line was “exactly the same string” is not accurate for this type: the parser normalizes option prefixes (trims-/--) and may unescape/strip quotes in arguments, so distinct command-line strings can produce equal parse results. Consider rephrasing this as “exactly the same parsed/normalized structure” to match the actual semantics.
The equality is **order-preserving structural equality** over the full parse tree. This mirrors the semantics of a command-line invocation: `--foo bar --baz` is semantically different from `--baz --foo bar` even if both produce option sets that "contain" the same options. This contrasts with `IsOptionSet` and `TryGetOptionArgumentList`, which are lookup methods that aggregate over all options with a matching name and are case-insensitive. The `Equals` method deliberately models "was the command line *exactly* the same string?", not "do both command lines select the same options?".
- Files reviewed: 1/1 changed files
- Comments generated: 3
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…al.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ult.Equals (#7918) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Extract a precise informal specification for CommandLineParseResult.Equals, the structural-equality implementation for the command-line parse result type.
The spec documents:
Next: Task 3 — write ArgumentArity.lean (highest priority Lean target)
🔬 Lean Squad — automated FV agent
Fixes#7911