arnaucube
arnaucube/circomPublic Self-hosted repository
First test added
Jordi Baylina jordi@baylina.cat
Wed, 05 Sep 2018 03:48:58 +0200
commit

ff2ecd310e031b197eb5291934bc8cf953171bdd

parent

25ec92ca5fa4f5ed8adcdb757cff6604de7254f5

A barry.js

@@ -0,0 +1,1226 @@

+const bigInt = require("big-integer"); +const __P__ = new bigInt("21888242871839275222246405745257275088696311157297823662689037894645226208583"); +const __MASK__ = new bigInt(2).pow(253).minus(1); +const circuit = {}; +module.exports = circuit; + +circuit.signals={ + "one": { + "fullName": "one", + "value": "1", + "equivalence": "", + "direction": "", + "id": 0 + }, + "main.in": { + "fullName": "main.in", + "direction": "IN", + "component": "main", + "equivalence": "", + "alias": [ + "main.in" + ], + "id": 1 + }, + "main.out[0]": { + "fullName": "main.out[0]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[0]" + ], + "id": 2 + }, + "main.out[1]": { + "fullName": "main.out[1]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[1]" + ], + "id": 3 + }, + "main.out[2]": { + "fullName": "main.out[2]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[2]" + ], + "id": 4 + }, + "main.out[3]": { + "fullName": "main.out[3]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[3]" + ], + "id": 5 + }, + "main.out[4]": { + "fullName": "main.out[4]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[4]" + ], + "id": 6 + }, + "main.out[5]": { + "fullName": "main.out[5]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[5]" + ], + "id": 7 + }, + "main.out[6]": { + "fullName": "main.out[6]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[6]" + ], + "id": 8 + }, + "main.out[7]": { + "fullName": "main.out[7]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[7]" + ], + "id": 9 + }, + "main.out[8]": { + "fullName": "main.out[8]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[8]" + ], + "id": 10 + }, + "main.out[9]": { + "fullName": "main.out[9]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[9]" + ], + "id": 11 + }, + "main.out[10]": { + "fullName": "main.out[10]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[10]" + ], + "id": 12 + }, + "main.out[11]": { + "fullName": "main.out[11]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[11]" + ], + "id": 13 + }, + "main.out[12]": { + "fullName": "main.out[12]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[12]" + ], + "id": 14 + }, + "main.out[13]": { + "fullName": "main.out[13]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[13]" + ], + "id": 15 + }, + "main.out[14]": { + "fullName": "main.out[14]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[14]" + ], + "id": 16 + }, + "main.out[15]": { + "fullName": "main.out[15]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[15]" + ], + "id": 17 + }, + "main.out[16]": { + "fullName": "main.out[16]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[16]" + ], + "id": 18 + }, + "main.out[17]": { + "fullName": "main.out[17]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[17]" + ], + "id": 19 + }, + "main.out[18]": { + "fullName": "main.out[18]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[18]" + ], + "id": 20 + }, + "main.out[19]": { + "fullName": "main.out[19]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[19]" + ], + "id": 21 + }, + "main.out[20]": { + "fullName": "main.out[20]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[20]" + ], + "id": 22 + }, + "main.out[21]": { + "fullName": "main.out[21]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[21]" + ], + "id": 23 + }, + "main.out[22]": { + "fullName": "main.out[22]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[22]" + ], + "id": 24 + }, + "main.out[23]": { + "fullName": "main.out[23]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[23]" + ], + "id": 25 + }, + "main.out[24]": { + "fullName": "main.out[24]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[24]" + ], + "id": 26 + }, + "main.out[25]": { + "fullName": "main.out[25]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[25]" + ], + "id": 27 + }, + "main.out[26]": { + "fullName": "main.out[26]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[26]" + ], + "id": 28 + }, + "main.out[27]": { + "fullName": "main.out[27]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[27]" + ], + "id": 29 + }, + "main.out[28]": { + "fullName": "main.out[28]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[28]" + ], + "id": 30 + }, + "main.out[29]": { + "fullName": "main.out[29]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[29]" + ], + "id": 31 + }, + "main.out[30]": { + "fullName": "main.out[30]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[30]" + ], + "id": 32 + }, + "main.out[31]": { + "fullName": "main.out[31]", + "direction": "OUT", + "component": "main", + "equivalence": "", + "alias": [ + "main.out[31]" + ], + "id": 33 + } +}; + +circuit.components={ + "main": { + "signals": [ + "main.in", + "main.out[0]", + "main.out[1]", + "main.out[2]", + "main.out[3]", + "main.out[4]", + "main.out[5]", + "main.out[6]", + "main.out[7]", + "main.out[8]", + "main.out[9]", + "main.out[10]", + "main.out[11]", + "main.out[12]", + "main.out[13]", + "main.out[14]", + "main.out[15]", + "main.out[16]", + "main.out[17]", + "main.out[18]", + "main.out[19]", + "main.out[20]", + "main.out[21]", + "main.out[22]", + "main.out[23]", + "main.out[24]", + "main.out[25]", + "main.out[26]", + "main.out[27]", + "main.out[28]", + "main.out[29]", + "main.out[30]", + "main.out[31]" + ], + "params": {}, + "template": "ToBin", + "inputSignals": 1 + } +}; + +circuit.signalConstrains=[ + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[0]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[0]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[1]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[1]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[2]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[2]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[3]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[3]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[4]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[4]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[5]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[5]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[6]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[6]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[7]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[7]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[8]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[8]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[9]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[9]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[10]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[10]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[11]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[11]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[12]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[12]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[13]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[13]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[14]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[14]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[15]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[15]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[16]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[16]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[17]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[17]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[18]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[18]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[19]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[19]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[20]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[20]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[21]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[21]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[22]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[22]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[23]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[23]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[24]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[24]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[25]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[25]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[26]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[26]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[27]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[27]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[28]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[28]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[29]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[29]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[30]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[30]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[31]": "1" + } + }, + "b": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[31]": "1", + "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + }, + "c": { + "type": "LINEARCOMBINATION", + "values": {} + } + }, + { + "type": "QEQ", + "a": { + "type": "LINEARCOMBINATION", + "values": {} + }, + "b": { + "type": "LINEARCOMBINATION", + "values": {} + }, + "c": { + "type": "LINEARCOMBINATION", + "values": { + "main.out[0]": "1", + "main.out[1]": "2", + "main.out[2]": "4", + "main.out[3]": "8", + "main.out[4]": "16", + "main.out[5]": "32", + "main.out[6]": "64", + "main.out[7]": "128", + "main.out[8]": "256", + "main.out[9]": "512", + "main.out[10]": "1024", + "main.out[11]": "2048", + "main.out[12]": "4096", + "main.out[13]": "8192", + "main.out[14]": "16384", + "main.out[15]": "32768", + "main.out[16]": "65536", + "main.out[17]": "131072", + "main.out[18]": "262144", + "main.out[19]": "524288", + "main.out[20]": "1048576", + "main.out[21]": "2097152", + "main.out[22]": "4194304", + "main.out[23]": "8388608", + "main.out[24]": "16777216", + "main.out[25]": "33554432", + "main.out[26]": "67108864", + "main.out[27]": "134217728", + "main.out[28]": "268435456", + "main.out[29]": "536870912", + "main.out[30]": "1073741824", + "main.out[31]": "2147483648", + "main.in": "21888242871839275222246405745257275088548364400416034343698204186575808495616" + } + } + } +]; + +circuit.witnessNames=[ + [ + "one" + ], + [ + "main.in" + ], + [ + "main.out[0]" + ], + [ + "main.out[1]" + ], + [ + "main.out[2]" + ], + [ + "main.out[3]" + ], + [ + "main.out[4]" + ], + [ + "main.out[5]" + ], + [ + "main.out[6]" + ], + [ + "main.out[7]" + ], + [ + "main.out[8]" + ], + [ + "main.out[9]" + ], + [ + "main.out[10]" + ], + [ + "main.out[11]" + ], + [ + "main.out[12]" + ], + [ + "main.out[13]" + ], + [ + "main.out[14]" + ], + [ + "main.out[15]" + ], + [ + "main.out[16]" + ], + [ + "main.out[17]" + ], + [ + "main.out[18]" + ], + [ + "main.out[19]" + ], + [ + "main.out[20]" + ], + [ + "main.out[21]" + ], + [ + "main.out[22]" + ], + [ + "main.out[23]" + ], + [ + "main.out[24]" + ], + [ + "main.out[25]" + ], + [ + "main.out[26]" + ], + [ + "main.out[27]" + ], + [ + "main.out[28]" + ], + [ + "main.out[29]" + ], + [ + "main.out[30]" + ], + [ + "main.out[31]" + ] +]; + +{ +} + +circuit.templates = {}; + +circuit.templates["AND"] = function(ctx) { + ctx.setSignal("c", [], bigInt(ctx.getSignal("a", [])).times(ctx.getSignal("b", [])).mod(__P__)); + ctx.assert(ctx.getSignal("c", []), bigInt(ctx.getSignal("a", [])).times(ctx.getSignal("b", [])).mod(__P__)); +} +; + +circuit.templates["AND3"] = function(ctx) { + ctx.setPin("and1", [], "a", [], ctx.getSignal("in1", [])); + ctx.assert(ctx.getPin("and1", [], "a", []), ctx.getSignal("in1", [])); + ctx.setPin("and1", [], "b", [], ctx.getSignal("in2", [])); + ctx.assert(ctx.getPin("and1", [], "b", []), ctx.getSignal("in2", [])); + ctx.setPin("and2", [], "a", [], ctx.getSignal("in3", [])); + ctx.assert(ctx.getPin("and2", [], "a", []), ctx.getSignal("in3", [])); + ctx.setPin("and2", [], "b", [], ctx.getPin("and1", [], "c", [])); + ctx.assert(ctx.getPin("and2", [], "b", []), ctx.getPin("and1", [], "c", [])); + ctx.setSignal("out", [], ctx.getPin("and2", [], "c", [])); + ctx.assert(ctx.getSignal("out", []), ctx.getPin("and2", [], "c", [])); +} +; + +circuit.templates["ToBin"] = function(ctx) { + ctx.setVar("lc", [], "0"); + for (ctx.setVar("i", [], "0");bigInt(ctx.getVar("i",[])).lt("32") ? 1 : 0;(ctx.setVar("i", [], bigInt(ctx.getVar("i",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__)) + { + ctx.setSignal("out", [ctx.getVar("i",[])], bigInt(bigInt(ctx.getVar("i",[])).greater(256) ? 0 : bigInt(ctx.getSignal("in", [])).shiftRight(bigInt(ctx.getVar("i",[])).value).and(__MASK__)).and("1").and(__MASK__)); + ctx.setVar("lc", [], bigInt(ctx.getVar("lc",[])).add(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).times(bigInt("2").modPow(ctx.getVar("i",[]), __P__)).mod(__P__)).mod(__P__)); + ctx.assert(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).times(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).add(__P__).minus("1").mod(__P__)).mod(__P__), "0"); + } + ctx.assert(ctx.getVar("lc",[]), ctx.getSignal("in", [])); +} +; +circuit.functionParams={}; + + +circuit.functions = {};
A circuits/barry.jaz

@@ -0,0 +1,43 @@

+ + + +template AND() { + signal input a; + signal input b; + signal output c; + + c <== a*b; +} + +template AND3() { + signal input in1; + signal input in2; + signal input in3; + signal output out; + + component and1 = AND(); + component and2 = AND(); + + in1 ==> and1.a; + in2 ==> and1.b; + in3 ==> and2.a; + and1.c ==> and2.b; + and2.c ==> out; +} + +template ToBin() { + signal input in; + signal output out[32]; + + var lc = 0; + + for (var i=0; i<32; i++) { + out[i] <-- (in >> i) & 1; + lc = lc + out[i] * 2**i; + out[i]*(out[i]-1) === 0; + } + + lc === in; +} + +component main = ToBin();
M circuits/sha256/constants.jaz → circuits/sha256/constants.jaz

@@ -12,7 +12,7 @@ 0x1f83d9ab,

0x5be0cd19]; for (var i=0; i<32; i++) { - out[i] = (c[x] >> i) & 1; + out[i] <== (c[x] >> i) & 1; } }

@@ -30,6 +30,6 @@ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2

]; for (var i=0; i<32; i++) { - out[i] = (c[x] >> i) & 1; + out[i] <== (c[x] >> i) & 1; } }
A circuits/sha256/constants_test.jaz

@@ -0,0 +1,18 @@

+include "constants.jaz" + +template A() { + signal input in; + component h0; + h0 = K(8); + + var lc = 0; + var e = 1; + for (var i=0; i<32; i++) { + lc = lc + e*h0.out[i]; + e *= 2; + } + + lc === in; +} + +component main = A();
M circuits/sha256/sum_test.jaz → test/circuits/sum_test.jaz

@@ -2,7 +2,7 @@ include "bitify.jaz"

