Struct RawInstGraph

Source
pub struct RawInstGraph {
    pub graph: DiGraph<Node, EdgeKind, RawIx>,
    /* private fields */
}

Fields§

§graph: DiGraph<Node, EdgeKind, RawIx>

Implementations§

Source§

impl RawInstGraph

Source

pub fn reset_disabled_to_raw( &mut self, f: impl Fn(RawNodeIndex, &RawInstGraph) -> bool, ) -> (bool, bool)

Updates which nodes are disabled based on the predicate f. The hidden of all non-disabled nodes is reset to false so any filters will need to be reapplied. It returns two booleans: the first indicates if any state was modified, the second indicates if any node was enabled/disabled.

Analyses should be reapplied after this function is called! (unless the second boolean is false)

Source§

impl RawInstGraph

Source

pub fn reset_visibility_to(&mut self, hidden: bool) -> bool

Source

pub fn can_set_visibility(&self, node: &Node, hidden: bool) -> bool

Source

pub fn set_visibility<I: IndexesInstGraph>( &mut self, node: I, hidden: bool, ) -> bool

Source

pub fn keep_first_n( &mut self, nodes: impl Iterator<Item = RawNodeIndex>, n: usize, ) -> bool

Source

pub fn set_visibility_when( &mut self, hidden: bool, p: impl FnMut(&Self, RawNodeIndex, &Node) -> bool, ) -> bool

When predicate p evaluates to true the visibility of the corresponding node is set to hidden. Use this when hiding nodes and the predicate is expensive as it avoids calling the predicate a lot more than set_visibility_all.

Source

pub fn set_visibility_all( &mut self, p: impl FnMut(&Self, RawNodeIndex, &Node) -> Option<bool>, ) -> bool

When predicate p evaluates to Some the visibility of the corresponding node is set to hidden (true) or visible (false).

Source

pub fn set_visibility_many<I: IndexesInstGraph>( &mut self, hidden: bool, nodes: impl Iterator<Item = I>, ) -> bool

Source

pub fn path_to_root_graph( &self, longest: bool, ) -> EdgeFiltered<Reversed<&DiGraph<Node, EdgeKind, RawIx>>, impl Fn(ReversedEdgeReference<EdgeReference<'_, EdgeKind, RawIx>>) -> bool + '_>

A graph with edges that aren’t part of any longest/shortest path to a root filtered out. The edges are also reversed, so the graph can be walked from any node to find the longest/shortest path to a root.

Source

pub fn path_to_leaf_graph( &self, longest: bool, ) -> EdgeFiltered<&DiGraph<Node, EdgeKind, RawIx>, impl Fn(EdgeReference<'_, EdgeKind, RawIx>) -> bool + '_>

A graph with edges that aren’t part of any longest/shortest path to a leaf filtered out. The graph can be walked from any node to find the longest/shortest path to a leaf.

Source

pub fn show_longest_path_through( &mut self, node: RawNodeIndex, ) -> (bool, Vec<RawNodeIndex>)

Source§

impl RawInstGraph

Source

pub fn new(parser: &Z3Parser) -> Result<Self>

Source

pub fn index(&self, kind: NodeKind) -> RawNodeIndex

Source

pub fn rev(&self) -> Reversed<&DiGraph<Node, EdgeKind, RawIx>>

Source

pub fn visible_nodes(&self) -> usize

Source

pub fn node_indices(&self) -> impl Iterator<Item = RawNodeIndex>

Source

pub fn neighbors<'a>( &'a self, node: RawNodeIndex, reach: &'a TiVec<RawNodeIndex, ReachNonDisabled>, ) -> Neighbors<'a>

Similar to self.graph.neighbors but will walk through disabled nodes.

Note: Iterating the neighbors is not a O(1) operation.

Source

pub fn neighbors_directed<'a>( &'a self, node: RawNodeIndex, dir: Direction, reach: &'a TiVec<RawNodeIndex, ReachNonDisabled>, ) -> Neighbors<'a>

Similar to self.graph.neighbors_directed but will walk through disabled nodes.

Note: Iterating the neighbors is not a O(1) operation.

Source

pub fn inst_to_raw_idx(&self) -> impl Fn(InstIdx) -> RawNodeIndex

Source

pub fn hypotheses(&self, parser: &Z3Parser, proof: ProofIdx) -> Vec<ProofIdx>

Source§

impl RawInstGraph

Source

pub fn partition(&mut self) -> Result<Subgraphs>

Trait Implementations§

Source§

impl Debug for RawInstGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Index<RawEdgeIndex> for RawInstGraph

Source§

type Output = EdgeKind

The returned type after indexing.
Source§

fn index(&self, index: RawEdgeIndex) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T: IndexesInstGraph> Index<T> for RawInstGraph

Source§

type Output = Node

The returned type after indexing.
Source§

fn index(&self, index: T) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T: IndexesInstGraph> IndexMut<T> for RawInstGraph

Source§

fn index_mut(&mut self, index: T) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. 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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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