pub struct LeanEncoder<'genv, 'tcx> {
genv: GlobalEnv<'genv, 'tcx>,
path: PathBuf,
project: String,
defs_file_name: String,
pretty_var_map: PrettyMap<LocalVar>,
}Fields§
§genv: GlobalEnv<'genv, 'tcx>§path: PathBuf§project: String§defs_file_name: String§pretty_var_map: PrettyMap<LocalVar>Implementations§
Source§impl<'genv, 'tcx> LeanEncoder<'genv, 'tcx>
impl<'genv, 'tcx> LeanEncoder<'genv, 'tcx>
pub fn new( genv: GlobalEnv<'genv, 'tcx>, pretty_var_map: PrettyMap<LocalVar>, ) -> Self
fn generate_lake_project_if_not_present(&self) -> Result<(), Error>
fn generate_sort_def_file_if_not_present( &self, sort: &SortDecl, ) -> Result<(), Error>
fn generate_func_def_file_if_not_present( &self, fun: &ConstDecl, has_opaque_sorts: bool, has_data_decls: bool, ) -> Result<(), Error>
fn generate_opaque_sort_files(&self, sorts: &[SortDecl]) -> Result<(), Error>
fn generate_struct_defs_file( &self, data_decls: &[DataDecl], has_opaque_sorts: bool, ) -> Result<(), Error>
fn generate_opaque_func_files( &self, funs: &[ConstDecl], has_opaque_sorts: bool, has_data_decls: bool, ) -> Result<(), Error>
fn generate_func_defs_file( &self, func_defs: &[FunDef], has_opaque_sorts: bool, has_data_decls: bool, has_opaque_funcs: bool, ) -> Result<(), Error>
fn generate_lib_file(&self) -> Result<(), Error>
pub fn encode_defs( &self, opaque_sorts: &[SortDecl], opaque_funs: &[ConstDecl], data_decls: &[DataDecl], func_defs: &[FunDef], ) -> Result<(), Error>
fn theorem_path(&self, theorem_name: &str) -> PathBuf
fn generate_theorem_file( &self, theorem_name: &str, kvars: &[KVarDecl], cstr: &Constraint, ) -> Result<(), Error>
fn generate_proof_file_if_not_present( &self, def_id: MaybeExternId, theorem_name: &str, ) -> Result<(), Error>
pub fn encode_constraint( &self, def_id: MaybeExternId, kvars: &[KVarDecl], cstr: &Constraint, ) -> Result<(), Error>
fn check_proof_help(&self, theorem_name: &str) -> Result<()>
pub fn check_proof(&self, def_id: MaybeExternId) -> QueryResult<()>
fn snake_case_to_pascal_case(snake: &str) -> String
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