Skip to main content

Module gen

Module gen 

Source
Expand description

Lean files generated from Aeneas’s model: the aliases of the loops, the obligations, the functions calling the Rust functions (rs: externs) and the @[csimp] replacements.

Structs§

AeneasDecl
A declaration of Aeneas’s output.
Binder
A binder of the signature of a definition of Aeneas’s output.
GenericParts
The parts of the obligation of a generic function before the arguments: the binders of the type parameters, the instances and the hypotheses on them (∀ {T : Type} [LinearOrder T] (ord : core.cmp.Ord T) [LeanRust.OrdModel ord], ), and the instance arguments of the model.
Spec
A resolved spec of an obligation.

Constants§

AENEAS_MODEL_MODULE
The module of crate::AENEAS_MODEL_LEAN in the crate’s Lean package.
LEAN_HEADER
RESERVED_LABELS
The names reserved below a model name.

Functions§

aeneas_unit
The unit name (see crate::model::ModelFn::rust) of a Rust path of Aeneas’s docstrings: probe::inv::{probe::inv::Item}::new → crate::inv::Item::new, probe::inv::{impl probe::inv::Weigh for probe::inv::Item}::weight → crate::inv::<Item as Weigh>::weight. None for paths outside the crate.
crate_instance
The instance of the trait structure trait_struct for the crate’s type rust (its last path segment) in Aeneas’s output funs: def Id.Insts.CoreCmpOrd : core.cmp.Ord Id := {.
decl_binders
The binders of the definition at the start of body (def f {T : Type _} (inst : ..) (a : T) : Result T := ..), up to the colon of its type.
generic_parts
The obligation parts of a generic model from the binders of Aeneas’s definition: every type parameter with the classes its bounds need, every instance followed by the hypothesis of its laws. values are the parameters of the Rust function.
law_classes
The Lean classes of a trait structure of Aeneas (the head of the type of an instance binder): the classes of the type parameter and the class of the laws of the instance.
lean_ident
A Lean identifier for s, quoted with «» when it is a keyword.
lean_params
The parameter names of a model in Lean.
library_instance
The traits Aeneas’s library implements for each library_type: the scalars implement all of law_classes, bool PartialEq, Clone and Copy, () PartialEq.
library_type
The suffix of Aeneas’s instances of a Rust type of its library (U32 in core.cmp.OrdU32): the scalars, bool and ().
loop_aliases
The aliases of the loops of f (model lean): label paths and Aeneas names.
model_module
The Lean module of the model’s functions.
module_of
<prefix>.<crate>.<module path> (LeanRustGen.Obligation.probe.inv).
module_path
The path of the file of a Lean module relative to the package.
obligation_statement
The statement of an obligation: ∀ args, pre args = true → M args ⦃ r => post args r = true ⦄ for ensures, ∀ args, M args = ok (spec args) for refines (a label refines or refines.<type>).
parse_aeneas
The declarations of a file of Aeneas’s output (Funs.lean, Types.lean), in order.
reachable_units
The units of the crate the model of root (a Lean name) depends on: the declarations it refers to, transitively, with their Rust paths.
rust_extern
The Rust expression of the rs: extern of f: rs:crate::a::f(_,&), with ->() when it returns (). types are the types of the type parameters of a generic function.

Type Aliases§

Pos
A line and a column.