pub struct ReplaceTrivialGuardsStatic {}Expand description
A lot of automatically generated benchmarks have guards of the form
(var1 >= 1 || var1 == 0) or var >= 0 which are satisfied. This
preprocessor replaces these guards with true.
This preprocessor only checks for a few trivial patterns, if you want a
more general preprocessor use ReplaceTrivialGuardsSMT.
Note: If you assume variables can have values smaller than 0 this preprocessor should not be used!
Implementations§
Source§impl ReplaceTrivialGuardsStatic
impl ReplaceTrivialGuardsStatic
Sourcefn is_trivially_true<T: Atomic>(expr: &BooleanExpression<T>) -> bool
fn is_trivially_true<T: Atomic>(expr: &BooleanExpression<T>) -> bool
? Can we generalize this to more expressions ?
Sourcefn replace_trivial_boolean_expr<T: Atomic>(expr: &mut BooleanExpression<T>)
fn replace_trivial_boolean_expr<T: Atomic>(expr: &mut BooleanExpression<T>)
Replace trivial boolean expressions with true
Note: If you assume variables can have values smaller than 0 this preprocessor should not be used!
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of the ReplaceTrivialGuardsStatic preprocessor
Trait Implementations§
Source§impl Default for ReplaceTrivialGuardsStatic
impl Default for ReplaceTrivialGuardsStatic
Source§impl<S: TargetSpec, C: ModelCheckerContext> Preprocessor<GeneralThresholdAutomaton, S, C> for ReplaceTrivialGuardsStatic
impl<S: TargetSpec, C: ModelCheckerContext> Preprocessor<GeneralThresholdAutomaton, S, C> for ReplaceTrivialGuardsStatic
Source§fn process(&self, ta: &mut GeneralThresholdAutomaton, _spec: &S, _ctx: &C)
fn process(&self, ta: &mut GeneralThresholdAutomaton, _spec: &S, _ctx: &C)
A lot of automatically generated benchmarks have guards of the form
(var1 >= 1 || var1 == 0) or var >= 0 which are satisfied. This
preprocessor replaces these guards with true.
This preprocessor only checks for a few trivial patterns, if you want a
more general preprocessor use ReplaceTrivialGuardsSMT.
Note: If you assume variables can have values smaller than 0 this preprocessor should not be used!
Auto Trait Implementations§
impl Freeze for ReplaceTrivialGuardsStatic
impl RefUnwindSafe for ReplaceTrivialGuardsStatic
impl Send for ReplaceTrivialGuardsStatic
impl Sync for ReplaceTrivialGuardsStatic
impl Unpin for ReplaceTrivialGuardsStatic
impl UnwindSafe for ReplaceTrivialGuardsStatic
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