Skip to main content

UpwardsClosedClause

Struct UpwardsClosedClause 

Source
pub struct UpwardsClosedClause {
    locs_no_procs: HashSet<Location>,
    locs_lower_bounds: HashMap<Location, u32>,
    variable_constr: LIAVariableConstraint,
}
Expand description

Description of an upwards closed set of configurations of a threshold automaton

An upwards closed set of configurations can be seen as the conjunction of three different types of constraints:

  • a set of locations which are not allowed to contain any processes
  • a map of locations to integer bounds, where the bounds represent minimal the number of processes that need to be present in the respective location
  • constraints on the shared variable evaluations

Any configuration of a threshold automaton that fulfills the constraints is then said to be in the set.

This type should usually not be created directly. Instead, use the UpwardsClosedSet type (with a single clause).

Fields§

§locs_no_procs: HashSet<Location>

Location should not be covered by any processes

§locs_lower_bounds: HashMap<Location, u32>

Map with location + number of processes at least in there

§variable_constr: LIAVariableConstraint

conjunct of variable constraints

Implementations§

Source§

impl UpwardsClosedClause

Source

pub fn variable_constr(&self) -> &LIAVariableConstraint

Get the constraint over the shared variable valuations

Source

pub fn locs_to_cover(&self) -> impl Iterator<Item = (&Location, &u32)>

Returns an iterator over locations and the respective lower bound on how many processes need to be in the location to be in the set

Source

pub fn locs_to_uncover(&self) -> impl Iterator<Item = &Location>

Returns the locations where no process is allowed to be in

Source

pub fn new_top() -> Self

Create a new upwards closed set that contains all possible configurations

Source

pub fn is_top(&self) -> bool

Check whether this clause is a tautology, i.e., contains all possible configurations

Source

fn new() -> Self

Creates a new empty set of atomic propositions

Such an upwards closed set is equivalent to a constraint true or the set of all configurations

Source

fn with_locs_to_cover<I: Borrow<Location>, L: IntoIterator<Item = I>>( self, cover: L, ) -> Self

Add a locations where at least one process must be present

If a lower bound constraint for a specific location has been previously added, this function will merge the constraints by taking the maximum of the lower bounds

Source

fn with_lower_bounds<I: Borrow<Location>, N: Into<u32>, L: IntoIterator<Item = (I, N)>>( self, cover: L, ) -> Self

Add lower bounds for a set of locations

If a lower bound constraint for a specific location has been previously added, this function will merge the constraints by taking the maximum of the lower bounds

Source

fn with_locs_to_empty<I: Borrow<Location>, L: IntoIterator<Item = I>>( self, locs: L, ) -> Self

Add locations which are not allowed to be covered

Source

fn with_variable_constraint(self, constr: LIAVariableConstraint) -> Self

Add a constraint on the shared variable valuation

If a constraint has been previously added, the resulting variable constraint will be the conjunction of the previous and the new one

Source

fn contains_reachability_constraint(&self) -> bool

Check whether the upwards closed set contains a reachability constraint, i.e., a constraint where at least one location is not allowed to be covered

Trait Implementations§

Source§

impl And for UpwardsClosedClause

Source§

fn and(self, other: Self) -> Self

Get the conjunction of self and other
Source§

impl BitAnd for UpwardsClosedClause

Source§

type Output = UpwardsClosedClause

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl Clone for UpwardsClosedClause

Source§

fn clone(&self) -> UpwardsClosedClause

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UpwardsClosedClause

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for UpwardsClosedClause

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<C: SMTVariableContext<Location> + SMTVariableContext<Variable> + SMTVariableContext<Parameter>> EncodeToSMT<UpwardsClosedClause, C> for UpwardsClosedClause

Source§

fn encode_to_smt_with_ctx( &self, solver: &SMTSolver, ctx: &C, ) -> Result<SMTExpr, SMTSolverError>

Encode the type into an SMT expression Read more
Source§

impl PartialEq for UpwardsClosedClause

Source§

fn eq(&self, other: &UpwardsClosedClause) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for UpwardsClosedClause

Source§

impl TASpecification for UpwardsClosedClause

Source§

fn locs_appearing(&self) -> impl IntoIterator<Item = &Location>

Get the locations that appear in the specification Read more
Source§

fn var_constraint(&self) -> impl IntoIterator<Item = &LIAVariableConstraint>

Get the variable constraints that appear in target Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.