pub(crate) struct LeanEncoder<'genv, 'tcx> {
def_id: MaybeExternId,
genv: GlobalEnv<'genv, 'tcx>,
fun_defs: Vec<FunDef>,
constants: Vec<ConstDef>,
constraint: Constraint,
}
Fields§
§def_id: MaybeExternId
§genv: GlobalEnv<'genv, 'tcx>
§fun_defs: Vec<FunDef>
§constants: Vec<ConstDef>
§constraint: Constraint
Implementations§
Source§impl<'genv, 'tcx> LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> LeanEncoder<'genv, 'tcx>
pub fn new( def_id: MaybeExternId, genv: GlobalEnv<'genv, 'tcx>, fun_defs: Vec<FunDef>, constants: Vec<ConstDecl>, constraint: Constraint, ) -> Self
pub fn fun_defs(&self) -> &[FunDef] ⓘ
pub fn constraint(&self) -> &Constraint
pub fn constants(&self) -> &[ConstDef]
pub(crate) fn theorem_name(&self) -> String
fn proof_name(&self) -> String
fn generate_lake_project_if_not_present( &self, lean_path: &Path, project_name: &str, ) -> Result<(), Error>
fn generate_def_file( &self, lean_path: &Path, project_name: &str, ) -> Result<(), Error>
fn generate_proof_file_if_not_present( &self, lean_path: &Path, project_name: &str, ) -> Result<(), Error>
fn check_proof_help(&self, lean_path: &Path, project_name: &str) -> Result<()>
pub fn check_proof( &self, lean_path: &Path, project_name: &str, ) -> QueryResult<()>
fn snake_case_to_pascal_case(snake: &str) -> String
fn extract_const_defs( const_decls: Vec<ConstDecl>, constraint: &Constraint, ) -> Vec<ConstDef>
fn extract_const_def( const_decl: &ConstDecl, constraint: &Constraint, acc: &mut Vec<Expr>, )
Trait Implementations§
Auto Trait Implementations§
impl<'genv, 'tcx> Freeze for LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> !RefUnwindSafe for LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> !Send for LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> !Sync for LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> Unpin for LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> !UnwindSafe for LeanEncoder<'genv, 'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more