ZCSBuilder

Struct ZCSBuilder 

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

Source

pub fn new(mgr: &BDDManager, aut: &'a IntervalThresholdAutomaton) -> Self

create a new symbolic 01-CS builder

Source

pub fn initialize(&mut self)

  1. encode initial states
  2. encode each rule as a transition bdd
  3. encode entire transition relation
Source

fn build_initial_states(&self) -> ZCSStates

Build the bdd that represents the set of initial states

Source

fn build_symbolic_transitions(&self) -> Vec<SymbolicTransition>

builds all symbolic transitions for all rules of the TA

Source

fn build_symbolic_transition(&self, rule: &IntervalTARule) -> SymbolicTransition

Build a symbolic transition for a given rule of the threshold automaton

§Steps
  1. constraints for locations
  2. add encoded rule_id to symbolic_transition
  3. check if abstract guard is satisfied
  4. check if effects of rule are applied. i.e., effects of update vector and resets
Source

fn build_location_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD

builds location constraints for a given rule from location from to location to

  1. from and to_prime have to be set
  2. from_prime and to can either be either empty or occupied, the value for all other locations has to be equal
Source

fn build_effect_constraints_for_rule(&self, rule: &IntervalTARule) -> BDD

builds the guard constraints for a given rule

  1. reset -> primed interval is the initial interval, i.e., I_0 = [0,1)
  2. increment/decrement -> primed interval is the next/previous interval or stays in the same interval
  3. no effect -> primed interval stays in the same interval
Source

fn build_reset_constraints_for_shared_var(&self, shared: &Variable) -> &BDD

builds the reset constraint for a given shared variable i.e., the primed interval is the initial interval I_0 = [0,1)

Source

fn build_update_constraints_for_shared_var( &self, shared: &Variable, effect: &IntervalActionEffect, ) -> BDD

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

Source

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

Source

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

Source

pub fn build(self) -> ZCS<'a>

build the symbolic 01-CS

Trait Implementations§

Source§

impl<'a> Debug for ZCSBuilder<'a>

Source§

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

Formats the value using the given formatter. Read more

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.