pub struct Circuit<F: TowerField> { /* private fields */ }Expand description
Recorder for one program: main-table declarations plus mounted and attached chiplets.
Implementations§
Source§impl<F: TowerField + HardwareField> Circuit<F>
impl<F: TowerField + HardwareField> Circuit<F>
pub fn num_rows(&self) -> usize
Sourcepub fn cs(&self) -> &ConstraintSystem<F>
pub fn cs(&self) -> &ConstraintSystem<F>
Constraint DSL over the recorded columns.
Column handles convert via Col::index.
pub fn column(&mut self, ty: ColumnType) -> Col
Sourcepub fn schema(&mut self, layout: &[ColumnType]) -> ColRange
pub fn schema(&mut self, layout: &[ColumnType]) -> ColRange
Records a define_columns! layout 1:1, physical to
virtual. Index the range with the schema’s own constants.
pub fn columns(&mut self, count: usize, ty: ColumnType) -> ColRange
Sourcepub fn expand_bits(&mut self, count: usize, storage: ColumnType) -> Packed
pub fn expand_bits(&mut self, count: usize, storage: ColumnType) -> Packed
count physical storage columns exposed
as count × bit-width virtual Bit columns.
Sourcepub fn reuse_pass_through(&mut self, packed: &Packed) -> ColRange
pub fn reuse_pass_through(&mut self, packed: &Packed) -> ColRange
Whole-column virtual view of a bit-expanded physical group.
Sourcepub fn fix(&mut self, col: Col, shape: FixedShape<F>)
pub fn fix(&mut self, col: Col, shape: FixedShape<F>)
Pins col to shape; the verifier evaluates
the shape’s MLE for itself at r_final.
Sourcepub fn boundary(&mut self, col: Col, row: usize, value: F)
pub fn boundary(&mut self, col: Col, row: usize, value: F)
Constant-target pin;
public inputs enter only through publish.
Sourcepub fn call(
&mut self,
service: &Service,
values: &[Col],
selector: Col,
) -> Result<()>
pub fn call( &mut self, service: &Service, values: &[Col], selector: Col, ) -> Result<()>
Requester endpoint of service on this table.
Sourcepub fn bus(&mut self, bus_id: &str, spec: PermutationCheckSpec)
pub fn bus(&mut self, bus_id: &str, spec: PermutationCheckSpec)
Raw bus endpoint for shapes Service does
not model (positional, paired, waivered).
Sourcepub fn mount(&mut self, def: ChipletDef<F>) -> Mounted
pub fn mount(&mut self, def: ChipletDef<F>) -> Mounted
Mounts a chiplet inline: its artifacts and bus endpoints merge into this table at engine-computed offsets.
Sourcepub fn mount_unlinked(&mut self, def: ChipletDef<F>) -> Mounted
pub fn mount_unlinked(&mut self, def: ChipletDef<F>) -> Mounted
Mounts a chiplet used as the program’s own trace, whose declared bus has no partner here.
Sourcepub fn attach(&mut self, def: ChipletDef<F>)
pub fn attach(&mut self, def: ChipletDef<F>)
Attaches a chiplet as an independent table with its own trace, commitment, and ZeroCheck.
Sourcepub fn publish(&mut self, col: Col, row: usize) -> usize
pub fn publish(&mut self, col: Col, row: usize) -> usize
Pins col at row to a fresh public input slot,
returned. Whether the AIR determines the pinned
cell is the audited circuit’s burden, not checked.
Sourcepub fn compile(self) -> Result<CircuitProgram<F>>
pub fn compile(self) -> Result<CircuitProgram<F>>
Derives the program artifacts, running every structural validator on the recording.
Auto Trait Implementations§
impl<F> !Freeze for Circuit<F>
impl<F> !RefUnwindSafe for Circuit<F>
impl<F> !Sync for Circuit<F>
impl<F> Send for Circuit<F>where
ConstraintSystem<F>: Send,
Vec<FixedColumn<F>>: Send,
Vec<BoundaryConstraint<F>>: Send,
Vec<ChipletDef<F>>: Send,
impl<F> Unpin for Circuit<F>where
ConstraintSystem<F>: Unpin,
Vec<FixedColumn<F>>: Unpin,
Vec<BoundaryConstraint<F>>: Unpin,
Vec<ChipletDef<F>>: Unpin,
impl<F> UnsafeUnpin for Circuit<F>where
ConstraintSystem<F>: UnsafeUnpin,
Vec<FixedColumn<F>>: UnsafeUnpin,
Vec<BoundaryConstraint<F>>: UnsafeUnpin,
Vec<ChipletDef<F>>: UnsafeUnpin,
impl<F> UnwindSafe for Circuit<F>where
ConstraintSystem<F>: UnwindSafe,
Vec<FixedColumn<F>>: UnwindSafe,
Vec<BoundaryConstraint<F>>: UnwindSafe,
Vec<ChipletDef<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
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