include "binsum.jaz" template A() { - signal input a; + signal private input a; signal input b; signal output out;
A constant_test.json

@@ -0,0 +1,290 @@

+{ + "mainCode": "{\n {\n }\n}\n", + "signalName2Idx": { + "one": 0, + "main.in": 1, + "main.h0.out[0]": 2, + "main.h0.out[1]": 3, + "main.h0.out[2]": 4, + "main.h0.out[3]": 5, + "main.h0.out[4]": 6, + "main.h0.out[5]": 7, + "main.h0.out[6]": 8, + "main.h0.out[7]": 9, + "main.h0.out[8]": 10, + "main.h0.out[9]": 11, + "main.h0.out[10]": 12, + "main.h0.out[11]": 13, + "main.h0.out[12]": 14, + "main.h0.out[13]": 15, + "main.h0.out[14]": 16, + "main.h0.out[15]": 17, + "main.h0.out[16]": 18, + "main.h0.out[17]": 19, + "main.h0.out[18]": 20, + "main.h0.out[19]": 21, + "main.h0.out[20]": 22, + "main.h0.out[21]": 23, + "main.h0.out[22]": 24, + "main.h0.out[23]": 25, + "main.h0.out[24]": 26, + "main.h0.out[25]": 27, + "main.h0.out[26]": 28, + "main.h0.out[27]": 29, + "main.h0.out[28]": 30, + "main.h0.out[29]": 31, + "main.h0.out[30]": 32, + "main.h0.out[31]": 33 + }, + "components": [ + { + "name": "main", + "params": {}, + "template": "A", + "inputSignals": 1 + }, + { + "name": "main.h0", + "params": { + "x": "8" + }, + "template": "K", + "inputSignals": 0 + } + ], + "componentName2Idx": { + "main": 0, + "main.h0": 1 + }, + "signals": [ + { + "names": [ + "one" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.in" + ], + "triggerComponents": [ + 0 + ] + }, + { + "names": [ + "main.h0.out[0]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[1]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[2]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[3]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[4]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[5]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[6]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[7]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[8]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[9]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[10]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[11]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[12]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[13]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[14]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[15]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[16]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[17]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[18]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[19]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[20]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[21]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[22]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[23]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[24]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[25]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[26]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[27]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[28]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[29]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[30]" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.h0.out[31]" + ], + "triggerComponents": [] + } + ], + "constrains": [ + [ + {}, + {}, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186572184114537", + "1": "1" + } + ] + ], + "templates": { + "H": "function(ctx) {\n ctx.setVar(\"c\", [], [\"1779033703\",\"3144134277\",\"1013904242\",\"2773480762\",\"1359893119\",\"2600822924\",\"528734635\",\"1541459225\"]);\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(\"32\")) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setSignal(\"out\", [ctx.getVar(\"i\",[])], bigInt(bigInt(ctx.getVar(\"i\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getVar(\"c\",[ctx.getVar(\"x\",[])])).shr(bigInt(ctx.getVar(\"i\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n ctx.assert(ctx.getSignal(\"out\", [ctx.getVar(\"i\",[])]), bigInt(bigInt(ctx.getVar(\"i\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getVar(\"c\",[ctx.getVar(\"x\",[])])).shr(bigInt(ctx.getVar(\"i\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n }\n}\n", + "K": "function(ctx) {\n ctx.setVar(\"c\", [], [\"1116352408\",\"1899447441\",\"3049323471\",\"3921009573\",\"961987163\",\"1508970993\",\"2453635748\",\"2870763221\",\"3624381080\",\"310598401\",\"607225278\",\"1426881987\",\"1925078388\",\"2162078206\",\"2614888103\",\"3248222580\",\"3835390401\",\"4022224774\",\"264347078\",\"604807628\",\"770255983\",\"1249150122\",\"1555081692\",\"1996064986\",\"2554220882\",\"2821834349\",\"2952996808\",\"3210313671\",\"3336571891\",\"3584528711\",\"113926993\",\"338241895\",\"666307205\",\"773529912\",\"1294757372\",\"1396182291\",\"1695183700\",\"1986661051\",\"2177026350\",\"2456956037\",\"2730485921\",\"2820302411\",\"3259730800\",\"3345764771\",\"3516065817\",\"3600352804\",\"4094571909\",\"275423344\",\"430227734\",\"506948616\",\"659060556\",\"883997877\",\"958139571\",\"1322822218\",\"1537002063\",\"1747873779\",\"1955562222\",\"2024104815\",\"2227730452\",\"2361852424\",\"2428436474\",\"2756734187\",\"3204031479\",\"3329325298\"]);\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(\"32\")) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setSignal(\"out\", [ctx.getVar(\"i\",[])], bigInt(bigInt(ctx.getVar(\"i\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getVar(\"c\",[ctx.getVar(\"x\",[])])).shr(bigInt(ctx.getVar(\"i\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n ctx.assert(ctx.getSignal(\"out\", [ctx.getVar(\"i\",[])]), bigInt(bigInt(ctx.getVar(\"i\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getVar(\"c\",[ctx.getVar(\"x\",[])])).shr(bigInt(ctx.getVar(\"i\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n }\n}\n", + "A": "function(ctx) {\n ctx.setVar(\"lc\", [], \"0\");\n ctx.setVar(\"e\", [], \"1\");\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(\"32\")) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setVar(\"lc\", [], bigInt(ctx.getVar(\"lc\",[])).add(bigInt(bigInt(ctx.getVar(\"e\",[])).mul(bigInt(ctx.getPin(\"h0\", [], \"out\", [ctx.getVar(\"i\",[])]))).mod(__P__))).mod(__P__));\n ctx.setVar(\"e\", [], bigInt(ctx.getVar(\"e\",[])).mul(bigInt(\"2\")).mod(__P__));\n }\n ctx.assert(ctx.getVar(\"lc\",[]), ctx.getSignal(\"in\", []));\n}\n" + }, + "functions": {}, + "nPrvInputs": 0, + "nPubInputs": 1, + "nInputs": 1, + "nOutputs": 0, + "nVars": 2, + "nConstants": 32, + "nSignals": 34 +}
A index.js

@@ -0,0 +1,1 @@

+module.exports = require("./src/compiler.js");
A input_barry.json

@@ -0,0 +1,3 @@

+{ + "in": "10" +}
M jaz.js → jaz.js

@@ -72,12 +72,12 @@ recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)

} */ var jaz = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,14],$V1=[1,31],$V2=[1,59],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,18],$V7=[1,19],$V8=[1,20],$V9=[1,23],$Va=[1,21],$Vb=[1,50],$Vc=[1,51],$Vd=[1,48],$Ve=[1,49],$Vf=[1,52],$Vg=[1,53],$Vh=[1,57],$Vi=[1,58],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,37],$Vn=[5,17,18,19,22,24,27,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,105,108],$Vo=[5,17,18,19,22,24,26,27,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,105,108],$Vp=[1,72],$Vq=[1,73],$Vr=[1,74],$Vs=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,91,92,96,97,101,102,105,108,109],$Vt=[2,94],$Vu=[1,88],$Vv=[1,89],$Vw=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,55,56,80,82,89,90,91,92,96,97,101,102,105,108,109],$Vx=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,105,109],$Vy=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,80,82,89,90,91,92,96,97,101,102,105,108,109],$Vz=[2,107],$VA=[1,96],$VB=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,80,82,89,90,91,92,96,97,101,102,105,108,109],$VC=[1,101],$VD=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,80,82,89,90,91,92,96,97,101,102,105,108,109],$VE=[1,104],$VF=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,80,82,89,90,91,92,96,97,101,102,105,108,109],$VG=[1,105],$VH=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,80,82,89,90,91,92,96,97,101,102,105,108,109],$VI=[1,106],$VJ=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,80,82,89,90,91,92,96,97,101,102,105,108,109],$VK=[1,107],$VL=[1,108],$VM=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,80,82,89,90,91,92,96,97,101,102,105,108,109],$VN=[1,109],$VO=[1,110],$VP=[1,111],$VQ=[1,112],$VR=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,80,82,89,90,91,92,96,97,101,102,105,108,109],$VS=[1,113],$VT=[1,114],$VU=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,89,90,91,92,96,97,101,102,105,108,109],$VV=[1,115],$VW=[1,116],$VX=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,89,90,91,92,96,97,101,102,105,108,109],$VY=[1,117],$VZ=[1,118],$V_=[1,119],$V$=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,89,90,91,92,96,97,101,102,105,108,109],$V01=[1,120],$V11=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,105,108,109],$V21=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,105,108,109],$V31=[1,163],$V41=[21,23,109],$V51=[1,184],$V61=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,56,80,82,89,90,91,92,96,97,101,102,105,108,109],$V71=[1,195],$V81=[21,23]; -var parser = {trace: function trace() { }, +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,14],$V1=[1,31],$V2=[1,59],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,18],$V7=[1,19],$V8=[1,20],$V9=[1,23],$Va=[1,21],$Vb=[1,50],$Vc=[1,51],$Vd=[1,48],$Ve=[1,49],$Vf=[1,52],$Vg=[1,53],$Vh=[1,57],$Vi=[1,58],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,37],$Vn=[5,17,18,19,22,24,27,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,106,109],$Vo=[5,17,18,19,22,24,26,27,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,106,109],$Vp=[1,72],$Vq=[1,73],$Vr=[1,74],$Vs=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,91,92,96,97,101,102,106,109,110],$Vt=[2,94],$Vu=[1,88],$Vv=[1,89],$Vw=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,55,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$Vx=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,110],$Vy=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$Vz=[2,108],$VA=[1,96],$VB=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,80,82,89,90,91,92,96,97,101,102,106,109,110],$VC=[1,102],$VD=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,80,82,89,90,91,92,96,97,101,102,106,109,110],$VE=[1,105],$VF=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,80,82,89,90,91,92,96,97,101,102,106,109,110],$VG=[1,106],$VH=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,80,82,89,90,91,92,96,97,101,102,106,109,110],$VI=[1,107],$VJ=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,80,82,89,90,91,92,96,97,101,102,106,109,110],$VK=[1,108],$VL=[1,109],$VM=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,80,82,89,90,91,92,96,97,101,102,106,109,110],$VN=[1,110],$VO=[1,111],$VP=[1,112],$VQ=[1,113],$VR=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,80,82,89,90,91,92,96,97,101,102,106,109,110],$VS=[1,114],$VT=[1,115],$VU=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,89,90,91,92,96,97,101,102,106,109,110],$VV=[1,116],$VW=[1,117],$VX=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,89,90,91,92,96,97,101,102,106,109,110],$VY=[1,118],$VZ=[1,119],$V_=[1,120],$V$=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,89,90,91,92,96,97,101,102,106,109,110],$V01=[1,121],$V11=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,109,110],$V21=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,106,109,110],$V31=[1,165],$V41=[21,23,110],$V51=[1,186],$V61=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$V71=[1,198],$V81=[21,23]; +var parser = {trace: function trace () { }, yy: {}, -symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"functionDefinitionStatment":7,"templateDefinitionStatment":8,"ifStatment":9,"forStatment":10,"whileStatment":11,"doWhileStatment":12,"returnStatment":13,"block":14,"expressionStatment":15,"includeStatment":16,"function":17,"IDENTIFIER":18,"(":19,"identifierList":20,")":21,"template":22,",":23,"if":24,"expression":25,"else":26,"for":27,";":28,"while":29,"do":30,"return":31,"include":32,"STRING":33,"{":34,"}":35,"e17":36,"leftHandExpression":37,"=":38,"+=":39,"-=":40,"*=":41,"/=":42,"%=":43,"<<=":44,">>=":45,"&=":46,"|=":47,"^=":48,"<==":49,"==>":50,"<--":51,"-->":52,"e16":53,"===":54,"?":55,":":56,"rightArray":57,"e15":58,"||":59,"e14":60,"&&":61,"e13":62,"|":63,"e12":64,"^":65,"e11":66,"&":67,"e10":68,"==":69,"e9":70,"!=":71,"<=":72,"e7":73,">=":74,"<":75,">":76,"<<":77,"e6":78,">>":79,"+":80,"e5":81,"-":82,"*":83,"e4":84,"/":85,"%":86,"**":87,"e3":88,"++":89,"--":90,"!":91,"~":92,"e2":93,"functionCall":94,"e0":95,"DECNUMBER":96,"HEXNUMBER":97,"simpleLeftHandExpression":98,".":99,"declaration":100,"var":101,"signal":102,"input":103,"output":104,"component":105,"array":106,"expressionList":107,"[":108,"]":109,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOF",17:"function",18:"IDENTIFIER",19:"(",21:")",22:"template",23:",",24:"if",26:"else",27:"for",28:";",29:"while",30:"do",31:"return",32:"include",33:"STRING",34:"{",35:"}",38:"=",39:"+=",40:"-=",41:"*=",42:"/=",43:"%=",44:"<<=",45:">>=",46:"&=",47:"|=",48:"^=",49:"<==",50:"==>",51:"<--",52:"-->",54:"===",55:"?",56:":",59:"||",61:"&&",63:"|",65:"^",67:"&",69:"==",71:"!=",72:"<=",74:">=",75:"<",76:">",77:"<<",79:">>",80:"+",82:"-",83:"*",85:"/",86:"%",87:"**",89:"++",90:"--",91:"!",92:"~",96:"DECNUMBER",97:"HEXNUMBER",99:".",101:"var",102:"signal",103:"input",104:"output",105:"component",108:"[",109:"]"}, -productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,6],[7,5],[8,6],[8,5],[20,3],[20,1],[9,7],[9,5],[10,9],[11,5],[12,6],[13,3],[13,2],[16,3],[16,2],[14,3],[15,2],[15,1],[25,1],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,5],[36,1],[53,1],[53,1],[58,3],[58,1],[60,3],[60,1],[62,3],[62,1],[64,3],[64,1],[66,3],[66,1],[68,3],[68,3],[68,1],[70,3],[70,3],[70,3],[70,3],[70,1],[73,3],[73,3],[73,1],[78,3],[78,3],[78,1],[81,3],[81,3],[81,3],[81,1],[84,3],[84,1],[88,2],[88,2],[88,2],[88,2],[88,2],[88,2],[88,1],[93,2],[93,2],[93,1],[93,1],[95,1],[95,1],[95,1],[95,3],[37,3],[37,1],[37,1],[100,2],[100,2],[100,3],[100,3],[100,2],[98,2],[98,1],[94,4],[94,3],[107,3],[107,1],[57,1],[106,3]], +symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"functionDefinitionStatment":7,"templateDefinitionStatment":8,"ifStatment":9,"forStatment":10,"whileStatment":11,"doWhileStatment":12,"returnStatment":13,"block":14,"expressionStatment":15,"includeStatment":16,"function":17,"IDENTIFIER":18,"(":19,"identifierList":20,")":21,"template":22,",":23,"if":24,"expression":25,"else":26,"for":27,";":28,"while":29,"do":30,"return":31,"include":32,"STRING":33,"{":34,"}":35,"e17":36,"leftHandExpression":37,"=":38,"+=":39,"-=":40,"*=":41,"/=":42,"%=":43,"<<=":44,">>=":45,"&=":46,"|=":47,"^=":48,"<==":49,"==>":50,"<--":51,"-->":52,"e16":53,"===":54,"?":55,":":56,"rightArray":57,"e15":58,"||":59,"e14":60,"&&":61,"e13":62,"|":63,"e12":64,"^":65,"e11":66,"&":67,"e10":68,"==":69,"e9":70,"!=":71,"<=":72,"e7":73,">=":74,"<":75,">":76,"<<":77,"e6":78,">>":79,"+":80,"e5":81,"-":82,"*":83,"e4":84,"/":85,"%":86,"**":87,"e3":88,"++":89,"--":90,"!":91,"~":92,"e2":93,"functionCall":94,"e0":95,"DECNUMBER":96,"HEXNUMBER":97,"simpleLeftHandExpression":98,".":99,"declaration":100,"var":101,"signal":102,"input":103,"private":104,"output":105,"component":106,"array":107,"expressionList":108,"[":109,"]":110,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",17:"function",18:"IDENTIFIER",19:"(",21:")",22:"template",23:",",24:"if",26:"else",27:"for",28:";",29:"while",30:"do",31:"return",32:"include",33:"STRING",34:"{",35:"}",38:"=",39:"+=",40:"-=",41:"*=",42:"/=",43:"%=",44:"<<=",45:">>=",46:"&=",47:"|=",48:"^=",49:"<==",50:"==>",51:"<--",52:"-->",54:"===",55:"?",56:":",59:"||",61:"&&",63:"|",65:"^",67:"&",69:"==",71:"!=",72:"<=",74:">=",75:"<",76:">",77:"<<",79:">>",80:"+",82:"-",83:"*",85:"/",86:"%",87:"**",89:"++",90:"--",91:"!",92:"~",96:"DECNUMBER",97:"HEXNUMBER",99:".",101:"var",102:"signal",103:"input",104:"private",105:"output",106:"component",109:"[",110:"]"}, +productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,6],[7,5],[8,6],[8,5],[20,3],[20,1],[9,7],[9,5],[10,9],[11,5],[12,6],[13,3],[13,2],[16,3],[16,2],[14,3],[15,2],[15,1],[25,1],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,5],[36,1],[53,1],[53,1],[58,3],[58,1],[60,3],[60,1],[62,3],[62,1],[64,3],[64,1],[66,3],[66,1],[68,3],[68,3],[68,1],[70,3],[70,3],[70,3],[70,3],[70,1],[73,3],[73,3],[73,1],[78,3],[78,3],[78,1],[81,3],[81,3],[81,3],[81,1],[84,3],[84,1],[88,2],[88,2],[88,2],[88,2],[88,2],[88,2],[88,1],[93,2],[93,2],[93,1],[93,1],[95,1],[95,1],[95,1],[95,3],[37,3],[37,1],[37,1],[100,2],[100,2],[100,3],[100,4],[100,3],[100,2],[98,2],[98,1],[94,4],[94,3],[108,3],[108,1],[57,1],[107,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */

@@ -103,7 +103,7 @@ this.$ = { type: "STATMENTLIST", statments: [$$[$0]] };

setLines(this.$, _$[$0]); break; -case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 31: case 32: case 60: case 62: case 76: case 80: case 82: case 89: case 92: case 93: case 112: +case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 31: case 32: case 60: case 62: case 76: case 80: case 82: case 89: case 92: case 93: case 113: this.$ = $$[$0];

@@ -639,17 +639,23 @@

break; case 104: + this.$ = {type: "DECLARE", declareType: "SIGNALIN", private: true, name: $$[$0]}; + setLines(this.$, _$[$0-3], _$[$0]); + +break; +case 105: + this.$ = {type: "DECLARE", declareType: "SIGNALOUT", name: $$[$0]}; setLines(this.$, _$[$0-2], _$[$0]); break; -case 105: +case 106: this.$ = {type: "DECLARE", declareType: "COMPONENT", name: $$[$0]} setLines(this.$, _$[$0-1], _$[$0]); break; -case 106: +case 107: for (let i=0; i< $$[$0].values.length; i++) { $$[$0-1].selectors.push($$[$0].values[i]);

@@ -657,37 +663,37 @@ }

setLines($$[$0-1], _$[$0-1], _$[$0]); break; -case 107: +case 108: this.$ = {type: "VARIABLE", name: $$[$0] , selectors: []}; setLines(this.$, _$[$0]); break; -case 108: +case 109: this.$ = {type: "FUNCTIONCALL", name: $$[$0-3], params: $$[$0-1].expressions} setLines(this.$, _$[$0-3], _$[$0]); break; -case 109: +case 110: this.$ = {type: "FUNCTIONCALL", name: $$[$0-2], params: []} setLines(this.$, _$[$0-2], _$[$0]); break; -case 110: +case 111: $$[$0-2].expressions.push($$[$0]); setLines(this.$, _$[$0-2], _$[$0]); break; -case 111: +case 112: this.$ = {type: "EXPRESSIONLST", expressions: [$$[$0]]}; setLines(this.$, _$[$0]); break; -case 113: +case 114: this.$ = { type: "ARRAY", values: $$[$0-1].expressions}; setLines(this.$, _$[$0-2], _$[$0]);

@@ -695,9 +701,9 @@

break; } }, -table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{1:[3]},{5:[1,60],6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($Vn,[2,3]),o($Vo,[2,4]),o($Vo,[2,5]),o($Vo,[2,6]),o($Vo,[2,7]),o($Vo,[2,8]),o($Vo,[2,9]),o($Vo,[2,10]),o($Vo,[2,11]),o($Vo,[2,12]),o($Vo,[2,13]),{18:[1,62]},{18:[1,63]},{19:[1,64]},{19:[1,65]},{19:[1,66]},{6:67,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:68,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{4:69,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($Vo,[2,31],{28:[1,70]}),{33:[1,71]},o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,105,108,109],[2,32],{50:$Vp,52:$Vq,55:$Vr}),o($Vs,$Vt,{38:[1,75],39:[1,76],40:[1,77],41:[1,78],42:[1,79],43:[1,80],44:[1,81],45:[1,82],46:[1,83],47:[1,84],48:[1,85],49:[1,86],51:[1,87],89:$Vu,90:$Vv}),o($Vw,[2,50],{54:[1,90]}),o($Vx,[2,100],{106:92,99:[1,91],108:$Vm}),o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,105,108,109],[2,99]),o($Vy,[2,51]),o($Vy,[2,52],{59:[1,93]}),o([5,17,18,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,105,108,109],$Vz,{19:[1,94]}),{18:$VA,98:95},{18:$VA,98:97,103:[1,98],104:[1,99]},{18:$VA,98:100},o($Vy,[2,112]),o($VB,[2,54],{61:$VC}),{18:$V1,19:$V2,25:103,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,107:102,108:$Vm},o($VD,[2,56],{63:$VE}),o($VF,[2,58],{65:$VG}),o($VH,[2,60],{67:$VI}),o($VJ,[2,62],{69:$VK,71:$VL}),o($VM,[2,65],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,70],{77:$VS,79:$VT}),o($VU,[2,73],{80:$VV,82:$VW}),o($VX,[2,76],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,80],{87:$V01}),o($V11,[2,82]),{18:$VA,37:121,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$VA,37:122,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:123,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:125,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:126,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:127,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},o($V11,[2,89]),o($V11,[2,92]),o($V11,[2,93]),o($V11,[2,95]),o($V11,[2,96]),{18:$V1,19:$V2,25:128,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{1:[2,1]},o($Vn,[2,2]),{19:[1,129]},{19:[1,130]},{18:$V1,19:$V2,25:131,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:132,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:133,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{29:[1,134]},o($Vo,[2,26],{28:[1,135]}),{6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,35:[1,136],36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($Vo,[2,30]),o($Vo,[2,28],{28:[1,137]}),{18:$VA,37:138,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$VA,37:139,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,36:140,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:141,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:142,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:143,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:144,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:145,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:146,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:147,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:148,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:149,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:150,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:151,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:152,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:153,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($V11,[2,90]),o($V11,[2,91]),{18:$V1,19:$V2,36:154,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$VA,98:155},o($V21,[2,106]),{18:$V1,19:$V2,37:124,60:156,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,21:[1,158],25:103,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,107:157,108:$Vm},o($Vx,[2,101],{106:92,108:$Vm}),o($V21,$Vz),o($Vx,[2,102],{106:92,108:$Vm}),{18:$VA,98:159},{18:$VA,98:160},o($Vx,[2,105],{106:92,108:$Vm}),{18:$V1,19:$V2,37:124,62:161,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{23:$V31,109:[1,162]},o($V41,[2,111]),{18:$V1,19:$V2,37:124,64:164,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,66:165,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,68:166,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,70:167,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,70:168,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,73:169,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,73:170,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,73:171,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,73:172,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,78:173,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,78:174,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,81:175,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,81:176,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,84:177,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,84:178,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,84:179,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:180,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},o($V11,[2,83]),o($V11,[2,84]),o($V11,[2,85]),o($Vs,$Vt,{89:$Vu,90:$Vv}),o($V11,[2,86]),o($V11,[2,87]),o($V11,[2,88]),{21:[1,181]},{18:$V51,20:182,21:[1,183]},{18:$V51,20:185,21:[1,186]},{21:[1,187]},{28:[1,188]},{21:[1,189]},{19:[1,190]},o($Vo,[2,25]),o($Vo,[2,29]),o($Vo,[2,27]),o($Vw,[2,45]),o($Vw,[2,47]),{50:$Vp,52:$Vq,55:$Vr,56:[1,191]},o($V61,[2,33],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,34],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,35],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,36],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,37],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,38],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,39],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,40],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,41],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,42],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,43],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,44],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,46],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,48],{50:$Vp,52:$Vq,55:$Vr}),o($Vx,[2,98],{106:92,108:$Vm}),o($VB,[2,53],{61:$VC}),{21:[1,192],23:$V31},o($V11,[2,109]),o($Vx,[2,103],{106:92,108:$Vm}),o($Vx,[2,104],{106:92,108:$Vm}),o($VD,[2,55],{63:$VE}),o($V21,[2,113]),{18:$V1,19:$V2,25:193,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($VF,[2,57],{65:$VG}),o($VH,[2,59],{67:$VI}),o($VJ,[2,61],{69:$VK,71:$VL}),o($VM,[2,63],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VM,[2,64],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,66],{77:$VS,79:$VT}),o($VR,[2,67],{77:$VS,79:$VT}),o($VR,[2,68],{77:$VS,79:$VT}),o($VR,[2,69],{77:$VS,79:$VT}),o($VU,[2,71],{80:$VV,82:$VW}),o($VU,[2,72],{80:$VV,82:$VW}),o($VX,[2,74],{83:$VY,85:$VZ,86:$V_}),o($VX,[2,75],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,77],{87:$V01}),o($V$,[2,78],{87:$V01}),o($V$,[2,79],{87:$V01}),o($V11,[2,81]),o($V11,[2,97]),{21:[1,194],23:$V71},{14:196,34:$Va},o($V81,[2,19]),{21:[1,197],23:$V71},{14:198,34:$Va},{6:199,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:200,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{6:201,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:202,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:203,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($V11,[2,108]),o($V41,[2,110]),{14:204,34:$Va},{18:[1,205]},o($Vo,[2,15]),{14:206,34:$Va},o($Vo,[2,17]),o($Vn,[2,21],{26:[1,207]}),{28:[1,208]},o($Vo,[2,23]),{21:[1,209]},o($V61,[2,49],{50:$Vp,52:$Vq,55:$Vr}),o($Vo,[2,14]),o($V81,[2,18]),o($Vo,[2,16]),{6:210,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:211,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($Vo,[2,24]),o($Vo,[2,20]),{21:[1,212]},{6:213,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,105:$Vl,106:35,108:$Vm},o($Vo,[2,22])], +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{1:[3]},{5:[1,60],6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vn,[2,3]),o($Vo,[2,4]),o($Vo,[2,5]),o($Vo,[2,6]),o($Vo,[2,7]),o($Vo,[2,8]),o($Vo,[2,9]),o($Vo,[2,10]),o($Vo,[2,11]),o($Vo,[2,12]),o($Vo,[2,13]),{18:[1,62]},{18:[1,63]},{19:[1,64]},{19:[1,65]},{19:[1,66]},{6:67,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:68,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{4:69,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,31],{28:[1,70]}),{33:[1,71]},o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,106,109,110],[2,32],{50:$Vp,52:$Vq,55:$Vr}),o($Vs,$Vt,{38:[1,75],39:[1,76],40:[1,77],41:[1,78],42:[1,79],43:[1,80],44:[1,81],45:[1,82],46:[1,83],47:[1,84],48:[1,85],49:[1,86],51:[1,87],89:$Vu,90:$Vv}),o($Vw,[2,50],{54:[1,90]}),o($Vx,[2,100],{107:92,99:[1,91],109:$Vm}),o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,109,110],[2,99]),o($Vy,[2,51]),o($Vy,[2,52],{59:[1,93]}),o([5,17,18,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,106,109,110],$Vz,{19:[1,94]}),{18:$VA,98:95},{18:$VA,98:97,103:[1,98],104:[1,99],105:[1,100]},{18:$VA,98:101},o($Vy,[2,113]),o($VB,[2,54],{61:$VC}),{18:$V1,19:$V2,25:104,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,108:103,109:$Vm},o($VD,[2,56],{63:$VE}),o($VF,[2,58],{65:$VG}),o($VH,[2,60],{67:$VI}),o($VJ,[2,62],{69:$VK,71:$VL}),o($VM,[2,65],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,70],{77:$VS,79:$VT}),o($VU,[2,73],{80:$VV,82:$VW}),o($VX,[2,76],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,80],{87:$V01}),o($V11,[2,82]),{18:$VA,37:122,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$VA,37:123,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:124,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:126,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:127,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:128,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},o($V11,[2,89]),o($V11,[2,92]),o($V11,[2,93]),o($V11,[2,95]),o($V11,[2,96]),{18:$V1,19:$V2,25:129,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{1:[2,1]},o($Vn,[2,2]),{19:[1,130]},{19:[1,131]},{18:$V1,19:$V2,25:132,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:133,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:134,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{29:[1,135]},o($Vo,[2,26],{28:[1,136]}),{6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,35:[1,137],36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,30]),o($Vo,[2,28],{28:[1,138]}),{18:$VA,37:139,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$VA,37:140,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,36:141,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:142,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:143,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:144,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:145,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:146,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:147,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:148,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:149,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:150,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:151,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:152,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:153,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:154,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($V11,[2,90]),o($V11,[2,91]),{18:$V1,19:$V2,36:155,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$VA,98:156},o($V21,[2,107]),{18:$V1,19:$V2,37:125,60:157,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,21:[1,159],25:104,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,108:158,109:$Vm},o($Vx,[2,101],{107:92,109:$Vm}),o($V21,$Vz),o($Vx,[2,102],{107:92,109:$Vm}),{18:$VA,98:160},{103:[1,161]},{18:$VA,98:162},o($Vx,[2,106],{107:92,109:$Vm}),{18:$V1,19:$V2,37:125,62:163,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{23:$V31,110:[1,164]},o($V41,[2,112]),{18:$V1,19:$V2,37:125,64:166,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,66:167,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,68:168,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,70:169,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,70:170,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:171,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:172,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:173,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:174,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,78:175,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,78:176,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,81:177,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,81:178,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:179,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:180,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:181,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:182,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},o($V11,[2,83]),o($V11,[2,84]),o($V11,[2,85]),o($Vs,$Vt,{89:$Vu,90:$Vv}),o($V11,[2,86]),o($V11,[2,87]),o($V11,[2,88]),{21:[1,183]},{18:$V51,20:184,21:[1,185]},{18:$V51,20:187,21:[1,188]},{21:[1,189]},{28:[1,190]},{21:[1,191]},{19:[1,192]},o($Vo,[2,25]),o($Vo,[2,29]),o($Vo,[2,27]),o($Vw,[2,45]),o($Vw,[2,47]),{50:$Vp,52:$Vq,55:$Vr,56:[1,193]},o($V61,[2,33],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,34],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,35],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,36],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,37],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,38],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,39],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,40],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,41],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,42],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,43],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,44],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,46],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,48],{50:$Vp,52:$Vq,55:$Vr}),o($Vx,[2,98],{107:92,109:$Vm}),o($VB,[2,53],{61:$VC}),{21:[1,194],23:$V31},o($V11,[2,110]),o($Vx,[2,103],{107:92,109:$Vm}),{18:$VA,98:195},o($Vx,[2,105],{107:92,109:$Vm}),o($VD,[2,55],{63:$VE}),o($V21,[2,114]),{18:$V1,19:$V2,25:196,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($VF,[2,57],{65:$VG}),o($VH,[2,59],{67:$VI}),o($VJ,[2,61],{69:$VK,71:$VL}),o($VM,[2,63],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VM,[2,64],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,66],{77:$VS,79:$VT}),o($VR,[2,67],{77:$VS,79:$VT}),o($VR,[2,68],{77:$VS,79:$VT}),o($VR,[2,69],{77:$VS,79:$VT}),o($VU,[2,71],{80:$VV,82:$VW}),o($VU,[2,72],{80:$VV,82:$VW}),o($VX,[2,74],{83:$VY,85:$VZ,86:$V_}),o($VX,[2,75],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,77],{87:$V01}),o($V$,[2,78],{87:$V01}),o($V$,[2,79],{87:$V01}),o($V11,[2,81]),o($V11,[2,97]),{21:[1,197],23:$V71},{14:199,34:$Va},o($V81,[2,19]),{21:[1,200],23:$V71},{14:201,34:$Va},{6:202,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:203,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{6:204,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:205,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:206,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($V11,[2,109]),o($Vx,[2,104],{107:92,109:$Vm}),o($V41,[2,111]),{14:207,34:$Va},{18:[1,208]},o($Vo,[2,15]),{14:209,34:$Va},o($Vo,[2,17]),o($Vn,[2,21],{26:[1,210]}),{28:[1,211]},o($Vo,[2,23]),{21:[1,212]},o($V61,[2,49],{50:$Vp,52:$Vq,55:$Vr}),o($Vo,[2,14]),o($V81,[2,18]),o($Vo,[2,16]),{6:213,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:214,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,24]),o($Vo,[2,20]),{21:[1,215]},{6:216,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,22])], defaultActions: {60:[2,1]}, -parseError: function parseError(str, hash) { +parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); } else {

@@ -846,7 +852,7 @@ }};

