Repository navigation
cargo-hax-v0.4.0
·
342 commits
to main
since this release
Changes to the Rust engine:
- Fix diagnostic reporting
Changes to the OCaml engine:
- Don't fail when an item carries a hax attribute pointing to an item that
another backendcfg-ed out. Backend-specific item quotes such as
#[hax_lib::legacy_lean::before(..)]used to abort extraction to any other
backend withCould not find item with UID ...(#2026) - Drop rustc's internal
<cfg_trace>/<cfg_attr_trace>marker attributes, which
made the engine print Rust code that could not be parsed back (#2026)
Changes to the frontend:
- Fix all observable issues in the new rust version of the THIR importer
- Add access to representation information of other types than just enums
Changes to cargo-hax:
- Manage aeneas and charon versions with
cargo hax tools, pinned via a committedhax.toml,
installed from pre-built binaries verified against a shipped manifest cargo hax into leangenerates a complete, buildable Lean package by default (#2142)- Publish a pre-built
cargo-haxbinary per supported platform with every release, so that
cargo binstall cargo-haxinstalls it without building - Make
cargo install cargo-haxbuild on any recent toolchain, so that theleanbackend can be
installed on its own and pinned per project withcargo-run-bin; the JSON schema exporter the
OCaml engine's build consumes moved behind the newlegacy-enginefeature - Add proof scenarios: named extraction configurations committed as
[scenario.<name>]tables in
hax.toml, run with the newcargo hax extract [NAME]...subcommand into per-scenario
proofs/<scenario>/<backend>/directories - Add support for specifications written with
anodized:
#[spec(requires: ..)],#[spec(ensures: ..)]and#[spec(maintains: ..)]now extract as
pre- and postconditions, on every backend - Validate driver reports on cargo's stderr: only haxmeta files of workspace crates under the
run's target directory are accepted, and a lost or partial report set fails the run instead
of silently producing an incomplete extraction - Exit with a failing status whenever an error was reported
- Make traits from
corewith default methods visible to charon so that impls of these traits have the right defaulted implementations (#2172)
Changes to the hax-lib crate:
- Add
hax_lib::ensures_ref, anensureswhose closure takes the result by reference,
for postconditions over a type that is notCopy - Remove dependency to proc_macro_error2 (unmaintained) (#2039)
- Keep the generics of a struct in scope in the
refinementfunctions generated by
#[hax_lib::attributes], fixing refinements on fields that mention a const generic (#899) - Allow specifications on the methods of an
implblock whose signature mentions an associated
type ofSelf. The cases that remain unsupported (trait declarations, and associated types the
block does not define) now fail with an explicit error instead of invalid code (#2089) - Support quote annotations (
before,after,options) on inherentimplblocks and on their
items (#1698) - Support
requires, andensureswritten behind acfg_attrin
animplblock or a trait annotated with#[hax_lib::attributes], keeping
thecfg_attrpredicate (#1496) - Restore the documentation of the proc-macros, which was missing on docs.rs and in builds without
--cfg hax(#1759) - Fix the docs.rs build of
hax-lib: itsdocs.rsmetadata table was misspelled, and--cfg hax
has to reach rustc too so that thecfg(hax)dependencies resolve (#2087)
Changes to core models:
- Improve core models library (#2049, #2157, #2077, #2160, #2187, #2199)
- Add core model testing infrastructure
Changes to the F* backend and library:
- Fix some regressions in the F* proof lib (particularly the
vec_dequemodels) - Specify the F*
overflowing_add/overflowing_subprimitives, which were left uninterpreted.
Thechecked_*integer models route through them, so they could not be used in a proof (#2127) - Specify
abs_i8/16/32/64/128/isize(previously wholly uninterpreted) with the documented
wrap-to-MINresult refinement, unblocking proofs abouti*::absand the AVX2
_mm256_abs_epi32models (#2107) - Fix the overflow condition of the F*
mul_overflowprimitive, which compared againstmaxint
twice.overflowing_mul/checked_mulreported overflow for every product except exactlymaxint
Changes to the Lean backend and library:
- Add Lean/Aeneas as a new backend (#2075, #2071, #2050, #2051). The previous Lean backend is
now calledlegacy-leanin the CLI (#2064). - Lean library for the new Lean/Aeneas backend (#2080, #2146, #2130)
- Legacy Lean: Hoist methods to allow (mutual) recursion between methods and associated items of
the same impl (163) - Model
Iterator's provided methods, somap/filter/fold/collect/revand the other
adapters resolve when a downstream crate is extracted to Lean. AddsDoubleEndedIterator,
ExactSizeIteratorand theRev,FilterMap,TakeWhile,SkipWhile,MapWhile,Inspect
andFuseadapters, makescollectintoVecandResultcomputable, and gives
zip/chainstd'sIntoIteratorbound so a collection can be passed directly (#2200)
Miscellaneous:
- Update the required OCaml version to 5.4.1 (#2137)
- New testing framework for the engine(s)
- Four examples for the new Aeneas/Lean backend (#2058, #2059, #2070, #2061)
- Fix missing tools in the Nix dev shells (#2131)
- Check examples through
just check-examplesinstead of a Nix flake check (#2131) - Document the supported platforms: Linux (
x86_64andaarch64) and macOS (aarch64). Windows
and macOS on Intel are not supported and are no longer built in CI