pub enum WcetFunction {
Bounded {
name: String,
cycles: u64,
instr_count: usize,
loops: Vec<WcetLoopBound>,
recursion: Option<WcetRecursionBound>,
hint_rejections: Vec<WcetHintRejection>,
},
Declined {
name: String,
reason: WcetDecline,
note: String,
hint_rejections: Vec<WcetHintRejection>,
},
}Expand description
The per-function result: either a sound cycle bound or a loud decline.
Variants§
Bounded
A sound upper bound on this function’s execution in cycles.
Fields
cycles: u64The sound worst-case cycle bound. For a loop-free function this is the SUM of each instruction’s documented worst-case cycles (each executes at most once). For a function whose loops ALL have proven trip counts (#778 phase 2) each instruction’s cost is multiplied by its proven worst-case execution count. Always ≥ any real execution under the stated precondition.
loops: Vec<WcetLoopBound>Proven loops (empty for a loop-free function), ascending head offset.
recursion: Option<WcetRecursionBound>(#778 phase 4 / #49) Present iff this bound was composed via a verified self-recursion certificate; states the derived depth + frame count.
hint_rejections: Vec<WcetHintRejection>Hints that were rejected (the static proof stands independently).
Declined
No bound emitted — a loud decline with a machine-readable reason. A decline is emitted (rather than the function omitted) so the map is COMPLETE: a consumer sees every function is either bounded or explicitly unbounded, never silently missing.
Fields
reason: WcetDeclineMachine-readable reason.
hint_rejections: Vec<WcetHintRejection>Hints that were offered for this function and rejected.
Implementations§
Source§impl WcetFunction
impl WcetFunction
Sourcepub fn declined(name: impl Into<String>, reason: WcetDecline) -> Self
pub fn declined(name: impl Into<String>, reason: WcetDecline) -> Self
Construct a decline, filling in the note from the reason.
Sourcepub fn declined_with_rejections(
name: impl Into<String>,
reason: WcetDecline,
hint_rejections: Vec<WcetHintRejection>,
) -> Self
pub fn declined_with_rejections( name: impl Into<String>, reason: WcetDecline, hint_rejections: Vec<WcetHintRejection>, ) -> Self
Construct a decline carrying rejected-hint records.
Trait Implementations§
Source§impl Clone for WcetFunction
impl Clone for WcetFunction
Source§fn clone(&self) -> WcetFunction
fn clone(&self) -> WcetFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WcetFunction
impl Debug for WcetFunction
Source§impl<'de> Deserialize<'de> for WcetFunction
impl<'de> Deserialize<'de> for WcetFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WcetFunction
Source§impl PartialEq for WcetFunction
impl PartialEq for WcetFunction
Source§impl Serialize for WcetFunction
impl Serialize for WcetFunction
impl StructuralPartialEq for WcetFunction
Auto Trait Implementations§
impl Freeze for WcetFunction
impl RefUnwindSafe for WcetFunction
impl Send for WcetFunction
impl Sync for WcetFunction
impl Unpin for WcetFunction
impl UnsafeUnpin for WcetFunction
impl UnwindSafe for WcetFunction
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.