Trait snowcap::strategies::Strategy[][src]

pub trait Strategy {
    fn new(
        net: Network,
        modifiers: Vec<ConfigModifier>,
        hard_policy: HardPolicy,
        time_budget: Option<Duration>
    ) -> Result<Box<Self>, Error>;
fn work(&mut self, abort: Stopper) -> Result<Vec<ConfigModifier>, Error>;
fn num_states(&self) -> usize; fn synthesize(
        net: Network,
        end_config: Config,
        hard_policy: HardPolicy,
        time_budget: Option<Duration>,
        abort: Stopper
    ) -> Result<Vec<ConfigModifier>, Error> { ... } }
Expand description

Infterface for all strategies

Required methods

Create the strategy

Main function to find a valid reconfiguration sequence (if it exists) and return it. The function also returns the number of sequences that were tested.

Returns the number of states explored by the strategy.

This method is only available if the "count-states" feature is enabled!

Provided methods

Wrapper, that creates the strategy and synthesizes the network update order.