Expand description
Procedural macros of leanfran.
lean! expands to a module that includes the Rust code the build script generated from the
Lean source: include!(concat!(env!("OUT_DIR"), "/leanfran/<file hash>/<name>.rs")). It
does not run Lean. The macro reads OUT_DIR and reports a missing build script or a
missing generated file with compile_error!.
Macros§
- lean
- Lean source checked and compiled by the build script.
Attribute Macros§
- exported
- Marks a generated public function with the full name of the Lean definition it runs. It changes nothing; tools read it to map Rust paths to Lean names.
- model
- Binds a function (or the methods of an impl block) to Lean specs.
- opaque
- A function whose body is not extracted: its Lean model is written by hand in
lean/External.lean. The item is unchanged; under#[cfg(test)]the macro adds a proptest of the function against that model (keyscheckandstrategyas in#[model]), when the build script generated it.
Derive Macros§
- Model
- Implements
Model(the representation of the type in Aeneas’s model: the constructor layout of the structure or inductive type Aeneas generates for it) andSpecArg(byClone).