Repository navigation
Conversation
Add the initial pathchk benchmark scaffold. Separate specification, implementation and proof sources using the current templates. Leave behavior and proof obligations incomplete for implementation. Co-authored-by: Codex <noreply@openai.com>
Specify portable names and GNU diagnostics. Implement the checks with proofs and comparison tests. Register the scoped fuzzer generator. Co-authored-by: Codex <noreply@openai.com>
Long malformed options could exceed the execution timeout during diagnostic encoding. Reuse the verified encoder while preserving the exact parse-error specification. Separate proof steps from the core and expand Unicode and long-input coverage in tests and the fuzzer. Align the task Makefile and generated documentation with the current repository conventions. Co-authored-by: Codex <noreply@openai.com>
Short-option error formatting used recursive traversal in the specification. Define the selected error position declaratively and move traversal into Core with a matching postcondition. Add a regression for a long short-option bundle ending in an invalid character. Co-authored-by: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements GNU pathchk, which checks file name portability, with specifications, proofs, tests, and a fuzzer generator. (#17)
Change and scope
pathchk, coreutils.fcac7aa399a1074dc00538889848ef58accd3a51./workspace/dafnyutils, Ubuntu 24.04 development container, Linux x86-64.4.11.1+9f281d50a7befa662350be47dd73ff0b2e0bb8d9, Python3.12.3, .NET8.0.133, Cargo1.94.0.coreutils/src/pathchk.cat2cf491412c199e2211880ec3f4ba387026638a33.bench/utils/pathchk/pathchk.md.pathchk.c-por--portabilitywith names;-Pcombined with-p, help/version, long-option abbreviations,--RunCoreensuresPathchkSpec.Spec; portable-byte, length, and ordered-diagnostic relations determine GNU's resultOptions left out due to IO.dfy
-Palonepathconflimits are not exposed byIO.dfy; both modes are outside issue #17.1. Test results
make -C bench/utils/pathchk final-check: 59 passed, 5 deselected in 8.61s; the 5 proof tests run in the separate proof stage.coreutils/tests/misc/pathchk.sh, byte boundaries, error precedence, continued operand checking,--=x, Unicode option bytes, quoting,/dev/full, and long names/options.ruff check bench/utils/pathchk/Tests.py: exit0.ruff format --check bench/utils/pathchk/Tests.py: exit0.cargo fmt --manifest-path tools/coreutils_fuzzer/Cargo.toml --all -- --check: exit0.Runtime stdout from
make -C bench/utils/pathchk final-check:2. Fuzzing results
python3 tools/coreutils_fuzzer/run.py fuzz pathchk --seeds 1,7,19 --iterations 1000.0._build/coreutils/src/pathchk(native); SHA-256:80f745590495c992148ea3d3f043298aa398962a9136b91e25a2d56912ae1808._build/bench/pathchk_bench.dll(dotnet DLL); SHA-256:e9faa43c36887d6752afbac8ab44f0c373d7f6fd5e0b30549cfd70c9205a85d0.Full fuzzing stdout
3. Verification results
make -C bench/utils/pathchk final-check: exit0; includesmake -C bench/utils/pathchk verify, layout checks, runtime tests, fuzzing and 5 proof tests.make -C bench/utils/pathchk verify: 2438 verified, 0 errors; exit0.--library, which produces library-verification warnings.CheckName; repository-standard verification passed without changing its limits.Proof targets and analysis-only files
bench/utils/pathchk/):Spec/PathchkSchema.dfy,Spec/PathchkSpec.dfy,Impl/Pathchk.dfy,Impl/PathchkCore.dfy,Impl/PathchkCli.dfy,Impl/CliSupport.dfy,Proof/PathchkProof.dfy.bench/utils/pathchk/): None; all seven local Dafny files are verification targets.bench/core/):CliTypes.dfy,Errno.dfy,IO.dfy,IOContract.dfy,Result.dfy,SecurityModel.dfy,StringEscaping.dfy,Utf8.dfy,World.dfy.Verification and proof-test summaries from
make -C bench/utils/pathchk final-check:make -C bench/utils/pathchk lint: exit0.Progress notes
bench/utils/pathchk/pathchk.md.AI usage
I investigated how GNU pathchk works and when it fails, then directed the implementation. Codex assisted with writing and reviewing code based on my instructions.