Skip to content

Commit

Permalink
chore: write dot string to file
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiantf committed Feb 21, 2024
1 parent 73a060e commit 0d38c87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions zk_prover/prints/range-check.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
digraph circuit{0[label="add chip";];1[label="checking value a is in range";];2[label="checking value b is in range";];3[label="checking value c is in range";];}
4 changes: 4 additions & 0 deletions zk_prover/src/chips/range/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,16 @@ mod testing {
#[cfg(feature = "dev-graph")]
#[test]
fn print_range_check_dot_graph() {
use std::io::Write;

let circuit = TestCircuit::<4> {
a: Fp::from(0x1f2f3f4f),
b: Fp::from(1),
};

let dot_string = halo2_proofs::dev::circuit_dot_graph(&circuit);
let mut dot_graph = std::fs::File::create("prints/range-check.dot").unwrap();
dot_graph.write_all(dot_string.as_bytes()).unwrap();

print!("{}", dot_string);
}
Expand Down

0 comments on commit 0d38c87

Please sign in to comment.