pub struct Reachability {
precondition_par: Vec<BooleanExpression<Parameter>>,
precondition_loc: Vec<BooleanExpression<Location>>,
precondition_var: Vec<BooleanExpression<Variable>>,
target: DisjunctionTargetConfig,
}Expand description
Formula of the form (preconditions) => <>(target)
A reachability constraint specifies
- a set of starting configurations
- a set of target configurations
The set of starting configurations is a subset of the threshold automaton. This type allows these restriction to be arbitrary boolean conditions on parameters, variables and locations (mostly since they appear in benchmarks of the ByMC tool).
Target constraints are more restricted. We only allow for lower bounds on the number of processes, or specifying that a location should not be covered. These constraints match the formal definition of ELTL formulas in the related literature (e.g., see paper “A Short Counterexample Property for Safety and Liveness Verification of Fault-Tolerant Distributed Algorithms” by Konnov et al.). Other constraints, such as upper bounds, can be seen as pathological and decision procedures may be incomplete for these specifications.
To handle these conditions, add them to the initial constraints of the threshold automaton, preferably before transforming the automaton in a necessary intermediate format.
Fields§
§precondition_par: Vec<BooleanExpression<Parameter>>Conjunction of conditions on the parameter evaluation
precondition_loc: Vec<BooleanExpression<Location>>Conjunction of conditions on the initial distribution of processes in the threshold automaton
precondition_var: Vec<BooleanExpression<Variable>>Conjunction of conditions on the initial valuation of the shared variables
target: DisjunctionTargetConfigConditions on the configuration to reach
Implementations§
Source§impl Reachability
impl Reachability
Sourcefn new_unconstrained(name: String) -> Self
fn new_unconstrained(name: String) -> Self
Create a new reachability constraint that has no constraints
Sourcefn new_with_parameter_constr(
name: String,
lhs: Box<IntegerExpression<Parameter>>,
op: ComparisonOp,
rhs: Box<IntegerExpression<Parameter>>,
) -> Self
fn new_with_parameter_constr( name: String, lhs: Box<IntegerExpression<Parameter>>, op: ComparisonOp, rhs: Box<IntegerExpression<Parameter>>, ) -> Self
Create a new reachability constraint with only a single parameter constraint
Sourcefn new_with_initial_loc_constr(
name: String,
lhs: Box<IntegerExpression<Location>>,
op: ComparisonOp,
rhs: Box<IntegerExpression<Location>>,
) -> Self
fn new_with_initial_loc_constr( name: String, lhs: Box<IntegerExpression<Location>>, op: ComparisonOp, rhs: Box<IntegerExpression<Location>>, ) -> Self
Create a new reachability constraint with only a single initial location constraint
Sourcefn new_with_initial_var_constr(
name: String,
lhs: Box<IntegerExpression<Variable>>,
op: ComparisonOp,
rhs: Box<IntegerExpression<Variable>>,
) -> Self
fn new_with_initial_var_constr( name: String, lhs: Box<IntegerExpression<Variable>>, op: ComparisonOp, rhs: Box<IntegerExpression<Variable>>, ) -> Self
Create a new reachability constraint with only a single initial variable constraint
Sourcefn new_with_eventual_reach(disj: DisjunctionTargetConfig) -> Self
fn new_with_eventual_reach(disj: DisjunctionTargetConfig) -> Self
Create a new reachability constraint with only an eventual constraint
Sourcepub fn contains_reachability_constraint(&self) -> bool
pub fn contains_reachability_constraint(&self) -> bool
Check whether this constraint contains a reachability constraint
A reachability constraint requires at least one location to be empty.
Sourcepub fn get_target_conditions(&self) -> &DisjunctionTargetConfig
pub fn get_target_conditions(&self) -> &DisjunctionTargetConfig
Get the target specification of the reachability specification
A Reachability object is a specification of the form
(preconditions) => <>(target)
This function returns the target as a DisjunctionTargetConfig
Sourcefn try_from_eltl(
name: String,
spec: NonNegatedELTLExpression,
) -> Result<Vec<Self>, ReachabilityTransformationError>
fn try_from_eltl( name: String, spec: NonNegatedELTLExpression, ) -> Result<Vec<Self>, ReachabilityTransformationError>
Try to construct a reachability constraint from a an ELTL formula
Sourcefn parse_in_eventually(
name: String,
expr: NonNegatedELTLExpression,
) -> Result<DisjunctionTargetConfig, ReachabilityTransformationError>
fn parse_in_eventually( name: String, expr: NonNegatedELTLExpression, ) -> Result<DisjunctionTargetConfig, ReachabilityTransformationError>
Try to parse the constraints behind an eventually operator into a disjunction of upwards closed sets
Trait Implementations§
Source§impl And for Reachability
impl And for Reachability
Source§fn and(self, other: Reachability) -> Self
fn and(self, other: Reachability) -> Self
self and otherSource§impl Clone for Reachability
impl Clone for Reachability
Source§fn clone(&self) -> Reachability
fn clone(&self) -> Reachability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Reachability
impl Debug for Reachability
Source§impl<D: Into<DisjunctionTargetConfig>> From<D> for Reachability
impl<D: Into<DisjunctionTargetConfig>> From<D> for Reachability
Source§impl PartialEq for Reachability
impl PartialEq for Reachability
impl StructuralPartialEq for Reachability
Auto Trait Implementations§
impl Freeze for Reachability
impl RefUnwindSafe for Reachability
impl Send for Reachability
impl Sync for Reachability
impl Unpin for Reachability
impl UnwindSafe for Reachability
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