pub struct MaxBounds { /* private fields */ }Expand description
Per-clock maximal constants for Dbm::try_extrapolate_max (ExtraM).
The slice passed to MaxBounds::new contains ceilings for actual
clocks 1 through n in order. The reference clock’s ceiling is
implicitly zero. Values must lie in [0, MAX_CONSTANT].
ExtraM overapproximates a zone. Applying it does not alone guarantee timed-automata reachability preservation: that requires restrictions on guards, invariants, and clock resets.
§Example
use clock_dbm::{MaxBounds, Variable};
let ceilings = MaxBounds::new(vec![5, 8])?;
assert_eq!(ceilings.variables(), 2);
assert_eq!(ceilings.get(Variable::new(2).unwrap()), Some(8));Implementations§
Source§impl MaxBounds
impl MaxBounds
Sourcepub fn new(ceilings: Vec<i32>) -> Result<MaxBounds, Error>
pub fn new(ceilings: Vec<i32>) -> Result<MaxBounds, Error>
Creates maximal constants for actual clocks 1, 2, …, in the
order supplied: ceilings[0] is the ceiling for clock 1.
§Errors
In this order:
Error::TooManyVariablesifceilings.len() > MAX_VARIABLES;Error::InvalidMaxBoundsfor the first ceiling that is negative or greater thanMAX_CONSTANT, with its 1-based clock index.
Proved: exactly these errors in this order; on success the ceilings are stored as given.
§Complexity
O(n) time for n = ceilings.len().
Trait Implementations§
impl Eq for MaxBounds
impl Invariant for MaxBounds
impl StructuralPartialEq for MaxBounds
Auto Trait Implementations§
impl Forget for MaxBounds
impl Freeze for MaxBounds
impl Move for MaxBounds
impl RefUnwindSafe for MaxBounds
impl Send for MaxBounds
impl Sync for MaxBounds
impl Unpin for MaxBounds
impl UnsafeUnpin for MaxBounds
impl UnwindSafe for MaxBounds
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
Mutably borrows from an owned value. Read more