pub struct ShapeContract {
pub shapes: BTreeMap<String, ShapeExpr>,
pub constraints: Vec<String>,
pub from_contract: Option<String>,
pub from_equation: Option<String>,
}Expand description
Typed shape contract for compositional verification across contract boundaries.
Used in Equation.assumes and Equation.guarantees to create
mechanically verifiable edges in the dependency graph. The COMPOSITION-001
lint gate unifies guarantees.shapes with downstream assumes.shapes
to prove end-to-end pipeline shape consistency.
Fields§
§shapes: BTreeMap<String, ShapeExpr>Named shape bindings, e.g. {"output": {"dims": ["batch", "seq", "config.hidden_size"]}}.
constraints: Vec<String>Constraints that must hold, e.g. ["config.hidden_size % config.num_heads == 0"].
from_contract: Option<String>Which upstream contract provides these shapes (assumes only).
from_equation: Option<String>Which upstream equation provides these shapes (assumes only).
Trait Implementations§
Source§impl Clone for ShapeContract
impl Clone for ShapeContract
Source§fn clone(&self) -> ShapeContract
fn clone(&self) -> ShapeContract
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShapeContract
impl Debug for ShapeContract
Source§impl Default for ShapeContract
impl Default for ShapeContract
Source§fn default() -> ShapeContract
fn default() -> ShapeContract
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShapeContract
impl<'de> Deserialize<'de> for ShapeContract
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ShapeContract
impl RefUnwindSafe for ShapeContract
impl Send for ShapeContract
impl Sync for ShapeContract
impl Unpin for ShapeContract
impl UnsafeUnpin for ShapeContract
impl UnwindSafe for ShapeContract
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