const bigInt = require('big-integer'); const util = require('util'); -const __P__ = new bigInt("21888242871839275222246405745257275088696311157297823662689037894645226208583"); +const __P__ = new bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"); const __MASK__ = new bigInt(2).pow(253).minus(1); function setLines(dst, first, last) {

@@ -999,7 +1005,7 @@ return pre + this.upcomingInput() + "\n" + c + "^";

}, // test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { +test_match:function(match, indexed_rule) { var token, lines, backup;

@@ -1129,7 +1135,7 @@ }

}, // return next match that has a token -lex:function lex() { +lex:function lex () { var r = this.next(); if (r) { return r;

@@ -1139,12 +1145,12 @@ }

}, // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { +begin:function begin (condition) { this.conditionStack.push(condition); }, // pop the previously active lexer condition state off the condition stack -popState:function popState() { +popState:function popState () { var n = this.conditionStack.length - 1; if (n > 0) { return this.conditionStack.pop();

@@ -1154,7 +1160,7 @@ }

}, // produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { +_currentRules:function _currentRules () { if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; } else {

@@ -1163,7 +1169,7 @@ }

}, // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { +topState:function topState (n) { n = this.conditionStack.length - 1 - Math.abs(n || 0); if (n >= 0) { return this.conditionStack[n];

