Struct fbas_analyzer::Analysis

source ·
pub struct Analysis { /* private fields */ }
Expand description

Front end for many interesting FBAS analyses. Among other things, it does ID space shrinking (which improves memory and performance when using bit sets) and caches the results of long-running computations.

Implementations§

source§

impl Analysis

source

pub fn new(fbas: &Fbas) -> Self

Start a new Analysis

source

pub fn shrink_to_core_nodes(&mut self)

Shrink the FBAS to its core nodes, i.e., to the union of all quorum-containing strongly connected components. Future splitting sets returned by this object will miss any splitting sets that do not consist entirely of core nodes and don’t cause at least one pair of core nodes to end up in non-intersecting quorums.

source

pub fn all_nodes(&self) -> NodeIdSetResult

Nodes in the analyzed FBAS - not filtered by relevance.

source

pub fn satisfiable_nodes(&self) -> NodeIdSetResult

Nodes in the analyzed FBAS that can be satisfied given their quorum sets and the nodes existing in the FBAS.

source

pub fn unsatisfiable_nodes(&self) -> NodeIdSetResult

Nodes in the analyzed FBAS that can never be satisfied given their quorum sets and the nodes existing in the FBAS.

source

pub fn has_quorum_intersection(&self) -> bool

Regular quorum intersection check via finding all minimal quorums (algorithm inspired by Lachowski 2019).

source

pub fn has_quorum_intersection_via_alternative_check( &self ) -> (bool, Option<NodeIdSetVecResult>)

Quorum intersection check that works without enumerating all minimal quorums.

source

pub fn minimal_quorums(&self) -> NodeIdSetVecResult

Minimal quorums - no proper subset of any of these node sets is a quorum.

source

pub fn minimal_blocking_sets(&self) -> NodeIdSetVecResult

Minimal blocking sets - minimal indispensable sets for global liveness.

source

pub fn minimal_splitting_sets(&self) -> NodeIdSetVecResult

Minimal splitting sets - minimal indispensable sets for safety.

source

pub fn minimal_splitting_sets_with_affected_quorums( &self ) -> Vec<(NodeIdSetResult, NodeIdSetVecResult)>

For each minimal splitting set, returns two or more quorums that it’s splitting, i.e., quorums that lack quorum intersection after the splitting sets are deleted from the FBAS.

source

pub fn top_tier(&self) -> NodeIdSetResult

Top tier - the set of nodes exclusively relevant when determining minimal quorums and minimal blocking sets.

source

pub fn symmetric_top_tier(&self) -> Option<QuorumSet>

If the top tier is symmetric, i.e., each two top-tier nodes have the same quorum set, return the top tier’s common quorum set. Else return None.

source

pub fn symmetric_clusters(&self) -> Vec<QuorumSet>

Symmetric clusters - sets of nodes in which each two nodes have the same quorum set. Here, each found symmetric cluster is represented by its common quorum set.

Trait Implementations§

source§

impl Debug for Analysis

source§

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

Formats the value using the given formatter. 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>,

§

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

§

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.