Skip to main content

AxiomValidator

Struct AxiomValidator 

Source
pub struct AxiomValidator { /* private fields */ }
Expand description

Axiom validator for checking axiom consistency and tracking dependencies.

Implementations§

Source§

impl AxiomValidator

Source

pub fn new() -> Self

Create a new axiom validator.

Source

pub fn register(&mut self, name: Name)

Register an axiom.

Source

pub fn mark_unsafe(&mut self, name: Name)

Mark an axiom as unsafe.

Source

pub fn mark_safe(&mut self, name: Name)

Mark an axiom as safe.

Source

pub fn is_axiom(&self, name: &Name) -> bool

Check if a name is a registered axiom.

Source

pub fn is_unsafe(&self, name: &Name) -> bool

Check if an axiom is marked as unsafe.

Source

pub fn is_classical(&self, name: &Name) -> bool

Check if an axiom is classical.

Source

pub fn all_axioms(&self) -> Vec<&Name>

Get all registered axioms.

Source

pub fn unsafe_axioms(&self) -> Vec<&Name>

Get all unsafe axioms.

Source

pub fn classify(&self, name: &Name) -> AxiomSafety

Classify an axiom’s safety.

Source

pub fn check_dependencies(&self, expr: &Expr) -> HashSet<Name>

Extract all constant dependencies from an expression.

Source

pub fn axiom_dependencies(&self, expr: &Expr) -> HashSet<Name>

Extract only axiom dependencies from an expression.

Source

pub fn is_constructive(&self, expr: &Expr) -> bool

Check if an expression is constructive (uses no classical axioms).

Trait Implementations§

Source§

impl Default for AxiomValidator

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.