@@ -1173,7 +1179,7 @@ }

}, // alias for begin(condition) -pushState:function pushState(condition) { +pushState:function pushState (condition) { this.begin(condition); },

@@ -1195,148 +1201,150 @@ case 3: return 101;

break; case 4: return 102; break; -case 5: return 103; +case 5: return 104; break; -case 6: return 104; +case 6: return 103; break; -case 7: return 'linearCombination'; +case 7: return 105; break; -case 8: return 105; +case 8: return 'linearCombination'; break; -case 9: return 22; +case 9: return 106; break; -case 10: return 17; +case 10: return 22; break; -case 11: return 24; +case 11: return 17; break; -case 12: return 26; +case 12: return 24; break; -case 13: return 27; +case 13: return 26; break; -case 14: return 29; +case 14: return 27; break; -case 15: return 30; +case 15: return 29; break; -case 16: return 31; +case 16: return 30; break; -case 17: return 32; +case 17: return 31; break; -case 18: return 97; +case 18: return 32; break; -case 19: return 96; +case 19: return 97; break; -case 20: return 18; +case 20: return 96; break; -case 21: yy_.yytext = yy_.yytext.slice(1,-1); return 33; +case 21: return 18; break; -case 22: return 50; +case 22: yy_.yytext = yy_.yytext.slice(1,-1); return 33; break; -case 23: return 49; +case 23: return 50; break; -case 24: return 52; +case 24: return 49; break; -case 25: return 51; +case 25: return 52; break; -case 26: return 54; +case 26: return 51; break; -case 27: return 45; +case 27: return 54; break; -case 28: return 44; +case 28: return 45; break; -case 29: return 61; +case 29: return 44; break; -case 30: return 59; +case 30: return 61; break; -case 31: return 69; +case 31: return 59; break; -case 32: return 72; +case 32: return 69; break; -case 33: return 74; +case 33: return 72; break; -case 34: return 71; +case 34: return 74; break; -case 35: return 79; +case 35: return 71; break; -case 36: return 77; +case 36: return 79; break; -case 37: return 87; +case 37: return 77; break; -case 38: return 89; +case 38: return 87; break; -case 39: return 90; +case 39: return 89; break; -case 40: return 39; +case 40: return 90; break; -case 41: return 40; +case 41: return 39; break; -case 42: return 41; +case 42: return 40; break; -case 43: return 42; +case 43: return 41; break; -case 44: return 43; +case 44: return 42; break; -case 45: return 47; +case 45: return 43; break; -case 46: return 46; +case 46: return 47; break; -case 47: return 48; +case 47: return 46; break; -case 48: return 38; +case 48: return 48; break; -case 49: return 80; +case 49: return 38; break; -case 50: return 82; +case 50: return 80; break; -case 51: return 83; +case 51: return 82; break; -case 52: return 85; +case 52: return 83; break; -case 53: return 86; +case 53: return 85; break; -case 54: return 65; +case 54: return 86; break; -case 55: return 67; +case 55: return 65; break; -case 56: return 63; +case 56: return 67; break; -case 57: return 91; +case 57: return 63; break; -case 58: return 75; +case 58: return 91; break; -case 59: return 76; +case 59: return 75; break; -case 60: return 91; +case 60: return 76; break; -case 61: return 55; +case 61: return 91; break; -case 62: return 56; +case 62: return 55; break; -case 63: return 19; +case 63: return 56; break; -case 64: return 21; +case 64: return 19; break; -case 65: return 108; +case 65: return 21; break; case 66: return 109; break; -case 67: return 34; +case 67: return 110; break; -case 68: return 35; +case 68: return 34; break; -case 69: return 28; +case 69: return 35; break; -case 70: return 23; +case 70: return 28; break; -case 71: return 99; +case 71: return 23; break; -case 72: return 5; +case 72: return 99; break; -case 73: console.log("INVALID: " + yy_.yytext); return 'INVALID' +case 73: return 5; +break; +case 74: console.log("INVALID: " + yy_.yytext); return 'INVALID' break; } }, -rules: [/^(?:\s+)/,/^(?:\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/,/^(?:\/\/.*)/,/^(?:var\b)/,/^(?:signal\b)/,/^(?:input\b)/,/^(?:output\b)/,/^(?:linearCombination\b)/,/^(?:component\b)/,/^(?:template\b)/,/^(?:function\b)/,/^(?:if\b)/,/^(?:else\b)/,/^(?:for\b)/,/^(?:while\b)/,/^(?:do\b)/,/^(?:return\b)/,/^(?:include\b)/,/^(?:0x[0-9A-Fa-f]*)/,/^(?:[0-9]+)/,/^(?:[a-zA-Z][a-zA-Z$_0-9]*)/,/^(?:"[^"]+")/,/^(?:==>)/,/^(?:<==)/,/^(?:-->)/,/^(?:<--)/,/^(?:===)/,/^(?:>>=)/,/^(?:<<=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:!=)/,/^(?:>>)/,/^(?:<<)/,/^(?:\*\*)/,/^(?:\+\+)/,/^(?:--)/,/^(?:\+=)/,/^(?:-=)/,/^(?:\*=)/,/^(?:\/=)/,/^(?:%=)/,/^(?:\|=)/,/^(?:&=)/,/^(?:\^=)/,/^(?:=)/,/^(?:\+)/,/^(?:-)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\^)/,/^(?:&)/,/^(?:\|)/,/^(?:!)/,/^(?:<)/,/^(?:>)/,/^(?:!)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\.)/,/^(?:$)/,/^(?:.)/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],"inclusive":true}} +rules: [/^(?:\s+)/,/^(?:\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/,/^(?:\/\/.*)/,/^(?:var\b)/,/^(?:signal\b)/,/^(?:private\b)/,/^(?:input\b)/,/^(?:output\b)/,/^(?:linearCombination\b)/,/^(?:component\b)/,/^(?:template\b)/,/^(?:function\b)/,/^(?:if\b)/,/^(?:else\b)/,/^(?:for\b)/,/^(?:while\b)/,/^(?:do\b)/,/^(?:return\b)/,/^(?:include\b)/,/^(?:0x[0-9A-Fa-f]*)/,/^(?:[0-9]+)/,/^(?:[a-zA-Z][a-zA-Z$_0-9]*)/,/^(?:"[^"]+")/,/^(?:==>)/,/^(?:<==)/,/^(?:-->)/,/^(?:<--)/,/^(?:===)/,/^(?:>>=)/,/^(?:<<=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:!=)/,/^(?:>>)/,/^(?:<<)/,/^(?:\*\*)/,/^(?:\+\+)/,/^(?:--)/,/^(?:\+=)/,/^(?:-=)/,/^(?:\*=)/,/^(?:\/=)/,/^(?:%=)/,/^(?:\|=)/,/^(?:&=)/,/^(?:\^=)/,/^(?:=)/,/^(?:\+)/,/^(?:-)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\^)/,/^(?:&)/,/^(?:\|)/,/^(?:!)/,/^(?:<)/,/^(?:>)/,/^(?:!)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\.)/,/^(?:$)/,/^(?:.)/], +conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],"inclusive":true}} }); return lexer; })();

