⬡
Ferrous Bridge
Papers
GitHub
☰ Contents
Contents
1.1 Pipeline preliminaries: CAB, OSG, and the agent stages
1.2 Contribution
1.3 Notation
2.1 Why we need a formal semantics
2.2 Syntax of the translation fragment
2.3 Stores, locations, values
2.4 Reading indeterminate bytes is undefined
2.5 Sequence points and the sequenced-before relation
2.6 Small-step rules (selected)
2.7 Refinement to Rust
3.1 Class UB1: Spatial memory safety
3.2 Class UB2: Temporal memory safety
3.3 Class UB3: Type-based aliasing (TBAA)
3.4 Class UB4: Signed integer overflow
3.5 Class UB5: Unsequenced modification
3.6 Class UB6: Indeterminate values and uninitialised reads
3.7 Class UB7: Concurrent data races
3.8 Tabular summary
4.1 Idiom I1: The yaml_string_t triple
4.2 Idiom I2: The STRING_*, STACK_*, QUEUE_* macro families
4.3 Idiom I3: integer-as-bool return convention
4.4 Idiom I4: output-parameter convention
4.5 Idiom I5: the yaml_event_t tagged union
4.6 Idiom I6: custom allocator hooks
4.7 Idiom I7: scanner-into-parser buffer aliasing
4.8 Idiom I8: nullable optional pointers
4.9 Idiom I9: ambient error state in the parser
4.10 Idiom I10: character predicate macros
4.11 Idiom I11: setjmp/longjmp non-local control flow
5.1 Contract C1 for I1 (yaml_string_t)
5.2 Contract C2 for I2 (container macros)
5.3 Contract C3 for I3 (integer-as-bool)
5.4 Contract C4 for I4 (output parameter)
5.5 Contract C5 for I5 (tagged union)
5.6 Contract C6 for I6 (allocator hooks)
5.7 Contract C7 for I7 (aliasing)
5.8 Contract C8 for I8 (nullable)
5.9 Contract C9 for I9 (ambient error)
5.10 Contract C10 for I10 (predicates)
5.11 Contract C11 for I11 (longjmp)
5.12 Composability
5.13 The proof-obligation problem: undecidability and human-in-the-loop
9.1 What this paper is not
9.2 Limits of the contract approach
9.3 Why not just translate to unsafe Rust and call it done?
9.4 Future directions
11.1 Sub-phase A1.1: Source acquisition and pinning
11.2 Sub-phase A1.2: Static analysis with Clang
11.3 Sub-phase A1.3: Pointer and use-def analysis
11.4 Sub-phase A1.4: Dynamic analysis
11.5 Sub-phase A1.5: CAB schema and packaging
11.6 Total estimate and dependency DAG
11.7 Definition of done
Part I
The C Language as a Translation Source: Semantics, Undefined Behavior, and the libyaml Idiom Set
29 pages
cs.PL
DOI: 2026.04.c
Next →
Idiomatic Safe Rust as a Translation Target: Ownership, Lifetimes, and ABI-Compatible Parser Design
⤓ PDF