Skip to content

Commit

Permalink
chore: delete R1CSTransformer (#4649)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

The R1CS transformer is currently a no-op as the expression width is
unbounded and we guarantee that expressions will be at most degree 2 by
default.

It also looks increasingly likely that the CSAT transformer code will be
moved into the acir_gen pass so this is redundant.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Mar 26, 2024
1 parent c0bae17 commit 166e569
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
5 changes: 1 addition & 4 deletions acvm-repo/acvm/src/compiler/transformers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ use acir::{
use indexmap::IndexMap;

mod csat;
mod r1cs;

pub(crate) use csat::CSatTransformer;
pub(crate) use r1cs::R1CSTransformer;

use super::{transform_assert_messages, AcirTransformationMap};

Expand Down Expand Up @@ -43,8 +41,7 @@ pub(super) fn transform_internal(
) -> (Circuit, Vec<usize>) {
let mut transformer = match &expression_width {
ExpressionWidth::Unbounded => {
let transformer = R1CSTransformer::new(acir);
return (transformer.transform(), acir_opcode_positions);
return (acir, acir_opcode_positions);
}
ExpressionWidth::Bounded { width } => {
let mut csat = CSatTransformer::new(*width);
Expand Down
16 changes: 0 additions & 16 deletions acvm-repo/acvm/src/compiler/transformers/r1cs.rs

This file was deleted.

0 comments on commit 166e569

Please sign in to comment.