You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds the informal specification for CommandLineParser.TryUnescape, advancing it from phase 1 (identified) to phase 2 (informal spec extracted).
Target
Function: static bool TryUnescape(string, string?, IEnvironment, out string?, out string?)
Input "'" (a single ' character, length 1) matches both StartsWith("'") and EndsWith("'"), then calls input.IndexOf('\'', 1, input.Length - 2) = IndexOf('\'', 1, -1) β which throws ArgumentOutOfRangeException in .NET. No test covers this case.
Lean model approximation β three-case conditional with abstract newline parameter, global String.Replace modelling.
Verification Status
LEAN_AVAILABLE = false
Reason: elan download blocked by network firewall in runner environment.
Task 3 (Lean formal spec) deferred until Lean toolchain is accessible.
Next Steps
Task 3: Write formal-verification/lean/FVSquad/TryUnescape.lean with type definitions and theorem stubs.
Investigate potential bug with single-char ' input.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch lean-squad/task2-tryunescape-informal-2026-04-25-d2f24c7c8ada3080.
To fix the permissions issue, go to Settings β Actions β General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
π¬ Lean Squad β automated formal verification agent
Summary
This PR adds the informal specification for
CommandLineParser.TryUnescape, advancing it from phase 1 (identified) to phase 2 (informal spec extracted).Target
static bool TryUnescape(string, string?, IEnvironment, out string?, out string?)src/Platform/Microsoft.Testing.Platform/CommandLine/Parser.csChanges
formal-verification/specs/commandlineparser_tryunescape_informal.mdβ full informal specificationformal-verification/TARGETS.mdβ advances TryUnescape to phase 2Specification Highlights
The spec documents:
Three unescaping modes matching POSIX shell quoting rules:
'quotes, no escape sequences, rejects interior'"quotes, applies backslash escapes:\\,\",\$,\`,\<newline>15 verifiable properties across 4 groups (passthrough, single-quote, double-quote, edge cases)
Potential bug identified (Open Question Initial commit! πΒ #1):
"'"(a single'character, length 1) matches bothStartsWith("'")andEndsWith("'"), then callsinput.IndexOf('\'', 1, input.Length - 2)=IndexOf('\'', 1, -1)β which throwsArgumentOutOfRangeExceptionin .NET. No test covers this case.Lean model approximation β three-case conditional with abstract
newlineparameter, globalString.Replacemodelling.Verification Status
Next Steps
formal-verification/lean/FVSquad/TryUnescape.leanwith type definitions and theorem stubs.'input.Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
lean-squad/task2-tryunescape-informal-2026-04-25-d2f24c7c8ada3080.Click here to create the pull request
To fix the permissions issue, go to Settings β Actions β General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (249 of 249 lines)