pub struct ACSTAConfig {
loc_state: ACSLocState,
interval_state: ACSIntervalState,
}Expand description
Configuration of a ACSThresholdAutomaton
This struct represents a configuration, i.e. an assignment of intervals for all shared variables and a number of processes in each location.
Use these configurations with care. Configurations of different automata should never be indexed by locations, variables or intervals of other automata.
Fields§
§loc_state: ACSLocStateLocation state specifying how many processes are in each location
interval_state: ACSIntervalStateInterval state specifying the current interval for each variable
Implementations§
Source§impl ACSTAConfig
impl ACSTAConfig
Sourcepub fn interval_state(&self) -> &ACSIntervalState
pub fn interval_state(&self) -> &ACSIntervalState
Get the interval state of the configuration
Sourcepub fn location_state(&self) -> &ACSLocState
pub fn location_state(&self) -> &ACSLocState
Get the location state of the configuration
Sourcepub fn is_initial(&self, ta: &ACSThresholdAutomaton) -> bool
pub fn is_initial(&self, ta: &ACSThresholdAutomaton) -> bool
Check whether the current configuration is an initial configuration of the threshold automaton
Sourcepub fn compute_potential_predecessors(
&self,
rule: &CSRule,
ta: &ACSThresholdAutomaton,
) -> Option<impl Iterator<Item = Self>>
pub fn compute_potential_predecessors( &self, rule: &CSRule, ta: &ACSThresholdAutomaton, ) -> Option<impl Iterator<Item = Self>>
Compute all predecessors of the configuration that could stem from
rule r being applied
Note that the iterator returned here might contain comparable elements.
Computing the minimal basis must be handled when collecting this
iterator
This function returns None if the rule contains a reset, and the
variable the reset has been applied to is not in its 0 interval.
Sourcepub fn from_disjunct_target(
spec: &DisjunctionTargetConfig,
ta: &ACSThresholdAutomaton,
) -> impl Iterator<Item = ACSTAConfig>
pub fn from_disjunct_target( spec: &DisjunctionTargetConfig, ta: &ACSThresholdAutomaton, ) -> impl Iterator<Item = ACSTAConfig>
Compute all configurations that correspond to an error state in the given disjunction over target configurations
Sourcepub fn from_target_config(
spec: &TargetConfig,
ta: &ACSThresholdAutomaton,
) -> HashSet<Self>
pub fn from_target_config( spec: &TargetConfig, ta: &ACSThresholdAutomaton, ) -> HashSet<Self>
Compute a goal configuration from a single [TargetConfig]
Sourcepub fn display(&self, ta: &ACSThresholdAutomaton) -> String
pub fn display(&self, ta: &ACSThresholdAutomaton) -> String
Get a string representation of the configuration
Sourcepub fn display_compact(&self, ta: &ACSThresholdAutomaton) -> String
pub fn display_compact(&self, ta: &ACSThresholdAutomaton) -> String
Get a compact string representation of the configuration without locations that are not covered by processes or variables that are zero
Sourcepub fn encode_config_constraints_to_smt<C: SMTVariableContext<Parameter> + SMTVariableContext<Variable> + SMTVariableContext<Location>>(
&self,
ta: &ACSThresholdAutomaton,
solver: &SMTSolver,
ctx: &C,
) -> SMTExpr
pub fn encode_config_constraints_to_smt<C: SMTVariableContext<Parameter> + SMTVariableContext<Variable> + SMTVariableContext<Location>>( &self, ta: &ACSThresholdAutomaton, solver: &SMTSolver, ctx: &C, ) -> SMTExpr
Encode the conditions this abstract configuration places on the corresponding concrete configurations into an SMT expression
Trait Implementations§
Source§impl Clone for ACSTAConfig
impl Clone for ACSTAConfig
Source§fn clone(&self) -> ACSTAConfig
fn clone(&self) -> ACSTAConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ACSTAConfig
impl Debug for ACSTAConfig
Source§impl Hash for ACSTAConfig
impl Hash for ACSTAConfig
Source§impl Ord for ACSTAConfig
impl Ord for ACSTAConfig
Source§fn cmp(&self, other: &ACSTAConfig) -> Ordering
fn cmp(&self, other: &ACSTAConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ACSTAConfig
impl PartialEq for ACSTAConfig
Source§impl PartialOrd for ACSTAConfig
impl PartialOrd for ACSTAConfig
Source§impl PartialOrder for ACSTAConfig
impl PartialOrder for ACSTAConfig
fn part_cmp(&self, other: &Self) -> PartialOrdCompResult
Source§fn is_greater_or_equal(&self, other: &Self) -> bool
fn is_greater_or_equal(&self, other: &Self) -> bool
self is greater or equal to other in the partial orderSource§fn is_smaller_or_equal(&self, other: &Self) -> bool
fn is_smaller_or_equal(&self, other: &Self) -> bool
self is smaller or equal to other in the partial orderimpl Eq for ACSTAConfig
impl StructuralPartialEq for ACSTAConfig
Auto Trait Implementations§
impl Freeze for ACSTAConfig
impl RefUnwindSafe for ACSTAConfig
impl Send for ACSTAConfig
impl Sync for ACSTAConfig
impl Unpin for ACSTAConfig
impl UnwindSafe for ACSTAConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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