From 216f54b9b332bd623a4f0e066579602eba59b30f Mon Sep 17 00:00:00 2001 From: alrubio Date: Sat, 13 Jan 2024 09:05:38 +0100 Subject: [PATCH] files to include detailed descriptions of all formats produced by circom compiler added (to be completed) --- mkdocs/docs/circom-language/formats/constraints-json.md | 6 ++++++ mkdocs/docs/circom-language/formats/r1cs.md | 7 +++++++ mkdocs/docs/circom-language/formats/simplification-json.md | 5 +++++ mkdocs/docs/circom-language/formats/sym.md | 7 +++++++ mkdocs/docs/getting-started/compilation-options.md | 4 ++-- 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 mkdocs/docs/circom-language/formats/constraints-json.md create mode 100644 mkdocs/docs/circom-language/formats/r1cs.md create mode 100644 mkdocs/docs/circom-language/formats/simplification-json.md create mode 100644 mkdocs/docs/circom-language/formats/sym.md diff --git a/mkdocs/docs/circom-language/formats/constraints-json.md b/mkdocs/docs/circom-language/formats/constraints-json.md new file mode 100644 index 000000000..0d3e1e818 --- /dev/null +++ b/mkdocs/docs/circom-language/formats/constraints-json.md @@ -0,0 +1,6 @@ +--- +description: >- + This is a detailed description of the json R1CS format produced by the circom compiler when the flag --json is activated. +--- +# R1CS json format + diff --git a/mkdocs/docs/circom-language/formats/r1cs.md b/mkdocs/docs/circom-language/formats/r1cs.md new file mode 100644 index 000000000..2622bd246 --- /dev/null +++ b/mkdocs/docs/circom-language/formats/r1cs.md @@ -0,0 +1,7 @@ +--- +description: >- + This is a detailed description of the binary R1CS format produced by the circom compiler when the flag --r1cs is activated. +--- +# R1CS binary format + +The format divides the circuit description in five phases (there could be more in the future) ... diff --git a/mkdocs/docs/circom-language/formats/simplification-json.md b/mkdocs/docs/circom-language/formats/simplification-json.md new file mode 100644 index 000000000..d7fa3c3a5 --- /dev/null +++ b/mkdocs/docs/circom-language/formats/simplification-json.md @@ -0,0 +1,5 @@ +--- +description: >- + This is a detailed description of the json format produced by the circom compiler when the flag --simplification_substitution is activated. +--- +# Simplification substitution json format diff --git a/mkdocs/docs/circom-language/formats/sym.md b/mkdocs/docs/circom-language/formats/sym.md new file mode 100644 index 000000000..b2a39b41a --- /dev/null +++ b/mkdocs/docs/circom-language/formats/sym.md @@ -0,0 +1,7 @@ +--- +description: >- + This is a detailed description of the sym format produced by the circom compiler when the flag --sym is activated. +--- +# sym format + +The format provides a list of lines, where each line contains the information about a signal of the circuit except for the signal 0 which is always reserved to denote the constat one ("1"). diff --git a/mkdocs/docs/getting-started/compilation-options.md b/mkdocs/docs/getting-started/compilation-options.md index fa92f93c6..e41f557c5 100644 --- a/mkdocs/docs/getting-started/compilation-options.md +++ b/mkdocs/docs/getting-started/compilation-options.md @@ -39,11 +39,11 @@ In the following, we explain these options. #####Flags and options related to the compiler's output * Flag ```--r1cs``` outputs the constraints in binary R1CS format (see the detailed format [here](../circom-language/formats/r1cs)). * Flag ```--sym``` outputs for every signal of the circuit: the unique number given by the compiler, the circom qualified name, the number of the witness signal that contains it and the (unique) number of the component (given by the compiler) it belongs (see the detailed format and examples [here](../circom-language/formats/sym)). -* Flag ```--simplification_substitution``` outputs the substitutions performed by the --O1 and --O2 (default) constraint simplification options in json format (see the detailed format [here](../circom-language/formats/simplification_json)). +* Flag ```--simplification_substitution``` outputs the substitutions performed by the --O1 and --O2 (default) constraint simplification options in json format (see the detailed format [here](../circom-language/formats/simplification-json)). * Flag ```--wasm``` produces a WebAssembly program that receives the private and public inputs and generates the circuit witness. * Flag ```-c / --c``` produces a C++ program that receives the private and public inputs and generates the circuit witness. * Flag ```--wat``` compiles the circuit to wat. -* Flag ```--json``` outputs the R1CS system in JSON format (see the detailed format [here](../circom-language/formats/constraints_json)). +* Flag ```--json``` outputs the R1CS system in JSON format (see the detailed format [here](../circom-language/formats/constraints-json)). * Option ```-o / --output ``` allows to indicate the path to the directory where the output will be written. By default the path is ```.```. #####Flags and options related to the constraint generation process