You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/circom-language/formats/simplification-json.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The file contains a dictionary where the entries are the numbers of the simplifi
15
15
where the linear expression is represented by a dictionary with the signal numbers as strings occurring in the linear expression (with non-zero coefficient) as entries and their coefficients (as string) as values:
All signals occurring in the linear expression are signals that are not removed. Hence, if you also include the ```--sym``` flag, in the generated [sym file](../sym.md) all these signals are associated to a position in the witness list. On the other hand, al signals sig_num_1 ... sig_num_n that appear as entries in the substitution dictionary are associated to -1.
18
+
All signals occurring in the linear expression are signals that are not removed. Hence, if you also include the ```--sym``` flag, in the generated [sym file](sym.md) all these signals are associated to a position in the witness list. On the other hand, al signals sig_num_1 ... sig_num_n that appear as entries in the substitution dictionary are associated to -1.
19
19
20
20
Let us consider the following simple circuit in 'simplify.circom':
Copy file name to clipboardExpand all lines: mkdocs/docs/circom-language/formats/sym.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The format provides a list of lines, where each line contains the information ab
11
11
```
12
12
where
13
13
* #s: a positive number. It is the unique number starting in 1 (0 is reserved to the signal holding the constant value 1) which is assigned by the circom compiler to each signal in the circuit.
14
-
* #w: an integer larger than or equal to -1. It gives either the position in the witness where the signal occurs or -1 if the signal is not public and does not occur in any constraint in the generated R1CS. Note that many signals do not appear in the final R1CS because they have been replaced by a linear combination of other signals that is equivalent to it in the simplification phase. In order to know the substitution applied to a removed signal one can add the flag --simplification_substitution to the circom call and check the generated [json file](../simplification-json.md). All witness positions except 0 (which is again reserved to the constant value 1) must occur once in the sym file. The length of the witness coincides with the number of (different) signals occurring in the generated R1CS plus one (for the constant 1).
14
+
* #w: an integer larger than or equal to -1. It gives either the position in the witness where the signal occurs or -1 if the signal is not public and does not occur in any constraint in the generated R1CS. Note that many signals do not appear in the final R1CS because they have been replaced by a linear combination of other signals that is equivalent to it in the simplification phase. In order to know the substitution applied to a removed signal one can add the flag --simplification_substitution to the circom call and check the generated [json file](simplification-json.md). All witness positions except 0 (which is again reserved to the constant value 1) must occur once in the sym file. The length of the witness coincides with the number of (different) signals occurring in the generated R1CS plus one (for the constant 1).
15
15
* #c: a non-negative integer (starting in 0). It is the unique number given by the compiler to the component the signal belongs to.
16
16
* name: is a string containing the qualified name of the signal (including the complete component path).
Copy file name to clipboardExpand all lines: mkdocs/docs/getting-started/compilation-options.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,13 @@ FLAGS:
12
12
--wat Compiles the circuit to wat
13
13
-c, --c Compiles the circuit to c
14
14
--O0 No simplification is applied
15
-
--O1 Only applies var to var and var to constant simplification
15
+
--O1 Only applies signal to signal and signal to constant simplification
16
16
--O2 Full constraint simplification
17
17
--verbose Shows logs during compilation
18
18
--inspect Does an additional check over the constraints produced
19
19
--use_old_simplification_heuristics Applies the old version of the heuristics when performing linear
20
20
simplification
21
-
--simplification_substitution Outputs the substitution in json format
21
+
--simplification_substitution Outputs the substitution applied in the simplification phase in json format
22
22
-h, --help Prints help information
23
23
-V, --version Prints version information
24
24
@@ -53,7 +53,7 @@ In the following, we explain these options.
53
53
54
54
55
55
#####Flags and options related to the R1CS optimization
56
-
In the following, we explain the different optimizations that we can apply to the final R1CS during the constraint generation phase.
56
+
In the following, we explain the different optimizations that we can apply to the final R1CS during the constraint generation phase. More details on the simplification process can be found [here](../circom-language/circom-insight/simplification.md)
57
57
58
58
* Flag ```--O0``` does not apply any kind of simplification.
0 commit comments