Sources and Test Coverage
The following sources describe frontend extraction, backend translation, and existing coverage.
Frontend rust-llbc
- Contract macros and identifier rewriting: parsing and expansion.
- Internal interfaces: argument types and closure constraints.
- Function-body extraction and type-specification extraction: associating specifications with programs.
- Marker recognition: implication and old-state markers.
- Frontend integration examples and LLBC snapshots: existing combined cases.
Backend llbc-why3
- Function-contract translation and specification-closure translation: preconditions, postconditions, and captured values.
- Statement translation and logical-term translation: assertion, assumption, and quantifier branches.
- Builtin-function translation: unimplemented
SpecImpliesandSpecOldbranches. - Type translation and type-declaration translation: supported types; automatic type-invariant enforcement is not connected.
- End-to-end examples and saved results: basic contract verification for
max,strict_sub, andsquare.
Test coverage
Frontend integration cases include preconditions, postconditions, assertions, a generic struct invariant, and combinations of universal quantification, implication, and container access. The to_sorted body is a placeholder returning an empty vector; it illustrates extraction rather than a verified sorting algorithm.
The repository frontend integration examples do not yet include contract_assume! or exists!. Both have extraction implementations; problems with outer captures are described in the quantifier implementation boundaries. old has name-rewriting tests but no complete old-state specification integration case.
Saved backend end-to-end results cover basic preconditions/postconditions for max, strict_sub, and square. Assertions, assumptions, and quantifiers have translation implementations but are not included in these end-to-end cases.