pub struct ZCSBuilder<'a> {
cs: ZCS<'a>,
}Expand description
Builder for constructing a symbolic 01-CS
This builder takes a BDDManager and an IntervalThresholdAutomaton and derives the corresponding symbolic 01-counter system (ZCS).
The builder encodes the initial states, the symbolic transitions for each rule, and the symbolic transition relation as a single BDD.
Fields§
§cs: ZCS<'a>01-CS (ZCS) that is constructed by the builder
Implementations§
Source§impl<'a> ZCSBuilder<'a>
impl<'a> ZCSBuilder<'a>
Sourcepub fn new(mgr: &BDDManager, aut: &'a IntervalThresholdAutomaton) -> Self
pub fn new(mgr: &BDDManager, aut: &'a IntervalThresholdAutomaton) -> Self
create a new symbolic 01-CS builder
Sourcepub fn initialize(&mut self)
pub fn initialize(&mut self)
- encode initial states
- encode each rule as a transition bdd
- encode entire transition relation
Sourcefn build_initial_states(&self) -> ZCSStates
fn build_initial_states(&self) -> ZCSStates
Build the bdd that represents the set of initial states
Sourcefn build_symbolic_transitions(&self) -> Vec<SymbolicTransition>
fn build_symbolic_transitions(&self) -> Vec<SymbolicTransition>
builds all symbolic transitions for all rules of the TA
Sourcefn build_symbolic_transition(&self, rule: &IntervalTARule) -> SymbolicTransition
fn build_symbolic_transition(&self, rule: &IntervalTARule) -> SymbolicTransition
Build a symbolic transition for a given rule of the threshold automaton
§Steps
- constraints for locations
- add encoded rule_id to symbolic_transition
- check if abstract guard is satisfied
- check if effects of rule are applied. i.e., effects of update vector and resets
Sourcefn build_location_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD
fn build_location_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD
builds location constraints for a given rule from location from to location to
fromandto_primehave to be setfrom_primeandtocan either be either empty or occupied, the value for all other locations has to be equal
Sourcefn build_effect_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD
fn build_effect_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD
builds the guard constraints for a given rule
- reset -> primed interval is the initial interval, i.e., I_0 = [0,1)
- increment/decrement -> primed interval is the next/previous interval or stays in the same interval
- no effect -> primed interval stays in the same interval
builds the reset constraint for a given shared variable i.e., the primed interval is the initial interval I_0 = [0,1)
builds the update constraint for a given shared variable for effect which is either a increment or decrement
i.e., the primed interval is the next/previous interval or stays in the same interval
Sourcefn build_symbolic_transition_relation(&self) -> BDD
fn build_symbolic_transition_relation(&self) -> BDD
builds the symbolic transition relation as a single bdd assume that all symbolic transitions are already stored in the cs
Sourcefn construct_bdd_guard(&self, guard: &IntervalConstraint) -> BDD
fn construct_bdd_guard(&self, guard: &IntervalConstraint) -> BDD
Given an abstract guard as an IntervalGuard, Construct a BDD that replaces every abstract Interval with its respective BDD
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ZCSBuilder<'a>
impl<'a> !RefUnwindSafe for ZCSBuilder<'a>
impl<'a> !Send for ZCSBuilder<'a>
impl<'a> !Sync for ZCSBuilder<'a>
impl<'a> Unpin for ZCSBuilder<'a>
impl<'a> !UnwindSafe for ZCSBuilder<'a>
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> 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