pub struct Checker<Split: SplitStrategy> {
pub(crate) backend: AnyBackend,
pub(crate) rules: RuleSet<Split>,
pub(crate) modules: DashSet<Module, FxBuildHasher>,
pub(crate) documents: DashSet<Document, FxBuildHasher>,
pub(crate) facts: GlobalFacts,
pub(crate) hoas: Option<HOASSymbols>,
pub(crate) implicits: AtomicUsize,
pub(crate) current: Vec<LeafUri>,
pub(crate) context: Vec<ModuleUri>,
pub(crate) __phantom: PhantomData<Split>,
}Fieldsยง
ยงbackend: AnyBackendยงrules: RuleSet<Split>ยงmodules: DashSet<Module, FxBuildHasher>ยงdocuments: DashSet<Document, FxBuildHasher>ยงfacts: GlobalFactsยงhoas: Option<HOASSymbols>ยงimplicits: AtomicUsizeยงcurrent: Vec<LeafUri>ยงcontext: Vec<ModuleUri>ยง__phantom: PhantomData<Split>Implementationsยง
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub(crate) fn get_module_like(&self, uri: &ModuleUri) -> Result<ModuleLike, ()>
pub(crate) fn get_module(&self, uri: &ModuleUri) -> Result<Module, ()>
pub(crate) fn get_symbol( &self, uri: &SymbolUri, prepare: impl Fn(Term) -> Term, ) -> Result<SharedDeclaration<Symbol>, ()>
pub(crate) fn get_variable( &self, uri: &DocumentElementUri, ) -> Result<SharedDocumentElement<VariableDeclaration>, ()>
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub(crate) fn new_solvable(&self) -> Id
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub(crate) fn wrap_task<'t, R: Debug + Clone + 'static, F>( &'t self, task: CheckingTask<'t>, unknowns: Option<Solutions>, then: F, ) -> (Option<R>, Solutions, PreCheckLog)
pub(crate) fn wrap_none<'t, R: Debug + Clone + 'static, F>( &'t self, unknowns: Option<Solutions>, then: F, ) -> (Solutions, R)
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub fn check_assertion( &mut self, p: &LogicalParagraph, ) -> Option<Vec<CheckResult>>
pub fn check_definition(&mut self, p: &LogicalParagraph) -> Vec<CheckResult>
pub fn check_proof(&mut self, p: &LogicalParagraph) -> Option<CheckResult>
fn proof_step( &mut self, s: &ParagraphStep, context: &mut ProofCheckState<'_>, block: Option<&SymbolUri>, ) -> Option<ProofStepResult>
fn step_data_i( &self, context: &mut ProofCheckState<'_>, hoas: &HOASSymbols, var_name: Option<&DocumentElementUri>, method: Option<&Term>, justification: Option<&Term>, arguments: &[Option<(Term, SourceRange)>], yields: Option<&Term>, needs_def: bool, block: Option<&SymbolUri>, ) -> (Option<ProofStepCheckResult>, Option<Term>, Option<Term>)
fn step_data( &mut self, context: &mut ProofCheckState<'_>, var_name: Option<&DocumentElementUri>, method: Option<&Term>, justification: Option<&Term>, arguments: &[Option<(Term, SourceRange)>], yields: Option<&Term>, is_assumption: bool, block: Option<&SymbolUri>, ) -> Option<ProofStepCheckResult>
fn conclusion_step( &self, context: &mut ProofCheckState<'_>, var_name: Option<&DocumentElementUri>, method: Option<&Term>, justification: Option<&Term>, arguments: &[Option<(Term, SourceRange)>], yields: Option<&Term>, block: Option<&SymbolUri>, ) -> Option<ProofStepCheckResult>
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub(crate) fn bind_implicits(&self, nt: &Term) -> Option<Term>
fn collect_implicits(&self, nt: &Term) -> Option<(Vec<ComponentVar>, Term)>
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
Sourceยงimpl<Split: SplitStrategy> Checker<Split>
impl<Split: SplitStrategy> Checker<Split>
pub(crate) fn reset(&self)
pub fn into_cache(self) -> CheckerCache
pub fn set_cache(&mut self, cache: CheckerCache)
pub fn new(backend: AnyBackend) -> Self
pub(crate) fn set_hoas(&mut self)
pub fn hoas(&self) -> Option<&HOASSymbols>
pub fn check_document( &mut self, d: &Document, ) -> Result<(DocumentCheckResult, Vec<Module>), ModuleUri>
pub fn check_module( &mut self, m: &Module, ) -> Result<Vec<ContentCheckResult>, ModuleUri>
pub fn check_subterm_term( &mut self, term: Term, sub: Term, ) -> Option<SubtermCheckResult>
pub fn check_subterm_path( &mut self, term: Term, path: TermPath, ) -> Option<SubtermCheckResult>
pub(crate) fn check_subterm_i( &self, unks: Solutions, sub: &Term, ctx: Vec<&ComponentVar>, ) -> SubtermCheckResult
pub(crate) fn check_components( &self, tpc: &TermContainer, dfc: &TermContainer, bind: bool, ) -> Option<SymbolCheckResult>
pub(crate) fn df_only( &self, df: &Term, dfc: &TermContainer, tpc: &TermContainer, bind: bool, set_presentation: bool, ) -> SymbolCheckResult
pub(crate) fn infer_df( &self, dfc: &TermContainer, tp: &Term, tpc: &TermContainer, bind: bool, ) -> SymbolCheckResult
pub(crate) fn df_and_tp( &self, df: &Term, dfc: &TermContainer, tp: &Term, tpc: &TermContainer, bind: bool, set_df_presentation: bool, ) -> SymbolCheckResult
pub fn check_symbol(&mut self, s: &Symbol) -> Option<SymbolCheckResult>
pub fn check_variable( &mut self, s: &VariableDeclaration, ) -> Option<SymbolCheckResult>
pub(crate) fn check_type( &self, unknowns: Option<Solutions>, tm: &Term, tp: &Term, ) -> (Option<bool>, Solutions, PreCheckLog)
pub(crate) fn prove( &self, unknowns: Option<Solutions>, goal: &Term, ) -> (Option<Term>, Solutions, PreCheckLog)
pub(crate) fn check_subtype( &self, unknowns: Option<Solutions>, sub: &Term, sup: &Term, ) -> (Option<bool>, Solutions, PreCheckLog)
pub(crate) fn infer_type( &self, unknowns: Option<Solutions>, t: &Term, ) -> (Option<Term>, Solutions, PreCheckLog)
pub(crate) fn check_inhabitable( &self, unknowns: Option<Solutions>, t: &Term, ) -> (Option<bool>, Solutions, PreCheckLog)
pub(crate) fn prepare( &self, unks: Option<Solutions>, t: Term, ) -> (Solutions, Term)
pub(crate) fn revert_prepare(&self, t: Term) -> Term
pub(crate) fn check_morphism( &mut self, m: &Morphism, ) -> Option<Vec<CheckResult>>
pub(crate) fn load_context(&mut self, m: &Module)
pub(crate) fn sort(&mut self, modules: Vec<ModuleUri>) -> usize
Auto Trait Implementationsยง
impl<Split> !Freeze for Checker<Split>
impl<Split> !RefUnwindSafe for Checker<Split>
impl<Split> Send for Checker<Split>
impl<Split> Sync for Checker<Split>
impl<Split> Unpin for Checker<Split>where
Split: Unpin,
impl<Split> UnsafeUnpin for Checker<Split>
impl<Split> !UnwindSafe for Checker<Split>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยง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ยงimpl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
ยงimpl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
ยงimpl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
ยงimpl<D> OwoColorize for D
impl<D> OwoColorize for D
ยงfn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Set the foreground color generically Read more
ยงfn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
ยงfn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
ยงfn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
ยงfn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
ยงfn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
ยงfn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
ยงfn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
ยงfn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
ยงfn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
ยงfn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
ยงfn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
ยงfn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
ยงfn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
ยงfn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
ยงfn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
ยงfn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
ยงfn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
ยงfn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
ยงfn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
ยงfn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
ยงfn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
ยงfn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
ยงfn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
Hide the text
ยงfn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
ยงfn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either [
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read moreยงfn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either [
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read moreยงfn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
ยงfn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
ยงfn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
ยงfn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.
ยงfn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: impl Into<Stream>,
apply: ApplyFn,
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn>where
ApplyFn: Fn(&'a Self) -> Out,
fn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: impl Into<Stream>,
apply: ApplyFn,
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn>where
ApplyFn: Fn(&'a Self) -> Out,
Apply a given transformation function to all formatters if the given stream
supports at least basic ANSI colors, allowing you to conditionally apply
given styles/colors. Read more
ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.