Left to Prove /bloom
Utility catalogue

Paths and files

basename

Extract the last path component

Open2,000 seeds

Proof brief

Invocation
basename NAME [SUFFIX]
Input domain
Use one nonempty pathname and an optional suffix with no NUL. Pass -- before the operands when invoking the GNU binary. Exclude all-slash names from this profile.
Proof obligation
Remove trailing slashes, take the last component, and remove a matching nonempty suffix only when the component has bytes before it. Append LF.
Test cases
Trailing and repeated slashes, whole-name suffixes, missing suffixes, and paths with no slash.
Outside this profile
Empty pathnames, root-only names, options, and filesystem resolution.

Subtasks and prerequisites

Read obligations JSON

This target needs root.io (proved).

Task bundle

Read bundle JSON

A formal Rocq statement has yet to be published for this profile.

This target has no verifier yet. Add targets/basename/verify.sh with your submission, modeled on targets/cat/verify.sh. The pull request check runs it with sh targets/basename/verify.sh.

GitHub submissions

See the review queue

View GitHub pull requests for the current status.

View GitHub pull requests