arnaucube
arnaucube/circomPublic Self-hosted repository
circom/test/basiccases.json
test/basiccases.jsonRaw
  1[
  2    {
  3        "name": "inout",
  4        "circuit": "inout.circom",
  5        "tv": [
  6            [{
  7                "in1": 1,
  8                "in2": [2,3],
  9                "in3" : [[4,5], [6,7], [8,9]]
 10            }, {
 11                "out1": 1,
 12                "out2": [2,3],
 13                "out3": [[4,5], [6,7],[8,9]]
 14            }]
 15        ]
 16    },
 17    {
 18        "name": "fnarray",
 19        "circuit": "fnarray.circom",
 20        "tv": [
 21            [{
 22                "in": [1, 8, 25]
 23            }, {
 24                "out": [2, 16, 50]
 25            }]
 26        ]
 27    },
 28    {
 29        "name": "add",
 30        "circuit": "add.circom",
 31        "tv": [
 32            [{"in": [0,0]}, {"out": 0}],
 33            [{"in": [0 ,1]}, {"out": 1}],
 34            [{"in": [1 ,2]}, {"out": 3}],
 35            [{"in": [-1,1]}, {"out": 0}]
 36        ]
 37    },
 38    {
 39        "name": "add constant",
 40        "circuit": "addconst1.circom",
 41        "tv": [
 42            [{"in":  0}, {"out": 15}],
 43            [{"in": 10}, {"out": 25}],
 44            [{"in": -2}, {"out": 13}]
 45        ]
 46    },
 47    {
 48        "name": "for unrolled",
 49        "circuit": "forunrolled.circom",
 50        "tv": [
 51            [{"in":  0}, {"out": [ 0,  1,  2]}],
 52            [{"in": 10}, {"out": [10, 11, 12]}],
 53            [{"in": -2}, {"out": [-2, -1,  0]}]
 54        ]
 55    },
 56    {
 57        "name": "for rolled",
 58        "circuit": "forrolled.circom",
 59        "tv": [
 60            [{"in":  0}, {"out":  0}],
 61            [{"in": 10}, {"out": 10}]
 62        ]
 63    },
 64    {
 65        "name": "while unrolled",
 66        "circuit": "whileunrolled.circom",
 67        "tv": [
 68            [{"in":  0}, {"out": [ 0,  1,  2]}],
 69            [{"in": 10}, {"out": [10, 11, 12]}],
 70            [{"in": -2}, {"out": [-2, -1,  0]}]
 71        ]
 72    },
 73    {
 74        "name": "while rolled",
 75        "circuit": "whilerolled.circom",
 76        "tv": [
 77            [{"in":  0}, {"out":  0}],
 78            [{"in": 10}, {"out": 10}]
 79        ]
 80    },
 81    {
 82        "name": "function1",
 83        "circuit": "function1.circom",
 84        "tv": [
 85            [{"in":  0}, {"out": 3}],
 86            [{"in": 10}, {"out": 13}],
 87            [{"in": -2}, {"out": 1}]
 88        ]
 89    },
 90    {
 91        "name": "function2",
 92        "circuit": "function2.circom",
 93        "tv": [
 94            [{"in": 0 }, {"out": 3}],
 95            [{"in": 10}, {"out": 13}],
 96            [{"in": -2}, {"out": 1}]
 97        ]
 98    },
 99    {
100        "name": "constants1",
101        "circuit": "constants1.circom",
102        "tv": [
103            [{"in":  0}, {"out": 42}],
104            [{"in": 10}, {"out": 52}],
105            [{"in": -2}, {"out": 40}]
106        ]
107    },
108    {
109        "name": "arrays",
110        "circuit": "arrays.circom",
111        "tv": [
112            [{"in":  0}, {"out": [ 1,  8,  51]}],
113            [{"in": 10}, {"out": [11, 28, 111]}],
114            [{"in": -2}, {"out": [-1,  4,  39]}]
115        ]
116    },
117    {
118        "name": "if unrolled",
119        "circuit": "ifunrolled.circom",
120        "tv": [
121            [{"in":  0}, {"out": [ 1,  3,  6]}],
122            [{"in": 10}, {"out": [11, 13, 16]}],
123            [{"in": -2}, {"out": [-1,  1,  4]}]
124        ]
125    },
126    {
127        "name": "if rolled",
128        "circuit": "ifrolled.circom",
129        "tv": [
130            [{"in":  0}, {"out": [1, 0, 0]}],
131            [{"in":  1}, {"out": [0, 1, 0]}],
132            [{"in":  2}, {"out": [0, 0, 1]}],
133            [{"in":  3}, {"out": [0, 0, 0]}],
134            [{"in": -2}, {"out": [0, 0, 0]}]
135        ]
136    },
137    {
138        "name": "inc",
139        "circuit": "inc.circom",
140        "tv": [
141            [{"in":  0}, {"out": [5, 2]}],
142            [{"in":  1}, {"out": [6, 4]}],
143            [{"in":  2}, {"out": [7, 6]}],
144            [{"in":  3}, {"out": [8, 8]}],
145            [{"in": -2}, {"out": [3,-2]}]
146        ]
147    },
148    {
149        "name": "dec",
150        "circuit": "dec.circom",
151        "tv": [
152            [{"in":  0}, {"out": [ 1, -2]}],
153            [{"in":  1}, {"out": [ 2,  0]}],
154            [{"in":  2}, {"out": [ 3,  2]}],
155            [{"in":  3}, {"out": [ 4,  4]}],
156            [{"in": -2}, {"out": [-1, -6]}]
157        ]
158    },
159    {
160        "name": "ops",
161        "circuit": "ops.circom",
162        "tv": [
163            [{"in": [-2, 2]}, {"add":  0, "sub": -4, "mul": -4}],
164            [{"in": [-1, 1]}, {"add":  0, "sub": -2, "mul": -1}],
165            [{"in": [ 0, 0]}, {"add":  0, "sub":  0, "mul":  0}],
166            [{"in": [ 1,-1]}, {"add":  0, "sub":  2, "mul": -1}],
167            [{"in": [ 2,-2]}, {"add":  0, "sub":  4, "mul": -4}],
168            [{"in": [-2,-3]}, {"add": -5, "sub":  1, "mul":  6}],
169            [{"in": [ 2, 3]}, {"add":  5, "sub": -1, "mul":  6}]
170        ]
171    },
172    {
173        "name": "ops2",
174        "circuit": "ops2.circom",
175        "tv": [
176            [{"in": [-2, 2]}, {"div": -1, "idiv": "10944121435919637611123202872628637544274182200208017171849102093287904247807", "mod": 1}],
177            [{"in": [-1, 1]}, {"div": -1, "idiv": -1, "mod": 0}],
178            [{"in": [ 1,-1]}, {"div": -1, "idiv":  0, "mod": 1}]
179        ]
180    },
181    {
182        "name": "ops3",
183        "circuit": "ops3.circom",
184        "tv": [
185            [{"in": [-2, 2]}, {"neg1":  2, "neg2": -2, "pow": 4}],
186            [{"in": [ 0, 1]}, {"neg1":  0, "neg2": -1, "pow": 0}],
187            [{"in": [ 1,-1]}, {"neg1": -1, "neg2":  1, "pow": 1}]
188        ]
189    },
190    {
191        "name": "Comparation ops",
192        "circuit": "opscmp.circom",
193        "tv": [
194            [{"in": [ 8, 9]}, {"lt": 1, "leq": 1, "eq":0, "neq":1, "geq": 0, "gt":0}],
195            [{"in": [-2,-2]}, {"lt": 0, "leq": 1, "eq":1, "neq":0, "geq": 1, "gt":0}],
196            [{"in": [-1,-2]}, {"lt": 0, "leq": 0, "eq":0, "neq":1, "geq": 1, "gt":1}],
197            [{"in": [ 1,-1]}, {"lt": 0, "leq": 0, "eq":0, "neq":1, "geq": 1, "gt":1}]
198        ]
199    },
200    {
201        "name": "Bit ops",
202        "circuit": "opsbit.circom",
203        "tv": [
204            [
205                {
206                    "in": [ 5, 3]
207                },
208                {
209                    "and": 1,
210                    "or": 7,
211                    "xor":6,
212                    "not1": "7059779437489773633646340506914701874769131765994106666166191815402473914361",
213                    "shl": 40,
214                    "shr":0
215                }
216            ],
217            [
218                {
219                    "in": [ 0, 0]
220                },
221                {
222                    "and": 0,
223                    "or": 0,
224                    "xor":0,
225                    "not1":"7059779437489773633646340506914701874769131765994106666166191815402473914366",
226                    "shl": 0,
227                    "shr":0
228                }
229            ],
230            [
231                {
232                    "in": [-1, 1]
233                },
234                {
235                    "and": 0,
236                    "or": 0,
237                    "xor": 0,
238                    "not1": "7059779437489773633646340506914701874769131765994106666166191815402473914367",
239                    "shl": "14828463434349501588600065238342573213779232634421927677532012371173334581248",
240                    "shr": "10944121435919637611123202872628637544274182200208017171849102093287904247808"
241                }
242            ]
243        ]
244    },
245    {
246        "name": "Logical ops",
247        "circuit": "opslog.circom",
248        "tv": [
249            [{"in": [ 5, 0]}, {"and": 0, "or": 1, "not1":0}],
250            [{"in": [ 0, 1]}, {"and": 0, "or": 1, "not1":1}],
251            [{"in": [-1, 9]}, {"and": 1, "or": 1, "not1":0}],
252            [{"in": [ 0, 0]}, {"and": 0, "or": 0, "not1":1}]
253        ]
254    },
255    {
256        "name": "Conditional Ternary operator",
257        "circuit": "condternary.circom",
258        "tv": [
259            [{"in": 0}, {"out": 21}],
260            [{"in": 1}, {"out":  1}],
261            [{"in": 2}, {"out": 23}],
262            [{"in":-1}, {"out": 20}]
263        ]
264    },
265    {
266        "name": "Compute block",
267        "circuit": "compute.circom",
268        "tv": [
269            [{"x": 1}, {"y":  7}],
270            [{"x": 2}, {"y":  7}],
271            [{"x": 3}, {"y": 11}],
272            [{"x":-1}, {"y": -5}]
273        ]
274    },
275    {
276        "name": "Component array",
277        "circuit": "componentarray.circom",
278        "tv": [
279            [{"in": 1}, {"out":    1}],
280            [{"in": 2}, {"out":  256}],
281            [{"in": 3}, {"out": 6561}],
282            [{"in":-1}, {"out":    1}]
283        ]
284    },
285    {
286        "name": "Component array 2d",
287        "circuit": "componentarray2.circom",
288        "tv": [
289            [{"in": [1,2]}, {"out": [1, 256]}],
290            [{"in": [0,3]}, {"out": [0, 6561]}]
291        ]
292    },
293    {
294        "name": "Constant circuit",
295        "circuit": "constantcircuit.circom",
296        "tv": [
297            [{}, {"out": [1,0,1,0,  0,0,0,1, 0,1,1,1, 0,1,0,1, 1,1,1,0, 0,1,1,0, 1,1,0,1,  1,1,0,1]}]
298        ]
299    },
300    {
301        "name": "Constant internal circuit",
302        "circuit": "constantinternalcircuit.circom",
303        "tv": [
304            [{"in":  1}, {"out":  5}],
305            [{"in":  0}, {"out":  4}],
306            [{"in": -2}, {"out":  2}],
307            [{"in": 10}, {"out": 14}]
308        ]
309    },
310    {
311        "name": "include",
312        "circuit": "include.circom",
313        "tv": [
314            [{"in": 3}, {"out":  6}],
315            [{"in": 6}, {"out": 15}]
316        ]
317    }
318]