#[non_exhaustive]pub struct StepSpec {
pub name: String,
pub vars: Vec<Variable>,
pub ranges: Vec<Expr>,
pub guards: Vec<StepGuard>,
pub effect: Formula,
pub fact_name: String,
}Expand description
Structured decomposition of one step arm in a transition fact (N11, N14, W14).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringStep predicate name (for example release or insert_orders).
vars: Vec<Variable>Quantified parameter variables (some r: T_row | ...).
ranges: Vec<Expr>Parameter domains matching vars.
guards: Vec<StepGuard>Individual guard conjuncts.
effect: FormulaRemaining effect and frame conjuncts.
fact_name: StringLabel of the transition fact this step belongs to (for example fact Steps).
Implementations§
Source§impl StepSpec
impl StepSpec
Sourcepub fn new(
name: impl Into<String>,
vars: Vec<Variable>,
ranges: Vec<Expr>,
guards: Vec<StepGuard>,
effect: Formula,
fact_name: impl Into<String>,
) -> StepSpec
pub fn new( name: impl Into<String>, vars: Vec<Variable>, ranges: Vec<Expr>, guards: Vec<StepGuard>, effect: Formula, fact_name: impl Into<String>, ) -> StepSpec
Builds a structured step specification.
Sourcepub fn quantify(&self, body: Formula) -> Formula
pub fn quantify(&self, body: Formula) -> Formula
Quantifies body existentially over this step’s parameters (some v: r | body).
Sourcepub fn with_active_guards(&self, active: &[bool]) -> Formula
pub fn with_active_guards(&self, active: &[bool]) -> Formula
Rebuilds the step arm with only the guards marked active.
Trait Implementations§
Auto Trait Implementations§
impl Forget for StepSpec
impl Freeze for StepSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Variable>: Freeze,
PhantomData<Expr>: Freeze,
PhantomData<StepGuard>: Freeze,
*const ArcInner<FormulaNode> is !null: Freeze,
PhantomData<ArcInner<FormulaNode>>: Freeze,
impl Move for StepSpec
impl RefUnwindSafe for StepSpec
impl Send for StepSpec
impl Sync for StepSpec
impl Unpin for StepSpec
impl UnsafeUnpin for StepSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Variable>: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
PhantomData<StepGuard>: UnsafeUnpin,
*const ArcInner<FormulaNode> is !null: UnsafeUnpin,
PhantomData<ArcInner<FormulaNode>>: UnsafeUnpin,
impl UnwindSafe for StepSpecwhere
RawVecInner: UnwindSafe,
Arc<Declared>: UnwindSafe,
Arc<ExprNode>: UnwindSafe,
Arc<FormulaNode>: UnwindSafe,
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