Struct Automaton

Source
pub struct Automaton<F: Symbol, Q: State, I> { /* private fields */ }
Expand description

Alternating tree automaton.

Implementations§

Source§

impl<F: Symbol, Q: State, I> Automaton<F, Q, I>

Source

pub fn new() -> Automaton<F, Q, I>

Create a new empty alternating tree automaton.

Source

pub fn states(&self) -> Keys<'_, Q, HashMap<F, Clause<Q, I>>>

Source

pub fn clauses_for_state(&self, q: &Q) -> Iter<'_, F, Clause<Q, I>>

Source

pub fn add(&mut self, state: &Q, symbol: &F, conjuction: Conjuction<Q, I>)

Add the given conjuction to the clause (state, symbol).

Source

pub fn is_initial(&self, q: &Q) -> bool

Source

pub fn set_initial(&mut self, q: Q) -> bool

Set the given state an initial state. Return true if the state was not already initial. Return false if it was already an initial state.

Source

pub fn map_states<R: State, M>(&self, g: M) -> Automaton<F, R, I>
where M: Fn(&Q) -> R, I: Clone,

Source§

impl<F: Symbol, Q: State> Automaton<F, Q, u32>

Source

pub fn add_transition( &mut self, bottom_up::Configuration: &Configuration<F, Q>, state: &Q, )

Add a bottom-up transition. It is added as a clause to the corresponding (state, symbol) pair.

Trait Implementations§

Source§

impl<'a, F: Symbol, Q: State, L: Label> From<&'a Automaton<F, Q, L>> for Automaton<F, Q, u32>

Source§

fn from(bottom_up: &'a Automaton<F, Q, L>) -> Automaton<F, Q, u32>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F, Q, I> Freeze for Automaton<F, Q, I>

§

impl<F, Q, I> RefUnwindSafe for Automaton<F, Q, I>

§

impl<F, Q, I> Send for Automaton<F, Q, I>
where F: Send, Q: Send, I: Send,

§

impl<F, Q, I> Sync for Automaton<F, Q, I>
where F: Sync, Q: Sync, I: Sync,

§

impl<F, Q, I> Unpin for Automaton<F, Q, I>
where F: Unpin, Q: Unpin, I: Unpin,

§

impl<F, Q, I> UnwindSafe for Automaton<F, Q, I>
where F: UnwindSafe, Q: UnwindSafe, I: UnwindSafe,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V