@@ -1353,7 +1361,7 @@ if (typeof require !== 'undefined' && typeof exports !== 'undefined') {

exports.parser = jaz; exports.Parser = jaz.Parser; exports.parse = function () { return jaz.parse.apply(jaz, arguments); }; -exports.main = function commonjsMain(args) { +exports.main = function commonjsMain (args) { if (!args[1]) { console.log('Usage: '+args[0]+' FILE'); process.exit(1);
A output_barry.json

@@ -0,0 +1,1 @@

+["1","10","0","1","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]
M package-lock.json → package-lock.json

@@ -4,6 +4,18 @@ "version": "0.0.1",

"lockfileVersion": 1, "requires": true, "dependencies": { + "JSONSelect": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz", + "integrity": "sha1-oI7cxn6z/L6Z7WMIVTRKDPKCu40=", + "dev": true + }, + "JSV": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", + "integrity": "sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c=", + "dev": true + }, "acorn": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",

@@ -37,6 +49,13 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz",

"integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",

@@ -83,6 +102,12 @@ "arrify": {

"version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, "babel-code-frame": {

@@ -141,6 +166,12 @@ "balanced-match": "^1.0.0",

"concat-map": "0.0.1" } }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",

@@ -156,6 +187,20 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",

"integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "check-error": "^1.0.1", + "deep-eql": "^3.0.0", + "get-func-name": "^2.0.0", + "pathval": "^1.0.0", + "type-detect": "^4.0.0" + } + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",

@@ -193,11 +238,26 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz",

"integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", "dev": true + }, + "cjson": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.3.0.tgz", + "integrity": "sha1-5kObkHA9MS/24iJAl76pLOPQKhQ=", + "dev": true, + "requires": { + "jsonlint": "1.6.0" + } }, "cli-cursor": { "version": "2.1.0",

@@ -229,6 +289,18 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz",

"integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=", + "dev": true + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",

@@ -255,6 +327,15 @@ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",

"dev": true, "requires": { "ms": "2.0.0" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" } }, "deep-is": {

@@ -288,6 +369,12 @@ "pinkie-promise": "^2.0.0",

"rimraf": "^2.2.8" } }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",

@@ -296,6 +383,12 @@ "dev": true,

"requires": { "esutils": "^2.0.2" } + }, + "ebnf-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/ebnf-parser/-/ebnf-parser-0.1.10.tgz", + "integrity": "sha1-zR9rpHfFY4xAyX7ZtXLbW6tdgzE=", + "dev": true }, "es-abstract": { "version": "1.12.0",

@@ -326,6 +419,38 @@ "version": "1.0.5",

"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true + }, + "escodegen": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.3.3.tgz", + "integrity": "sha1-8CQBb1qI4Eb9EgBQVek5gC5sXyM=", + "dev": true, + "requires": { + "esprima": "~1.1.1", + "estraverse": "~1.5.0", + "esutils": "~1.0.0", + "source-map": "~0.1.33" + }, + "dependencies": { + "esprima": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.1.1.tgz", + "integrity": "sha1-W28VR/TRAuZw4UDFCb5ncdautUk=", + "dev": true + }, + "estraverse": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", + "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=", + "dev": true + }, + "esutils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", + "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=", + "dev": true + } + } }, "eslint": { "version": "5.0.1",

@@ -526,6 +651,12 @@ "functional-red-black-tree": {

"version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, "glob": {

@@ -568,6 +699,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",

"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",

@@ -596,6 +733,12 @@ "has-symbols": {

"version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, "iconv-lite": {

@@ -731,6 +874,40 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",

"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "jison": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/jison/-/jison-0.4.18.tgz", + "integrity": "sha512-FKkCiJvozgC7VTHhMJ00a0/IApSxhlGsFIshLW6trWJ8ONX2TQJBBz6DlcO1Gffy4w9LT+uL+PA+CVnUSJMF7w==", + "dev": true, + "requires": { + "JSONSelect": "0.4.0", + "cjson": "0.3.0", + "ebnf-parser": "0.1.10", + "escodegen": "1.3.x", + "esprima": "1.1.x", + "jison-lex": "0.3.x", + "lex-parser": "~0.1.3", + "nomnom": "1.5.2" + }, + "dependencies": { + "esprima": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.1.1.tgz", + "integrity": "sha1-W28VR/TRAuZw4UDFCb5ncdautUk=", + "dev": true + } + } + }, + "jison-lex": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/jison-lex/-/jison-lex-0.3.4.tgz", + "integrity": "sha1-gcoo2E+ESZ36jFlNzePYo/Jux6U=", + "dev": true, + "requires": { + "lex-parser": "0.1.x", + "nomnom": "1.5.2" + } + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",

@@ -759,6 +936,16 @@ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",

"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "jsonlint": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.0.tgz", + "integrity": "sha1-iKpGvCiaesk7tGyuLVihh6m7SUo=", + "dev": true, + "requires": { + "JSV": ">= 4.0.x", + "nomnom": ">= 1.5.x" + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",

@@ -768,6 +955,12 @@ "requires": {

"prelude-ls": "~1.1.2", "type-check": "~0.3.2" } + }, + "lex-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/lex-parser/-/lex-parser-0.1.4.tgz", + "integrity": "sha1-ZMTwJfF/1Tv7RXY/rrFvAVp0dVA=", + "dev": true }, "lodash": { "version": "4.17.10",

@@ -812,6 +1005,36 @@ "dev": true

} } }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",

@@ -836,6 +1059,16 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",

"integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, + "nomnom": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.5.2.tgz", + "integrity": "sha1-9DRUSKhTz71cDSYyDyR3qwUm/i8=", + "dev": true, + "requires": { + "colors": "0.5.x", + "underscore": "1.1.x" + } + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",

@@ -919,6 +1152,12 @@ "path-key": {

"version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, "pify": {

@@ -1082,6 +1321,16 @@ "requires": {

"is-fullwidth-code-point": "^2.0.0" } }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",

@@ -1189,6 +1438,18 @@ "dev": true,

"requires": { "prelude-ls": "~1.1.2" } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "underscore": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz", + "integrity": "sha1-QLq4S60Z0jAJbo1u9ii/8FXYPbA=", + "dev": true }, "uri-js": { "version": "4.2.2",
M package.json → package.json

@@ -7,7 +7,8 @@ "directories": {

"test": "test" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha", + "buildParser": "jison parser/jaz.jison" }, "keywords": [ "zkSnarks",

@@ -25,6 +26,7 @@ "big-integer": "^1.6.32",

"optimist": "^0.6.1" }, "devDependencies": { + "chai": "^4.1.2", "eslint": "^5.0.1", "eslint-plugin-mocha": "^5.0.0" }
M parser/jaz.jison → parser/jaz.jison

@@ -10,6 +10,7 @@ \/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/ { /* console.log("MULTILINE COMMENT: "+yytext); */ }

\/\/.* { /* console.log("SINGLE LINE COMMENT: "+yytext); */ } var { return 'var'; } signal { return 'signal'; } +private { return 'private'; } input { return 'input'; } output { return 'output'; } linearCombination { return 'linearCombination'; }

@@ -821,6 +822,11 @@ | 'signal' 'input' simpleLeftHandExpression %prec DECL

{ $$ = {type: "DECLARE", declareType: "SIGNALIN", name: $3}; setLines($$, @1, @3); + } + | 'signal' 'private' 'input' simpleLeftHandExpression %prec DECL + { + $$ = {type: "DECLARE", declareType: "SIGNALIN", private: true, name: $4}; + setLines($$, @1, @4); } | 'signal' 'output' simpleLeftHandExpression %prec DECL {
D src/calculateWitness.js

@@ -1,209 +0,0 @@

-const bigInt = require("big-integer"); - -module.exports = calculateWitness; - -function calculateWitness(circuit, inputSignals) { - const ctx = new RTCtx(circuit); - - function iterateSelector(values, sels, cb) { - if (!Array.isArray(values)) { - return cb(sels, values); - } - for (let i=0; i<values.length; i++) { - sels.push(i); - iterateSelector(values[i], sels, cb); - sels.pop(i); - } - } - - ctx.setSignal("one", [], bigInt(1)); - - for (let c in ctx.notInitSignals) { - if (ctx.notInitSignals[c] == 0) ctx.triggerComponent(c); - } - - for (let s in inputSignals) { - ctx.currentComponent = "main"; - iterateSelector(inputSignals[s], [], function(selector, value) { - ctx.setSignal(s, selector, bigInt(value)); - }); - } - - for (let i=0; i<ctx.witness.length; i++) { - if (typeof(ctx.witness[i]) == "undefined") { - throw("Signal not assigned: " + ctx.circuit.witnessNames[i].join(", ")); - } - console.log(ctx.circuit.witnessNames[i].join(",") + " --> " + ctx.witness[i].toString()); - } - return ctx.witness; -} - -class RTCtx { - constructor(circuit) { - this.scopes = []; - this.circuit = circuit; - this.witness = []; - this.notInitSignals = {}; - for (let c in this.circuit.components) { - this.notInitSignals[c] = this.circuit.components[c].inputSignals; - if (this.notInitSignals == 0) { - this.currentComponent = c; - this.components.calc(this); - this.currentComponent = null; - } - } - } - - _sels2str(sels) { - let res = ""; - for (let i=0; i<sels.length; i++) { - res += `[${sels[i]}]`; - } - return res; - } - - setPin(componentName, componentSels, signalName, signalSels, value) { - let fullName = componentName=="one" ? "one" : this.currentComponent + "." + componentName; - fullName += this._sels2str(componentSels) + - "."+ - signalName+ - this._sels2str(signalSels); - this.setSignalFullName(fullName, value); - } - - setSignal(name, sels, value) { - let fullName = this.currentComponent ? this.currentComponent + "." + name : name; - fullName += this._sels2str(sels); - this.setSignalFullName(fullName, value); - } - - triggerComponent(c) { - console.log("Component Treiggered: " + c); - - // Set notInitSignals to -1 to not initialize again - this.notInitSignals[c] --; - const oldComponent = this.currentComponent; - this.currentComponent = c; - const template = this.circuit.components[c].template; - - const newScope = {}; - for (let p in this.circuit.components[c].params) { - newScope[p] = this.circuit.components[c].params[p]; - } - - const oldScope = this.scopes; - this.scopes = [ this.scopes[0], newScope ]; - - // TODO set params. - - this.circuit.templates[template](this); - this.scopes = oldScope; - this.currentComponent = oldComponent; - } - - callFunction(functionName, params) { - - const newScope = {}; - for (let p=0; p<this.circuit.functionParams[functionName].length; p++) { - const paramName = this.circuit.functionParams[functionName][p]; - newScope[paramName] = params[p]; - } - - const oldScope = this.scopes; - this.scopes = [ this.scopes[0], newScope ]; - - // TODO set params. - - const res = this.circuit.functions[functionName](this); - this.scopes = oldScope; - - return res; - } - - setSignalFullName(fullName, value) { - console.log("set " + fullName + " <-- " + value.toString()); - const sId = this.circuit.signals[fullName].id; - let firstInit =false; - if (!this.witness[sId]) { - firstInit = true; - } - this.witness[sId] = value; - const callComponents = []; - for (let i=0; i<this.circuit.witnessNames[sId].length; i++) { - const ss = this.circuit.witnessNames[sId][i]; - if (this.circuit.signals[ss].direction == "IN") { - if (firstInit) this.notInitSignals[ this.circuit.signals[ss].component] --; - callComponents.push(this.circuit.signals[ss].component); - } - } - for (let i in callComponents) { - const c= callComponents[i]; - if (this.notInitSignals[c] == 0) this.triggerComponent(c); - } - return value; - } - - setVar(name, sels, value) { - function setVarArray(a, sels2, value) { - if (sels2.length == 1) { - a[sels2[0]] = value; - } else { - if (typeof(a[sels2[0]]) == "undefined") a[sels2[0]] = []; - setVarArray(a[sels2[0]], sels2.slice(1), value); - } - } - const scope = this.scopes[this.scopes.length-1]; - if (sels.length == 0) { - scope[name] = value; - } else { - if (typeof(scope[name]) == "undefined") scope[name] = []; - setVarArray(scope[name], sels, value); - } - return value; - } - - getVar(name, sels) { - function select(a, sels2) { - return (sels2.length == 0) ? a : select(a[sels2[0]], sels2.slice(1)); - } - for (let i=this.scopes.length-1; i>=0; i--) { - if (typeof(this.scopes[i][name]) != "undefined") return select(this.scopes[i][name], sels); - } - throw new Error("Variable not defined: " + name); - } - - getSignal(name, sels) { - let fullName = name=="one" ? "one" : this.currentComponent + "." + name; - fullName += this._sels2str(sels); - return this.getSignalFullName(fullName); - } - - - getPin(componentName, componentSels, signalName, signalSels) { - let fullName = componentName=="one" ? "one" : this.currentComponent + "." + componentName; - fullName += this._sels2str(componentSels) + - "."+ - signalName+ - this._sels2str(signalSels); - return this.getSignalFullName(fullName); - } - - getSignalFullName(fullName) { - const sId = this.circuit.signals[fullName].id; - if (typeof(this.witness[sId]) == "undefined") { - throw new Error("Signal not initialized: "+fullName); - } - console.log("get --->" + fullName + " = " + this.witness[sId].toString() ); - return this.witness[sId]; - } - - assert(a,b) { - const ba = bigInt(a); - const bb = bigInt(b); - if (!ba.equals(bb)) { - throw new Error("Constrain doesn't match: " + ba.toString() + " != " + bb.toString()); - } - } - - -}
D src/circuit_generator.js

@@ -1,156 +0,0 @@

- -const fs = require("fs"); -const path = require("path"); -const bigInt = require("big-integer"); -const __P__ = new bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"); -const __MASK__ = new bigInt(2).pow(253).minus(1); -const assert = require("assert"); -const gen = require("./gencode"); -const exec = require("./exec"); -const lc = require("./lcalgebra"); - - -const argv = require("optimist") - .alias("c", "circuit") - .alias("o", "output") - .alias("w", "witnes") - .argv; - -const parser = require("../jaz.js").parser; - -const fullFileName = path.resolve(process.cwd(), argv.circuit); -const fullFilePath = path.dirname(fullFileName); - -const src = fs.readFileSync(fullFileName, "utf8"); -const ast = parser.parse(src); - -assert(ast.type == "BLOCK"); - -const ctx = { - scopes: [{}], - signals: { - one: { - fullName: "one", - value: bigInt(1), - equivalence: "", - direction: "" - } - }, - currentComponent: "", - constrains: [], - components: {}, - templates: {}, - functions: {}, - functionParams: {}, - filePath: fullFilePath, - fileName: fullFileName -}; - -exec(ctx, ast); - -reduceConstrains(ctx); -generateWitnessNames(ctx); -generateWitnessConstrains(ctx); - -if (ctx.error) { - console.log(`ERROR at ${ctx.error.errFile}:${ctx.error.pos.first_line},${ctx.error.pos.first_column}-${ctx.error.pos.last_line},${ctx.error.pos.last_column} ${ctx.error.errStr}`); - console.log(JSON.stringify(ctx.error.ast, null, 1)); - process.exit(1); -} - -/* -console.log("SIGNALS"); -console.log("=========="); -for (let key in ctx.signals) { - const signal = ctx.signals[key]; - console.log(signal.fullName); -} - -console.log("CONSTRAINS"); -console.log("=========="); -for (let i=0; i<ctx.constrains.length; i++) { - console.log(lc.toString(ctx.constrains[i], ctx) + " === 0"); -} -*/ -ctx.scopes = [{}]; - -const mainCode = gen(ctx,ast); -if (ctx.error) { - console.log(`ERROR at ${ctx.error.pos.first_line},${ctx.error.pos.first_column}-${ctx.error.pos.last_line},${ctx.error.pos.last_column} ${ctx.error.errStr}`); - console.log(JSON.stringify(ctx.error.ast, null, 1)); - process.exit(1); -} - - -let outCode = ""; -outCode += "const bigInt = require(\"big-integer\");\n"; -outCode += "const __P__ = new bigInt(\"21888242871839275222246405745257275088696311157297823662689037894645226208583\");\n"; -outCode += "const __MASK__ = new bigInt(2).pow(253).minus(1);\n"; -outCode += "const circuit = {};\n"; -outCode += "module.exports = circuit;\n\n"; -outCode += `circuit.signals=${JSON.stringify(ctx.signals, null, 1)};\n\n`; -outCode += `circuit.components=${JSON.stringify(ctx.components, null, 1)};\n\n`; -outCode += `circuit.signalConstrains=${JSON.stringify(ctx.constrains, null, 1)};\n\n`; -outCode += `circuit.witnessNames=${JSON.stringify(ctx.witnessNames, null, 1)};\n\n`; -outCode += mainCode; -outCode += "\ncircuit.templates = {};\n"; -for (let t in ctx.templates) { - outCode += `\ncircuit.templates["${t}"] = ${ctx.templates[t]};\n`; -} -outCode += `circuit.functionParams=${JSON.stringify(ctx.functionParams, null, 1)};\n\n`; -outCode += "\ncircuit.functions = {};\n"; -for (let f in ctx.functions) { - outCode += `\ncircuit.functions["${f}"] = ${ctx.functions[f]};\n`; -} - -/* -console.log("CODE"); -console.log("===="); -console.log(outCode); -*/ - - -console.log("#Constrains:" +ctx.constrains.length); - -fs.writeFileSync(argv.output, outCode, "utf8"); - -function generateWitnessNames(ctx) { - ctx.witnessNames = []; - for (let c in ctx.components) { - ctx.components[c].inputSignals = 0; - } - for (let s in ctx.signals) { - const signal = ctx.signals[s]; - let lSignal = signal; - while (lSignal.equivalence) { - lSignal = ctx.signals[lSignal.equivalence]; - } - if ( typeof(lSignal.id) === "undefined" ) { - lSignal.id = ctx.witnessNames.length; - ctx.witnessNames.push([]); - } - if (signal.direction == "IN") { - ctx.components[signal.component].inputSignals++; - } - - signal.id = lSignal.id; - ctx.witnessNames[signal.id].push(signal.fullName); - } -} - -function reduceConstrains(ctx) { - const newConstrains = []; - for (let i=0; i<ctx.constrains.length; i++) { - const c = lc.canonize(ctx, ctx.constrains[i]); - if (!lc.isZero(c)) { - newConstrains.push(c); - } - } - ctx.constrains = newConstrains; -} - -function generateWitnessConstrains(ctx) { - -} - -
A src/cli.js

@@ -0,0 +1,27 @@

+/* eslint-disable no-console */ + +const fs = require("fs"); +const path = require("path"); + +const compiler = require("./compiler"); + +const argv = require("yargs") + .usage("jaz -s [input source circuit file] -o [output definition circuit file]") + .alias("s", "source") + .alias("o", "output") + .require(["s","o"]) + .argv; + +const fullFileName = path.resolve(process.cwd(), argv.source); + +compiler(fullFileName).then( (cir) => { + fs.writeFileSync(argv.output, JSON.stringify(cir, null, 1), "utf8"); +}, (err) => { + console.error(`ERROR at ${err.errFile}:${err.pos.first_line},${err.pos.first_column}-${err.pos.last_line},${err.pos.last_column} ${err.errStr}`); + console.error(JSON.stringify(err.ast, null, 1)); + process.exit(1); +}); + + + +
A src/compiler.js

@@ -0,0 +1,279 @@

+ +const fs = require("fs"); +const path = require("path"); +const bigInt = require("big-integer"); +const __P__ = new bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"); +const __MASK__ = new bigInt(2).pow(253).minus(1); +const assert = require("assert"); +const gen = require("./gencode"); +const exec = require("./exec"); +const lc = require("./lcalgebra"); + +module.exports = compile; + +const parser = require("../jaz.js").parser; + +function compile(srcFile) { + + return new Promise ((resolve, reject) => { + const fullFileName = srcFile; + const fullFilePath = path.dirname(fullFileName); + + const src = fs.readFileSync(fullFileName, "utf8"); + const ast = parser.parse(src); + + assert(ast.type == "BLOCK"); + + const ctx = { + scopes: [{}], + signals: { + one: { + fullName: "one", + value: bigInt(1), + equivalence: "", + direction: "" + } + }, + currentComponent: "", + constrains: [], + components: {}, + templates: {}, + functions: {}, + functionParams: {}, + filePath: fullFilePath, + fileName: fullFileName + }; + + exec(ctx, ast); + + reduceConstrains(ctx); + generateWitnessNames(ctx); + + if (ctx.error) { + reject(ctx.error); + } + + ctx.scopes = [{}]; + + const mainCode = gen(ctx,ast); + if (ctx.error) reject(ctx.error); + + const def = buildCircuitDef(ctx, mainCode); + + resolve(def); + }); +} + + +function generateWitnessNames(ctx) { + + const totals = { + "output": 0, + "pubInput": 0, + "one": 0, + "prvInput": 0, + "internal": 0, + "constant": 0, + }; + const ids = {}; + + function priorize(t1, t2) { + if ((t1 == "error") || (t2=="error")) return "error"; + if (t1 == "internal") { + return t2; + } else if (t2=="internal") { + return t1; + } + if ((t1 == "one") || (t2 == "one")) return "one"; + if ((t1 == "constant") || (t2 == "constant")) return "constant"; + if (t1!=t2) return "error"; + return t1; + } + + // First classify the signals + for (let s in ctx.signals) { + const signal = ctx.signals[s]; + let tAll = "internal"; + let lSignal = signal; + let end = false; + while (!end) { + let t = lSignal.category || "internal"; + if (s == "one") { + t = "one"; + } else if (lSignal.value) { + t = "constant"; + } else if (lSignal.component=="main") { + if (lSignal.direction == "IN") { + if (lSignal.private) { + t = "prvInput"; + } else { + t = "pubInput"; + } + } else if (lSignal.direction == "OUT") { + t = "output"; + } + } + tAll = priorize(t,tAll); + if (lSignal.equivalence) { + lSignal = ctx.signals[lSignal.equivalence]; + } else { + end=true; + } + } + if (tAll == "error") { + throw new Error("Incompatible types in signal: " + s); + } + if (lSignal.category) totals[lSignal.category]--; + lSignal.category = tAll; + totals[lSignal.category] ++; + } + + ids["one"] = 0; + ids["output"] = 1; + ids["pubInput"] = ids["output"] + totals["output"]; + ids["prvInput"] = ids["pubInput"] + totals["pubInput"]; + ids["internal"] = ids["prvInput"] + totals["prvInput"]; + ids["constant"] = ids["internal"] + totals["internal"]; + const nSignals = ids["constant"] + totals["constant"]; + + ctx.signalNames = new Array(nSignals); + for (let i=0; i< nSignals; i++) ctx.signalNames[i] = []; + ctx.signalName2Idx = {}; + + for (let s in ctx.signals) { + const signal = ctx.signals[s]; + let lSignal = signal; + while (lSignal.equivalence) { + lSignal = ctx.signals[lSignal.equivalence]; + } + if ( typeof(lSignal.id) === "undefined" ) { + lSignal.id = ids[lSignal.category] ++; + } + + signal.id = lSignal.id; + ctx.signalNames[signal.id].push(signal.fullName); + ctx.signalName2Idx[signal.fullName] = signal.id; + } + + ctx.totals = totals; +} + +function reduceConstrains(ctx) { + const newConstrains = []; + for (let i=0; i<ctx.constrains.length; i++) { + const c = lc.canonize(ctx, ctx.constrains[i]); + if (!lc.isZero(c)) { + newConstrains.push(c); + } + } + ctx.constrains = newConstrains; +} + + +function buildCircuitDef(ctx, mainCode) { + const res = { + mainCode: mainCode + }; + res.signalName2Idx = ctx.signalName2Idx; + + res.components = []; + res.componentName2Idx = {}; + for (let c in ctx.components) { + const idCoponent = res.components.length; + res.components.push({ + name: c, + params: ctx.components[c].params, + template: ctx.components[c].template, + inputSignals: 0 + }); + res.componentName2Idx[c] = idCoponent; + } + + res.signals = new Array(ctx.signalNames.length); + for (let i=0; i<ctx.signalNames.length; i++) { + res.signals[i] = { + names: ctx.signalNames[i], + triggerComponents: [] + }; + ctx.signalNames[i].map( (fullName) => { + const idComponet = res.componentName2Idx[ctx.signals[fullName].component]; + if (ctx.signals[fullName].direction == "IN") { + res.signals[i].triggerComponents.push(idComponet); + res.components[idComponet].inputSignals++; + } + }); + } + + res.constrains = buildConstrains(ctx); + + res.templates = ctx.templates; + + res.functions = {}; + for (let f in ctx.functions) { + res.functions[f] = { + params: ctx.functionParams[f], + func: ctx.functions[f] + }; + } + + res.nPrvInputs = ctx.totals.prvInput; + res.nPubInputs = ctx.totals.pubInput; + res.nInputs = res.nPrvInputs + res.nPubInputs; + res.nOutputs = ctx.totals.output; + res.nVars = res.nInputs + res.nOutputs + ctx.totals.one + ctx.totals.internal; + res.nConstants = ctx.totals.constant; + res.nSignals = res.nVars + res.nConstants; + + return res; +} + +/* + Build constrains + +A constrain like this + + [s1 + 2*s2 + 3*s3] * [ s2 + 5*s4] - [s0 ] = 0 + [ 5*s2 + 6*s3] * [ s2 + ] - [s0 + 2* s2] = 0 + [s1 + s3] * [ s2 + 5*s3] - [s4 ] = 0 + +is converted to + +[ + [{"1":"1","2":"2","3":"3"} , {"2":"1","4":"5"} , {"0":"1" }], + [{ "2":"5","3":"6"} , {"2":"1" } , {"0":"1", "2":"2"}], + [{"1":"1", "3":"1"} , {"2":"1","3":"5"} , {"4":"1" }] +] + ^ ^ ^ + | | | + A B C + +*/ + +function buildConstrains(ctx) { + const res = []; + + function fillLC(dst, src) { + for (let s in src.values) { + const v = src.values[s].toString(); + const id = ctx.signalName2Idx[s]; + dst[id] = v; + } + } + + for (let i=0; i<ctx.constrains.length; i++) { + const A = {}; + const B = {}; + const C = {}; + + fillLC(A, ctx.constrains[i].a); + fillLC(B, ctx.constrains[i].b); + fillLC(C, lc.negate(ctx.constrains[i].c)); + + res.push([A,B,C]); + } + + return res; +} + + +
M src/exec.js → src/exec.js

@@ -419,6 +419,7 @@ scope[ast.name.name] = iterateSelectors(ctx, sizes, baseName, function(fullName) {

ctx.signals[fullName] = { fullName: fullName, direction: ast.declareType == "SIGNALIN" ? "IN" : (ast.declareType == "SIGNALOUT" ? "OUT" : ""), + private: ast.private, component: ctx.currentComponent, equivalence: "", alias: [fullName]

@@ -827,8 +828,6 @@

function execInclude(ctx, ast) { const incFileName = path.resolve(ctx.filePath, ast.file); const incFilePath = path.dirname(incFileName); - - console.log("Include: "+incFileName); ctx.includedFiles = ctx.includedFiles || []; if (ctx.includedFiles[incFileName]) return;
M src/gencode.js → src/gencode.js

@@ -368,7 +368,7 @@ return genVarAssignement(ctx, {values: [ast.values[0], {type: "OP", op: "*", values: ast.values}]});

} function genPlusPlusRight(ctx, ast) { - return `(${genVarAssignement(ctx, {values: [ast.values[0], {type: "OP", op: "+", values: [ast.values[0], {type: "NUMBER", value: bigInt(1)}]}]})}).add(__P__).minus(1).mod(__P__)`; + return `(${genVarAssignement(ctx, {values: [ast.values[0], {type: "OP", op: "+", values: [ast.values[0], {type: "NUMBER", value: bigInt(1)}]}]})}).add(__P__).sub(bigInt(1)).mod(__P__)`; } function genPlusPlusLeft(ctx, ast) {

@@ -380,7 +380,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).add(${b}).mod(__P__)`; + return `bigInt(${a}).add(bigInt(${b})).mod(__P__)`; } function genMul(ctx, ast) {

@@ -388,7 +388,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).times(${b}).mod(__P__)`; + return `bigInt(${a}).mul(bigInt(${b})).mod(__P__)`; } function genSub(ctx, ast) {

@@ -396,7 +396,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).add(__P__).minus(${b}).mod(__P__)`; + return `bigInt(${a}).add(__P__).sub(bigInt(${b})).mod(__P__)`; } function genExp(ctx, ast) {

@@ -404,7 +404,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).modPow(${b}, __P__)`; + return `bigInt(${a}).modPow(bigInt(${b}), __P__)`; } function genBAnd(ctx, ast) {

@@ -412,7 +412,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).and(${b}).and(__MASK__)`; + return `bigInt(${a}).and(bigInt(${b})).and(__MASK__)`; } function genShl(ctx, ast) {

@@ -420,7 +420,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${b}).greater(256) ? 0 : bigInt(${a}).shiftLeft(bigInt(${b}).value).and(__MASK__)`; + return `bigInt(${b}).greater(bigInt(256)) ? 0 : bigInt(${a}).shl(bigInt(${b})).and(__MASK__)`; } function genShr(ctx, ast) {

@@ -428,7 +428,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${b}).greater(256) ? 0 : bigInt(${a}).shiftRight(bigInt(${b}).value).and(__MASK__)`; + return `bigInt(${b}).greater(bigInt(256)) ? 0 : bigInt(${a}).shr(bigInt(${b})).and(__MASK__)`; } function genLt(ctx, ast) {

@@ -436,7 +436,7 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).lt(${b}) ? 1 : 0`; + return `bigInt(${a}).lt(bigInt(${b})) ? 1 : 0`; } function genEq(ctx, ast) {

@@ -444,13 +444,13 @@ const a = gen(ctx, ast.values[0]);

if (ctx.error) return; const b = gen(ctx, ast.values[1]); if (ctx.error) return; - return `bigInt(${a}).eq(${b}) ? 1 : 0`; + return `bigInt(${a}).eq(bigInt(${b})) ? 1 : 0`; } function genUMinus(ctx, ast) { const a = gen(ctx, ast.values[0]); if (ctx.error) return; - return `__P__.minus(bigInt(${a})).mod(__P__)`; + return `__P__.sub(bigInt(${a})).mod(__P__)`; } function genTerCon(ctx, ast) {

@@ -460,7 +460,7 @@ const b = gen(ctx, ast.values[1]);

if (ctx.error) return; const c = gen(ctx, ast.values[2]); if (ctx.error) return; - return `bigInt(${a}).neq(0) ? (${b}) : (${c})`; + return `bigInt(${a}).neq(bigInt(0)) ? (${b}) : (${c})`; } function genInclude(ctx, ast) {
M src/lcalgebra.js → src/lcalgebra.js

@@ -418,7 +418,15 @@ if (a.type == "LINEARCOMBINATION") {

for (let k in a.values) { let s = k; while (ctx.signals[s].equivalence) s= ctx.signals[s].equivalence; - if (s != k) { + if (typeof(ctx.signals[s].value) != "undefined") { + const v = a.values[k].times(ctx.signals[s].value).mod(__P__); + if (!a.values["one"]) { + a.values["one"]=v; + } else { + a.values["one"]= a.values["one"].add(v).mod(__P__); + } + delete a.values[k]; + } else if (s != k) { if (!a.values[s]) { a.values[s]=bigInt(a.values[k]); } else {
A sum.json

@@ -0,0 +1,2371 @@

+{ + "mainCode": "{\n {\n }\n {\n }\n}\n", + "signalName2Idx": { + "one": 0, + "main.a": 3, + "main.b": 2, + "main.out": 1, + "main.n2ba.in": 3, + "main.n2ba.out[0]": 4, + "main.n2ba.out[1]": 5, + "main.n2ba.out[2]": 6, + "main.n2ba.out[3]": 7, + "main.n2ba.out[4]": 8, + "main.n2ba.out[5]": 9, + "main.n2ba.out[6]": 10, + "main.n2ba.out[7]": 11, + "main.n2ba.out[8]": 12, + "main.n2ba.out[9]": 13, + "main.n2ba.out[10]": 14, + "main.n2ba.out[11]": 15, + "main.n2ba.out[12]": 16, + "main.n2ba.out[13]": 17, + "main.n2ba.out[14]": 18, + "main.n2ba.out[15]": 19, + "main.n2ba.out[16]": 20, + "main.n2ba.out[17]": 21, + "main.n2ba.out[18]": 22, + "main.n2ba.out[19]": 23, + "main.n2ba.out[20]": 24, + "main.n2ba.out[21]": 25, + "main.n2ba.out[22]": 26, + "main.n2ba.out[23]": 27, + "main.n2ba.out[24]": 28, + "main.n2ba.out[25]": 29, + "main.n2ba.out[26]": 30, + "main.n2ba.out[27]": 31, + "main.n2ba.out[28]": 32, + "main.n2ba.out[29]": 33, + "main.n2ba.out[30]": 34, + "main.n2ba.out[31]": 35, + "main.n2bb.in": 2, + "main.n2bb.out[0]": 36, + "main.n2bb.out[1]": 37, + "main.n2bb.out[2]": 38, + "main.n2bb.out[3]": 39, + "main.n2bb.out[4]": 40, + "main.n2bb.out[5]": 41, + "main.n2bb.out[6]": 42, + "main.n2bb.out[7]": 43, + "main.n2bb.out[8]": 44, + "main.n2bb.out[9]": 45, + "main.n2bb.out[10]": 46, + "main.n2bb.out[11]": 47, + "main.n2bb.out[12]": 48, + "main.n2bb.out[13]": 49, + "main.n2bb.out[14]": 50, + "main.n2bb.out[15]": 51, + "main.n2bb.out[16]": 52, + "main.n2bb.out[17]": 53, + "main.n2bb.out[18]": 54, + "main.n2bb.out[19]": 55, + "main.n2bb.out[20]": 56, + "main.n2bb.out[21]": 57, + "main.n2bb.out[22]": 58, + "main.n2bb.out[23]": 59, + "main.n2bb.out[24]": 60, + "main.n2bb.out[25]": 61, + "main.n2bb.out[26]": 62, + "main.n2bb.out[27]": 63, + "main.n2bb.out[28]": 64, + "main.n2bb.out[29]": 65, + "main.n2bb.out[30]": 66, + "main.n2bb.out[31]": 67, + "main.sum.in[0][0]": 4, + "main.sum.in[0][1]": 5, + "main.sum.in[0][2]": 6, + "main.sum.in[0][3]": 7, + "main.sum.in[0][4]": 8, + "main.sum.in[0][5]": 9, + "main.sum.in[0][6]": 10, + "main.sum.in[0][7]": 11, + "main.sum.in[0][8]": 12, + "main.sum.in[0][9]": 13, + "main.sum.in[0][10]": 14, + "main.sum.in[0][11]": 15, + "main.sum.in[0][12]": 16, + "main.sum.in[0][13]": 17, + "main.sum.in[0][14]": 18, + "main.sum.in[0][15]": 19, + "main.sum.in[0][16]": 20, + "main.sum.in[0][17]": 21, + "main.sum.in[0][18]": 22, + "main.sum.in[0][19]": 23, + "main.sum.in[0][20]": 24, + "main.sum.in[0][21]": 25, + "main.sum.in[0][22]": 26, + "main.sum.in[0][23]": 27, + "main.sum.in[0][24]": 28, + "main.sum.in[0][25]": 29, + "main.sum.in[0][26]": 30, + "main.sum.in[0][27]": 31, + "main.sum.in[0][28]": 32, + "main.sum.in[0][29]": 33, + "main.sum.in[0][30]": 34, + "main.sum.in[0][31]": 35, + "main.sum.in[1][0]": 36, + "main.sum.in[1][1]": 37, + "main.sum.in[1][2]": 38, + "main.sum.in[1][3]": 39, + "main.sum.in[1][4]": 40, + "main.sum.in[1][5]": 41, + "main.sum.in[1][6]": 42, + "main.sum.in[1][7]": 43, + "main.sum.in[1][8]": 44, + "main.sum.in[1][9]": 45, + "main.sum.in[1][10]": 46, + "main.sum.in[1][11]": 47, + "main.sum.in[1][12]": 48, + "main.sum.in[1][13]": 49, + "main.sum.in[1][14]": 50, + "main.sum.in[1][15]": 51, + "main.sum.in[1][16]": 52, + "main.sum.in[1][17]": 53, + "main.sum.in[1][18]": 54, + "main.sum.in[1][19]": 55, + "main.sum.in[1][20]": 56, + "main.sum.in[1][21]": 57, + "main.sum.in[1][22]": 58, + "main.sum.in[1][23]": 59, + "main.sum.in[1][24]": 60, + "main.sum.in[1][25]": 61, + "main.sum.in[1][26]": 62, + "main.sum.in[1][27]": 63, + "main.sum.in[1][28]": 64, + "main.sum.in[1][29]": 65, + "main.sum.in[1][30]": 66, + "main.sum.in[1][31]": 67, + "main.sum.out[0]": 68, + "main.sum.out[1]": 69, + "main.sum.out[2]": 70, + "main.sum.out[3]": 71, + "main.sum.out[4]": 72, + "main.sum.out[5]": 73, + "main.sum.out[6]": 74, + "main.sum.out[7]": 75, + "main.sum.out[8]": 76, + "main.sum.out[9]": 77, + "main.sum.out[10]": 78, + "main.sum.out[11]": 79, + "main.sum.out[12]": 80, + "main.sum.out[13]": 81, + "main.sum.out[14]": 82, + "main.sum.out[15]": 83, + "main.sum.out[16]": 84, + "main.sum.out[17]": 85, + "main.sum.out[18]": 86, + "main.sum.out[19]": 87, + "main.sum.out[20]": 88, + "main.sum.out[21]": 89, + "main.sum.out[22]": 90, + "main.sum.out[23]": 91, + "main.sum.out[24]": 92, + "main.sum.out[25]": 93, + "main.sum.out[26]": 94, + "main.sum.out[27]": 95, + "main.sum.out[28]": 96, + "main.sum.out[29]": 97, + "main.sum.out[30]": 98, + "main.sum.out[31]": 99, + "main.sum.out[32]": 100, + "main.b2n.in[0]": 68, + "main.b2n.in[1]": 69, + "main.b2n.in[2]": 70, + "main.b2n.in[3]": 71, + "main.b2n.in[4]": 72, + "main.b2n.in[5]": 73, + "main.b2n.in[6]": 74, + "main.b2n.in[7]": 75, + "main.b2n.in[8]": 76, + "main.b2n.in[9]": 77, + "main.b2n.in[10]": 78, + "main.b2n.in[11]": 79, + "main.b2n.in[12]": 80, + "main.b2n.in[13]": 81, + "main.b2n.in[14]": 82, + "main.b2n.in[15]": 83, + "main.b2n.in[16]": 84, + "main.b2n.in[17]": 85, + "main.b2n.in[18]": 86, + "main.b2n.in[19]": 87, + "main.b2n.in[20]": 88, + "main.b2n.in[21]": 89, + "main.b2n.in[22]": 90, + "main.b2n.in[23]": 91, + "main.b2n.in[24]": 92, + "main.b2n.in[25]": 93, + "main.b2n.in[26]": 94, + "main.b2n.in[27]": 95, + "main.b2n.in[28]": 96, + "main.b2n.in[29]": 97, + "main.b2n.in[30]": 98, + "main.b2n.in[31]": 99, + "main.b2n.out": 1 + }, + "components": [ + { + "name": "main", + "params": {}, + "template": "A", + "inputSignals": 2 + }, + { + "name": "main.n2ba", + "params": { + "n": "32" + }, + "template": "Num2Bits", + "inputSignals": 1 + }, + { + "name": "main.n2bb", + "params": { + "n": "32" + }, + "template": "Num2Bits", + "inputSignals": 1 + }, + { + "name": "main.sum", + "params": { + "n": "32", + "ops": "2" + }, + "template": "BinSum", + "inputSignals": 64 + }, + { + "name": "main.b2n", + "params": { + "n": "32" + }, + "template": "Bits2Num", + "inputSignals": 32 + } + ], + "componentName2Idx": { + "main": 0, + "main.n2ba": 1, + "main.n2bb": 2, + "main.sum": 3, + "main.b2n": 4 + }, + "signals": [ + { + "names": [ + "one" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.out", + "main.b2n.out" + ], + "triggerComponents": [] + }, + { + "names": [ + "main.b", + "main.n2bb.in" + ], + "triggerComponents": [ + 0, + 2 + ] + }, + { + "names": [ + "main.a", + "main.n2ba.in" + ], + "triggerComponents": [ + 0, + 1 + ] + }, + { + "names": [ + "main.n2ba.out[0]", + "main.sum.in[0][0]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[1]", + "main.sum.in[0][1]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[2]", + "main.sum.in[0][2]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[3]", + "main.sum.in[0][3]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[4]", + "main.sum.in[0][4]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[5]", + "main.sum.in[0][5]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[6]", + "main.sum.in[0][6]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[7]", + "main.sum.in[0][7]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[8]", + "main.sum.in[0][8]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[9]", + "main.sum.in[0][9]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[10]", + "main.sum.in[0][10]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[11]", + "main.sum.in[0][11]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[12]", + "main.sum.in[0][12]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[13]", + "main.sum.in[0][13]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[14]", + "main.sum.in[0][14]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[15]", + "main.sum.in[0][15]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[16]", + "main.sum.in[0][16]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[17]", + "main.sum.in[0][17]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[18]", + "main.sum.in[0][18]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[19]", + "main.sum.in[0][19]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[20]", + "main.sum.in[0][20]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[21]", + "main.sum.in[0][21]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[22]", + "main.sum.in[0][22]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[23]", + "main.sum.in[0][23]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[24]", + "main.sum.in[0][24]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[25]", + "main.sum.in[0][25]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[26]", + "main.sum.in[0][26]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[27]", + "main.sum.in[0][27]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[28]", + "main.sum.in[0][28]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[29]", + "main.sum.in[0][29]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[30]", + "main.sum.in[0][30]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2ba.out[31]", + "main.sum.in[0][31]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[0]", + "main.sum.in[1][0]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[1]", + "main.sum.in[1][1]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[2]", + "main.sum.in[1][2]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[3]", + "main.sum.in[1][3]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[4]", + "main.sum.in[1][4]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[5]", + "main.sum.in[1][5]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[6]", + "main.sum.in[1][6]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[7]", + "main.sum.in[1][7]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[8]", + "main.sum.in[1][8]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[9]", + "main.sum.in[1][9]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[10]", + "main.sum.in[1][10]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[11]", + "main.sum.in[1][11]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[12]", + "main.sum.in[1][12]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[13]", + "main.sum.in[1][13]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[14]", + "main.sum.in[1][14]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[15]", + "main.sum.in[1][15]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[16]", + "main.sum.in[1][16]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[17]", + "main.sum.in[1][17]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[18]", + "main.sum.in[1][18]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[19]", + "main.sum.in[1][19]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[20]", + "main.sum.in[1][20]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[21]", + "main.sum.in[1][21]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[22]", + "main.sum.in[1][22]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[23]", + "main.sum.in[1][23]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[24]", + "main.sum.in[1][24]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[25]", + "main.sum.in[1][25]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[26]", + "main.sum.in[1][26]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[27]", + "main.sum.in[1][27]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[28]", + "main.sum.in[1][28]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[29]", + "main.sum.in[1][29]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[30]", + "main.sum.in[1][30]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.n2bb.out[31]", + "main.sum.in[1][31]" + ], + "triggerComponents": [ + 3 + ] + }, + { + "names": [ + "main.sum.out[0]", + "main.b2n.in[0]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[1]", + "main.b2n.in[1]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[2]", + "main.b2n.in[2]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[3]", + "main.b2n.in[3]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[4]", + "main.b2n.in[4]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[5]", + "main.b2n.in[5]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[6]", + "main.b2n.in[6]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[7]", + "main.b2n.in[7]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[8]", + "main.b2n.in[8]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[9]", + "main.b2n.in[9]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[10]", + "main.b2n.in[10]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[11]", + "main.b2n.in[11]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[12]", + "main.b2n.in[12]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[13]", + "main.b2n.in[13]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[14]", + "main.b2n.in[14]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[15]", + "main.b2n.in[15]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[16]", + "main.b2n.in[16]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[17]", + "main.b2n.in[17]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[18]", + "main.b2n.in[18]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[19]", + "main.b2n.in[19]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[20]", + "main.b2n.in[20]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[21]", + "main.b2n.in[21]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[22]", + "main.b2n.in[22]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[23]", + "main.b2n.in[23]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[24]", + "main.b2n.in[24]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[25]", + "main.b2n.in[25]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[26]", + "main.b2n.in[26]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[27]", + "main.b2n.in[27]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[28]", + "main.b2n.in[28]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[29]", + "main.b2n.in[29]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[30]", + "main.b2n.in[30]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[31]", + "main.b2n.in[31]" + ], + "triggerComponents": [ + 4 + ] + }, + { + "names": [ + "main.sum.out[32]" + ], + "triggerComponents": [] + } + ], + "constrains": [ + [ + { + "4": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "4": "1" + }, + {} + ], + [ + { + "5": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "5": "1" + }, + {} + ], + [ + { + "6": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "6": "1" + }, + {} + ], + [ + { + "7": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "7": "1" + }, + {} + ], + [ + { + "8": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "8": "1" + }, + {} + ], + [ + { + "9": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "9": "1" + }, + {} + ], + [ + { + "10": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "10": "1" + }, + {} + ], + [ + { + "11": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "11": "1" + }, + {} + ], + [ + { + "12": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "12": "1" + }, + {} + ], + [ + { + "13": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "13": "1" + }, + {} + ], + [ + { + "14": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "14": "1" + }, + {} + ], + [ + { + "15": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "15": "1" + }, + {} + ], + [ + { + "16": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "16": "1" + }, + {} + ], + [ + { + "17": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "17": "1" + }, + {} + ], + [ + { + "18": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "18": "1" + }, + {} + ], + [ + { + "19": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "19": "1" + }, + {} + ], + [ + { + "20": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "20": "1" + }, + {} + ], + [ + { + "21": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "21": "1" + }, + {} + ], + [ + { + "22": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "22": "1" + }, + {} + ], + [ + { + "23": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "23": "1" + }, + {} + ], + [ + { + "24": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "24": "1" + }, + {} + ], + [ + { + "25": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "25": "1" + }, + {} + ], + [ + { + "26": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "26": "1" + }, + {} + ], + [ + { + "27": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "27": "1" + }, + {} + ], + [ + { + "28": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "28": "1" + }, + {} + ], + [ + { + "29": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "29": "1" + }, + {} + ], + [ + { + "30": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "30": "1" + }, + {} + ], + [ + { + "31": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "31": "1" + }, + {} + ], + [ + { + "32": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "32": "1" + }, + {} + ], + [ + { + "33": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "33": "1" + }, + {} + ], + [ + { + "34": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "34": "1" + }, + {} + ], + [ + { + "35": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "35": "1" + }, + {} + ], + [ + {}, + {}, + { + "3": "1", + "4": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "5": "21888242871839275222246405745257275088548364400416034343698204186575808495615", + "6": "21888242871839275222246405745257275088548364400416034343698204186575808495613", + "7": "21888242871839275222246405745257275088548364400416034343698204186575808495609", + "8": "21888242871839275222246405745257275088548364400416034343698204186575808495601", + "9": "21888242871839275222246405745257275088548364400416034343698204186575808495585", + "10": "21888242871839275222246405745257275088548364400416034343698204186575808495553", + "11": "21888242871839275222246405745257275088548364400416034343698204186575808495489", + "12": "21888242871839275222246405745257275088548364400416034343698204186575808495361", + "13": "21888242871839275222246405745257275088548364400416034343698204186575808495105", + "14": "21888242871839275222246405745257275088548364400416034343698204186575808494593", + "15": "21888242871839275222246405745257275088548364400416034343698204186575808493569", + "16": "21888242871839275222246405745257275088548364400416034343698204186575808491521", + "17": "21888242871839275222246405745257275088548364400416034343698204186575808487425", + "18": "21888242871839275222246405745257275088548364400416034343698204186575808479233", + "19": "21888242871839275222246405745257275088548364400416034343698204186575808462849", + "20": "21888242871839275222246405745257275088548364400416034343698204186575808430081", + "21": "21888242871839275222246405745257275088548364400416034343698204186575808364545", + "22": "21888242871839275222246405745257275088548364400416034343698204186575808233473", + "23": "21888242871839275222246405745257275088548364400416034343698204186575807971329", + "24": "21888242871839275222246405745257275088548364400416034343698204186575807447041", + "25": "21888242871839275222246405745257275088548364400416034343698204186575806398465", + "26": "21888242871839275222246405745257275088548364400416034343698204186575804301313", + "27": "21888242871839275222246405745257275088548364400416034343698204186575800107009", + "28": "21888242871839275222246405745257275088548364400416034343698204186575791718401", + "29": "21888242871839275222246405745257275088548364400416034343698204186575774941185", + "30": "21888242871839275222246405745257275088548364400416034343698204186575741386753", + "31": "21888242871839275222246405745257275088548364400416034343698204186575674277889", + "32": "21888242871839275222246405745257275088548364400416034343698204186575540060161", + "33": "21888242871839275222246405745257275088548364400416034343698204186575271624705", + "34": "21888242871839275222246405745257275088548364400416034343698204186574734753793", + "35": "21888242871839275222246405745257275088548364400416034343698204186573661011969" + } + ], + [ + { + "36": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "36": "1" + }, + {} + ], + [ + { + "37": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "37": "1" + }, + {} + ], + [ + { + "38": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "38": "1" + }, + {} + ], + [ + { + "39": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "39": "1" + }, + {} + ], + [ + { + "40": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "40": "1" + }, + {} + ], + [ + { + "41": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "41": "1" + }, + {} + ], + [ + { + "42": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "42": "1" + }, + {} + ], + [ + { + "43": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "43": "1" + }, + {} + ], + [ + { + "44": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "44": "1" + }, + {} + ], + [ + { + "45": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "45": "1" + }, + {} + ], + [ + { + "46": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "46": "1" + }, + {} + ], + [ + { + "47": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "47": "1" + }, + {} + ], + [ + { + "48": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "48": "1" + }, + {} + ], + [ + { + "49": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "49": "1" + }, + {} + ], + [ + { + "50": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "50": "1" + }, + {} + ], + [ + { + "51": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "51": "1" + }, + {} + ], + [ + { + "52": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "52": "1" + }, + {} + ], + [ + { + "53": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "53": "1" + }, + {} + ], + [ + { + "54": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "54": "1" + }, + {} + ], + [ + { + "55": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "55": "1" + }, + {} + ], + [ + { + "56": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "56": "1" + }, + {} + ], + [ + { + "57": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "57": "1" + }, + {} + ], + [ + { + "58": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "58": "1" + }, + {} + ], + [ + { + "59": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "59": "1" + }, + {} + ], + [ + { + "60": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "60": "1" + }, + {} + ], + [ + { + "61": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "61": "1" + }, + {} + ], + [ + { + "62": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "62": "1" + }, + {} + ], + [ + { + "63": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "63": "1" + }, + {} + ], + [ + { + "64": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "64": "1" + }, + {} + ], + [ + { + "65": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "65": "1" + }, + {} + ], + [ + { + "66": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "66": "1" + }, + {} + ], + [ + { + "67": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "67": "1" + }, + {} + ], + [ + {}, + {}, + { + "2": "1", + "36": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "37": "21888242871839275222246405745257275088548364400416034343698204186575808495615", + "38": "21888242871839275222246405745257275088548364400416034343698204186575808495613", + "39": "21888242871839275222246405745257275088548364400416034343698204186575808495609", + "40": "21888242871839275222246405745257275088548364400416034343698204186575808495601", + "41": "21888242871839275222246405745257275088548364400416034343698204186575808495585", + "42": "21888242871839275222246405745257275088548364400416034343698204186575808495553", + "43": "21888242871839275222246405745257275088548364400416034343698204186575808495489", + "44": "21888242871839275222246405745257275088548364400416034343698204186575808495361", + "45": "21888242871839275222246405745257275088548364400416034343698204186575808495105", + "46": "21888242871839275222246405745257275088548364400416034343698204186575808494593", + "47": "21888242871839275222246405745257275088548364400416034343698204186575808493569", + "48": "21888242871839275222246405745257275088548364400416034343698204186575808491521", + "49": "21888242871839275222246405745257275088548364400416034343698204186575808487425", + "50": "21888242871839275222246405745257275088548364400416034343698204186575808479233", + "51": "21888242871839275222246405745257275088548364400416034343698204186575808462849", + "52": "21888242871839275222246405745257275088548364400416034343698204186575808430081", + "53": "21888242871839275222246405745257275088548364400416034343698204186575808364545", + "54": "21888242871839275222246405745257275088548364400416034343698204186575808233473", + "55": "21888242871839275222246405745257275088548364400416034343698204186575807971329", + "56": "21888242871839275222246405745257275088548364400416034343698204186575807447041", + "57": "21888242871839275222246405745257275088548364400416034343698204186575806398465", + "58": "21888242871839275222246405745257275088548364400416034343698204186575804301313", + "59": "21888242871839275222246405745257275088548364400416034343698204186575800107009", + "60": "21888242871839275222246405745257275088548364400416034343698204186575791718401", + "61": "21888242871839275222246405745257275088548364400416034343698204186575774941185", + "62": "21888242871839275222246405745257275088548364400416034343698204186575741386753", + "63": "21888242871839275222246405745257275088548364400416034343698204186575674277889", + "64": "21888242871839275222246405745257275088548364400416034343698204186575540060161", + "65": "21888242871839275222246405745257275088548364400416034343698204186575271624705", + "66": "21888242871839275222246405745257275088548364400416034343698204186574734753793", + "67": "21888242871839275222246405745257275088548364400416034343698204186573661011969" + } + ], + [ + { + "68": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "68": "1" + }, + {} + ], + [ + { + "69": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "69": "1" + }, + {} + ], + [ + { + "70": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "70": "1" + }, + {} + ], + [ + { + "71": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "71": "1" + }, + {} + ], + [ + { + "72": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "72": "1" + }, + {} + ], + [ + { + "73": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "73": "1" + }, + {} + ], + [ + { + "74": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "74": "1" + }, + {} + ], + [ + { + "75": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "75": "1" + }, + {} + ], + [ + { + "76": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "76": "1" + }, + {} + ], + [ + { + "77": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "77": "1" + }, + {} + ], + [ + { + "78": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "78": "1" + }, + {} + ], + [ + { + "79": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "79": "1" + }, + {} + ], + [ + { + "80": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "80": "1" + }, + {} + ], + [ + { + "81": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "81": "1" + }, + {} + ], + [ + { + "82": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "82": "1" + }, + {} + ], + [ + { + "83": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "83": "1" + }, + {} + ], + [ + { + "84": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "84": "1" + }, + {} + ], + [ + { + "85": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "85": "1" + }, + {} + ], + [ + { + "86": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "86": "1" + }, + {} + ], + [ + { + "87": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "87": "1" + }, + {} + ], + [ + { + "88": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "88": "1" + }, + {} + ], + [ + { + "89": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "89": "1" + }, + {} + ], + [ + { + "90": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "90": "1" + }, + {} + ], + [ + { + "91": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "91": "1" + }, + {} + ], + [ + { + "92": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "92": "1" + }, + {} + ], + [ + { + "93": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "93": "1" + }, + {} + ], + [ + { + "94": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "94": "1" + }, + {} + ], + [ + { + "95": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "95": "1" + }, + {} + ], + [ + { + "96": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "96": "1" + }, + {} + ], + [ + { + "97": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "97": "1" + }, + {} + ], + [ + { + "98": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "98": "1" + }, + {} + ], + [ + { + "99": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "99": "1" + }, + {} + ], + [ + { + "100": "1" + }, + { + "0": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "100": "1" + }, + {} + ], + [ + {}, + {}, + { + "4": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "5": "21888242871839275222246405745257275088548364400416034343698204186575808495615", + "6": "21888242871839275222246405745257275088548364400416034343698204186575808495613", + "7": "21888242871839275222246405745257275088548364400416034343698204186575808495609", + "8": "21888242871839275222246405745257275088548364400416034343698204186575808495601", + "9": "21888242871839275222246405745257275088548364400416034343698204186575808495585", + "10": "21888242871839275222246405745257275088548364400416034343698204186575808495553", + "11": "21888242871839275222246405745257275088548364400416034343698204186575808495489", + "12": "21888242871839275222246405745257275088548364400416034343698204186575808495361", + "13": "21888242871839275222246405745257275088548364400416034343698204186575808495105", + "14": "21888242871839275222246405745257275088548364400416034343698204186575808494593", + "15": "21888242871839275222246405745257275088548364400416034343698204186575808493569", + "16": "21888242871839275222246405745257275088548364400416034343698204186575808491521", + "17": "21888242871839275222246405745257275088548364400416034343698204186575808487425", + "18": "21888242871839275222246405745257275088548364400416034343698204186575808479233", + "19": "21888242871839275222246405745257275088548364400416034343698204186575808462849", + "20": "21888242871839275222246405745257275088548364400416034343698204186575808430081", + "21": "21888242871839275222246405745257275088548364400416034343698204186575808364545", + "22": "21888242871839275222246405745257275088548364400416034343698204186575808233473", + "23": "21888242871839275222246405745257275088548364400416034343698204186575807971329", + "24": "21888242871839275222246405745257275088548364400416034343698204186575807447041", + "25": "21888242871839275222246405745257275088548364400416034343698204186575806398465", + "26": "21888242871839275222246405745257275088548364400416034343698204186575804301313", + "27": "21888242871839275222246405745257275088548364400416034343698204186575800107009", + "28": "21888242871839275222246405745257275088548364400416034343698204186575791718401", + "29": "21888242871839275222246405745257275088548364400416034343698204186575774941185", + "30": "21888242871839275222246405745257275088548364400416034343698204186575741386753", + "31": "21888242871839275222246405745257275088548364400416034343698204186575674277889", + "32": "21888242871839275222246405745257275088548364400416034343698204186575540060161", + "33": "21888242871839275222246405745257275088548364400416034343698204186575271624705", + "34": "21888242871839275222246405745257275088548364400416034343698204186574734753793", + "35": "21888242871839275222246405745257275088548364400416034343698204186573661011969", + "36": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "37": "21888242871839275222246405745257275088548364400416034343698204186575808495615", + "38": "21888242871839275222246405745257275088548364400416034343698204186575808495613", + "39": "21888242871839275222246405745257275088548364400416034343698204186575808495609", + "40": "21888242871839275222246405745257275088548364400416034343698204186575808495601", + "41": "21888242871839275222246405745257275088548364400416034343698204186575808495585", + "42": "21888242871839275222246405745257275088548364400416034343698204186575808495553", + "43": "21888242871839275222246405745257275088548364400416034343698204186575808495489", + "44": "21888242871839275222246405745257275088548364400416034343698204186575808495361", + "45": "21888242871839275222246405745257275088548364400416034343698204186575808495105", + "46": "21888242871839275222246405745257275088548364400416034343698204186575808494593", + "47": "21888242871839275222246405745257275088548364400416034343698204186575808493569", + "48": "21888242871839275222246405745257275088548364400416034343698204186575808491521", + "49": "21888242871839275222246405745257275088548364400416034343698204186575808487425", + "50": "21888242871839275222246405745257275088548364400416034343698204186575808479233", + "51": "21888242871839275222246405745257275088548364400416034343698204186575808462849", + "52": "21888242871839275222246405745257275088548364400416034343698204186575808430081", + "53": "21888242871839275222246405745257275088548364400416034343698204186575808364545", + "54": "21888242871839275222246405745257275088548364400416034343698204186575808233473", + "55": "21888242871839275222246405745257275088548364400416034343698204186575807971329", + "56": "21888242871839275222246405745257275088548364400416034343698204186575807447041", + "57": "21888242871839275222246405745257275088548364400416034343698204186575806398465", + "58": "21888242871839275222246405745257275088548364400416034343698204186575804301313", + "59": "21888242871839275222246405745257275088548364400416034343698204186575800107009", + "60": "21888242871839275222246405745257275088548364400416034343698204186575791718401", + "61": "21888242871839275222246405745257275088548364400416034343698204186575774941185", + "62": "21888242871839275222246405745257275088548364400416034343698204186575741386753", + "63": "21888242871839275222246405745257275088548364400416034343698204186575674277889", + "64": "21888242871839275222246405745257275088548364400416034343698204186575540060161", + "65": "21888242871839275222246405745257275088548364400416034343698204186575271624705", + "66": "21888242871839275222246405745257275088548364400416034343698204186574734753793", + "67": "21888242871839275222246405745257275088548364400416034343698204186573661011969", + "68": "1", + "69": "2", + "70": "4", + "71": "8", + "72": "16", + "73": "32", + "74": "64", + "75": "128", + "76": "256", + "77": "512", + "78": "1024", + "79": "2048", + "80": "4096", + "81": "8192", + "82": "16384", + "83": "32768", + "84": "65536", + "85": "131072", + "86": "262144", + "87": "524288", + "88": "1048576", + "89": "2097152", + "90": "4194304", + "91": "8388608", + "92": "16777216", + "93": "33554432", + "94": "67108864", + "95": "134217728", + "96": "268435456", + "97": "536870912", + "98": "1073741824", + "99": "2147483648", + "100": "4294967296" + } + ], + [ + {}, + {}, + { + "1": "21888242871839275222246405745257275088548364400416034343698204186575808495616", + "68": "1", + "69": "2", + "70": "4", + "71": "8", + "72": "16", + "73": "32", + "74": "64", + "75": "128", + "76": "256", + "77": "512", + "78": "1024", + "79": "2048", + "80": "4096", + "81": "8192", + "82": "16384", + "83": "32768", + "84": "65536", + "85": "131072", + "86": "262144", + "87": "524288", + "88": "1048576", + "89": "2097152", + "90": "4194304", + "91": "8388608", + "92": "16777216", + "93": "33554432", + "94": "67108864", + "95": "134217728", + "96": "268435456", + "97": "536870912", + "98": "1073741824", + "99": "2147483648" + } + ] + ], + "templates": { + "Num2Bits": "function(ctx) {\n ctx.setVar(\"lc1\", [], \"0\");\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(ctx.getVar(\"n\",[]))) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setSignal(\"out\", [ctx.getVar(\"i\",[])], bigInt(bigInt(ctx.getVar(\"i\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getSignal(\"in\", [])).shr(bigInt(ctx.getVar(\"i\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n ctx.assert(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"i\",[])])).mul(bigInt(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"i\",[])])).add(__P__).sub(bigInt(\"1\")).mod(__P__))).mod(__P__), \"0\");\n ctx.setVar(\"lc1\", [], bigInt(ctx.getVar(\"lc1\",[])).add(bigInt(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"i\",[])])).mul(bigInt(bigInt(\"2\").modPow(bigInt(ctx.getVar(\"i\",[])), __P__))).mod(__P__))).mod(__P__));\n }\n ctx.assert(ctx.getVar(\"lc1\",[]), ctx.getSignal(\"in\", []));\n}\n", + "Bits2Num": "function(ctx) {\n ctx.setVar(\"lc1\", [], \"0\");\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(ctx.getVar(\"n\",[]))) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setVar(\"lc1\", [], bigInt(ctx.getVar(\"lc1\",[])).add(bigInt(bigInt(ctx.getSignal(\"in\", [ctx.getVar(\"i\",[])])).mul(bigInt(bigInt(\"2\").modPow(bigInt(ctx.getVar(\"i\",[])), __P__))).mod(__P__))).mod(__P__));\n }\n ctx.setSignal(\"out\", [], ctx.getVar(\"lc1\",[]));\n ctx.assert(ctx.getSignal(\"out\", []), ctx.getVar(\"lc1\",[]));\n}\n", + "BinSum": "function(ctx) {\n ctx.setVar(\"nout\", [], ctx.callFunction(\"nbits\", [bigInt(bigInt(bigInt(\"2\").modPow(bigInt(ctx.getVar(\"n\",[])), __P__)).add(__P__).sub(bigInt(\"1\")).mod(__P__)).mul(bigInt(ctx.getVar(\"ops\",[]))).mod(__P__)]));\n ctx.setVar(\"lin\", [], \"0\");\n ctx.setVar(\"lout\", [], \"0\");\n for (ctx.setVar(\"k\", [], \"0\");bigInt(ctx.getVar(\"k\",[])).lt(bigInt(ctx.getVar(\"n\",[]))) ? 1 : 0;(ctx.setVar(\"k\", [], bigInt(ctx.getVar(\"k\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n for (ctx.setVar(\"j\", [], \"0\");bigInt(ctx.getVar(\"j\",[])).lt(bigInt(ctx.getVar(\"ops\",[]))) ? 1 : 0;(ctx.setVar(\"j\", [], bigInt(ctx.getVar(\"j\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setVar(\"lin\", [], bigInt(ctx.getVar(\"lin\",[])).add(bigInt(bigInt(ctx.getSignal(\"in\", [ctx.getVar(\"j\",[]),ctx.getVar(\"k\",[])])).mul(bigInt(bigInt(\"2\").modPow(bigInt(ctx.getVar(\"k\",[])), __P__))).mod(__P__))).mod(__P__));\n }\n }\n for (ctx.setVar(\"k\", [], \"0\");bigInt(ctx.getVar(\"k\",[])).lt(bigInt(ctx.getVar(\"nout\",[]))) ? 1 : 0;(ctx.setVar(\"k\", [], bigInt(ctx.getVar(\"k\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setSignal(\"out\", [ctx.getVar(\"k\",[])], bigInt(bigInt(ctx.getVar(\"k\",[])).greater(bigInt(256)) ? 0 : bigInt(ctx.getVar(\"lin\",[])).shr(bigInt(ctx.getVar(\"k\",[]))).and(__MASK__)).and(bigInt(\"1\")).and(__MASK__));\n ctx.assert(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"k\",[])])).mul(bigInt(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"k\",[])])).add(__P__).sub(bigInt(\"1\")).mod(__P__))).mod(__P__), \"0\");\n ctx.setVar(\"lout\", [], bigInt(ctx.getVar(\"lout\",[])).add(bigInt(bigInt(ctx.getSignal(\"out\", [ctx.getVar(\"k\",[])])).mul(bigInt(bigInt(\"2\").modPow(bigInt(ctx.getVar(\"k\",[])), __P__))).mod(__P__))).mod(__P__));\n }\n ctx.assert(ctx.getVar(\"lin\",[]), ctx.getVar(\"lout\",[]));\n}\n", + "A": "function(ctx) {\n ctx.setPin(\"n2ba\", [], \"in\", [], ctx.getSignal(\"a\", []));\n ctx.assert(ctx.getPin(\"n2ba\", [], \"in\", []), ctx.getSignal(\"a\", []));\n ctx.setPin(\"n2bb\", [], \"in\", [], ctx.getSignal(\"b\", []));\n ctx.assert(ctx.getPin(\"n2bb\", [], \"in\", []), ctx.getSignal(\"b\", []));\n for (ctx.setVar(\"i\", [], \"0\");bigInt(ctx.getVar(\"i\",[])).lt(bigInt(\"32\")) ? 1 : 0;(ctx.setVar(\"i\", [], bigInt(ctx.getVar(\"i\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__))\n {\n ctx.setPin(\"sum\", [], \"in\", [\"0\",ctx.getVar(\"i\",[])], ctx.getPin(\"n2ba\", [], \"out\", [ctx.getVar(\"i\",[])]));\n ctx.assert(ctx.getPin(\"sum\", [], \"in\", [\"0\",ctx.getVar(\"i\",[])]), ctx.getPin(\"n2ba\", [], \"out\", [ctx.getVar(\"i\",[])]));\n ctx.setPin(\"sum\", [], \"in\", [\"1\",ctx.getVar(\"i\",[])], ctx.getPin(\"n2bb\", [], \"out\", [ctx.getVar(\"i\",[])]));\n ctx.assert(ctx.getPin(\"sum\", [], \"in\", [\"1\",ctx.getVar(\"i\",[])]), ctx.getPin(\"n2bb\", [], \"out\", [ctx.getVar(\"i\",[])]));\n ctx.setPin(\"b2n\", [], \"in\", [ctx.getVar(\"i\",[])], ctx.getPin(\"sum\", [], \"out\", [ctx.getVar(\"i\",[])]));\n ctx.assert(ctx.getPin(\"b2n\", [], \"in\", [ctx.getVar(\"i\",[])]), ctx.getPin(\"sum\", [], \"out\", [ctx.getVar(\"i\",[])]));\n }\n ctx.setSignal(\"out\", [], ctx.getPin(\"b2n\", [], \"out\", []));\n ctx.assert(ctx.getSignal(\"out\", []), ctx.getPin(\"b2n\", [], \"out\", []));\n}\n" + }, + "functions": { + "nbits": { + "params": [ + "a" + ], + "func": "function(ctx) {\n ctx.setVar(\"n\", [], \"1\");\n ctx.setVar(\"r\", [], \"0\");\n while (bigInt(bigInt(ctx.getVar(\"n\",[])).add(__P__).sub(bigInt(\"1\")).mod(__P__)).lt(bigInt(ctx.getVar(\"a\",[]))) ? 1 : 0)\n {\n (ctx.setVar(\"r\", [], bigInt(ctx.getVar(\"r\",[])).add(bigInt(\"1\")).mod(__P__))).add(__P__).sub(bigInt(1)).mod(__P__);\n ctx.setVar(\"n\", [], bigInt(ctx.getVar(\"n\",[])).mul(bigInt(\"2\")).mod(__P__));\n }\n return ctx.getVar(\"r\",[]);;\n}\n" + } + }, + "nPrvInputs": 1, + "nPubInputs": 1, + "nInputs": 2, + "nOutputs": 1, + "nVars": 101, + "nConstants": 0, + "nSignals": 101 +}
A test/circuits/constants_test.jaz

@@ -0,0 +1,18 @@

+include "../../circuits/sha256/constants.jaz" + +template A() { + signal input in; + component h0; + h0 = K(8); + + var lc = 0; + var e = 1; + for (var i=0; i<32; i++) { + lc = lc + e*h0.out[i]; + e *= 2; + } + + lc === in; +} + +component main = A();
A test/sha256.js

@@ -0,0 +1,14 @@

+const chai = require("chai"); +const path = require("path"); + +const compiler = require("../index.js"); + +const assert = chai.assert; + +describe("SHA256 test", () => { + it("Should create a constant circuit", async () => { + + const cir = await compiler(path.join(__dirname, "circuits", "constants_test.jaz")); + assert.equal(cir.nVars, 2); + }); +});