Skip to content

migrate --facade: annotations the library ships (D121 step 3, Clang half) - #2424

Merged
ehartford merged 1 commit into
mainfrom
d121-step3
Oct 15, 2026
Merged

ehartford merged 1 commit into
mainfrom
d121-step3

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

D121 step 3 (§16.2b.15 item 2), the Clang half: the bridge reads a declaration's __attribute__((…)) tokens (with_cimport_fn_attributes), the corpus records them, and the proof engine uses malloc where the body proves nothing: an owned producer drafted with the provenance annotation:, below a proof and above the registry. The report names every attribute a function carries. Selfhost: buf_alloc, whose body calls a function the package does not define, becomes a producer by its annotation. GObject-introspection transfer annotations (a .gir input) are the other half, open. Gate green; :c-migrator-basic-tests green with the release binary. Battery: pending.

…15). The Clang bridge reads a declaration's `__attribute__((…))` tokens as `noreturn` is read (with_cimport_fn_attributes: `malloc;nonnull(1,2);returns_nonnull`), the corpus records them on the symbol from every declaration, and the proof engine uses `malloc` where the body proves nothing: the return is a fresh allocation the caller owns, drafted with the provenance `annotation:` (below a proof, above the registry, §16.2b.2; a proof that returns a part of a parameter wins). The report names every attribute a function carries; nullability attributes are header facts c_import reads directly. Selfhost: buf_alloc, whose body calls a function the package does not define, is an owned producer by its annotation. GObject-introspection transfer annotations are the step's other half, still open.
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery on 088a01b under the pinned seed: GREEN, wall 339 s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant