pub struct ConstraintSystemIR<F: Field> { /* private fields */ }Expand description
Intermediate representation of a constraint system that can be manipulated and optimized.
This IR is used during circuit construction and optimization passes like wire elimination. It tracks wire allocators, constants, and constraints, along with metadata about which private wires are still alive (not eliminated by optimization).
Implementations§
Source§impl<F: Field> ConstraintSystemIR<F>
impl<F: Field> ConstraintSystemIR<F>
Sourcepub fn finalize(self) -> (ConstraintSystem<F>, WitnessLayout<F>)
pub fn finalize(self) -> (ConstraintSystem<F>, WitnessLayout<F>)
Finalize the IR into a ConstraintSystem and WitnessLayout by converting remaining zero constraints to MulConstraints, computing the final witness layout, and mapping all ConstraintWires to WitnessIndices.
Internally looks up or allocates a constant wire with value 1, used to convert
zero constraints of the form A = 0 into MulConstraints A * 1 = 0.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for ConstraintSystemIR<F>
impl<F> RefUnwindSafe for ConstraintSystemIR<F>where
F: RefUnwindSafe,
impl<F> Send for ConstraintSystemIR<F>
impl<F> Sync for ConstraintSystemIR<F>
impl<F> Unpin for ConstraintSystemIR<F>where
F: Unpin,
impl<F> UnsafeUnpin for ConstraintSystemIR<F>
impl<F> UnwindSafe for ConstraintSystemIR<F>where
F: 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
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>
Converts
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>
Converts
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