xor.json 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. {
  2. "name": "xor",
  3. "custom_elements": {},
  4. "new_element": {
  5. "type": "new",
  6. "inputs": [
  7. ""
  8. ],
  9. "outputs": [
  10. ""
  11. ],
  12. "inputs_groups": [
  13. 1
  14. ],
  15. "outputs_groups": [
  16. 1
  17. ]
  18. },
  19. "inputs_number": 2,
  20. "outputs_number": 1,
  21. "blocks": {
  22. "1": {
  23. "type": "INPUT",
  24. "id": "INPUT 1",
  25. "const_id": "1",
  26. "x": 398.5859375,
  27. "y": 209,
  28. "inputs": [],
  29. "outputs": [
  30. "x"
  31. ],
  32. "outputs_groups": [
  33. 1
  34. ],
  35. "inputs_groups": [],
  36. "input_connectors_coordinates": [],
  37. "output_connectors_coordinates": [
  38. {
  39. "x": 576.40625,
  40. "y": 254
  41. }
  42. ]
  43. },
  44. "2": {
  45. "type": "INPUT",
  46. "id": "INPUT 2",
  47. "const_id": "2",
  48. "x": 402.5859375,
  49. "y": 328,
  50. "inputs": [],
  51. "outputs": [
  52. "x"
  53. ],
  54. "outputs_groups": [
  55. 1
  56. ],
  57. "inputs_groups": [],
  58. "input_connectors_coordinates": [],
  59. "output_connectors_coordinates": [
  60. {
  61. "x": 580.40625,
  62. "y": 373
  63. }
  64. ]
  65. },
  66. "3": {
  67. "type": "OUTPUT",
  68. "id": "OUTPUT 1",
  69. "const_id": "3",
  70. "x": 1315.625,
  71. "y": 433,
  72. "inputs": [
  73. "x"
  74. ],
  75. "outputs": [],
  76. "outputs_groups": [],
  77. "inputs_groups": [
  78. 1
  79. ],
  80. "input_connectors_coordinates": [
  81. {
  82. "x": 1360.625,
  83. "y": 478
  84. }
  85. ],
  86. "output_connectors_coordinates": []
  87. },
  88. "4": {
  89. "type": "NOT",
  90. "id": "NOT 1",
  91. "const_id": "4",
  92. "x": 648.5546875,
  93. "y": 210,
  94. "inputs": [
  95. "x"
  96. ],
  97. "outputs": [
  98. "!x"
  99. ],
  100. "outputs_groups": [
  101. 1
  102. ],
  103. "inputs_groups": [
  104. 1
  105. ],
  106. "input_connectors_coordinates": [
  107. {
  108. "x": 693.546875,
  109. "y": 255
  110. }
  111. ],
  112. "output_connectors_coordinates": [
  113. {
  114. "x": 852.4375,
  115. "y": 255
  116. }
  117. ]
  118. },
  119. "5": {
  120. "type": "NOT",
  121. "id": "NOT 2",
  122. "const_id": "5",
  123. "x": 657.5546875,
  124. "y": 326,
  125. "inputs": [
  126. "x"
  127. ],
  128. "outputs": [
  129. "!x"
  130. ],
  131. "outputs_groups": [
  132. 1
  133. ],
  134. "inputs_groups": [
  135. 1
  136. ],
  137. "input_connectors_coordinates": [
  138. {
  139. "x": 702.546875,
  140. "y": 371
  141. }
  142. ],
  143. "output_connectors_coordinates": [
  144. {
  145. "x": 861.4375,
  146. "y": 371
  147. }
  148. ]
  149. },
  150. "6": {
  151. "type": "AND",
  152. "id": "AND 1",
  153. "const_id": "6",
  154. "x": 971.5390625,
  155. "y": 419,
  156. "inputs": [
  157. "x",
  158. "y"
  159. ],
  160. "outputs": [
  161. "x && y"
  162. ],
  163. "outputs_groups": [
  164. 1
  165. ],
  166. "inputs_groups": [
  167. 1,
  168. 1
  169. ],
  170. "input_connectors_coordinates": [
  171. {
  172. "x": 1016.53125,
  173. "y": 464
  174. },
  175. {
  176. "x": 1016.53125,
  177. "y": 536
  178. }
  179. ],
  180. "output_connectors_coordinates": [
  181. {
  182. "x": 1181.453125,
  183. "y": 464
  184. }
  185. ]
  186. },
  187. "7": {
  188. "type": "OR",
  189. "id": "OR 1",
  190. "const_id": "7",
  191. "x": 640.1796875,
  192. "y": 447,
  193. "inputs": [
  194. "x",
  195. "y"
  196. ],
  197. "outputs": [
  198. "x || y"
  199. ],
  200. "outputs_groups": [
  201. 1
  202. ],
  203. "inputs_groups": [
  204. 1,
  205. 1
  206. ],
  207. "input_connectors_coordinates": [
  208. {
  209. "x": 685.171875,
  210. "y": 492
  211. },
  212. {
  213. "x": 685.171875,
  214. "y": 564
  215. }
  216. ],
  217. "output_connectors_coordinates": [
  218. {
  219. "x": 826.8125,
  220. "y": 492
  221. }
  222. ]
  223. },
  224. "8": {
  225. "type": "OR",
  226. "id": "OR 2",
  227. "const_id": "8",
  228. "x": 944.1796875,
  229. "y": 232,
  230. "inputs": [
  231. "x",
  232. "y"
  233. ],
  234. "outputs": [
  235. "x || y"
  236. ],
  237. "outputs_groups": [
  238. 1
  239. ],
  240. "inputs_groups": [
  241. 1,
  242. 1
  243. ],
  244. "input_connectors_coordinates": [
  245. {
  246. "x": 989.171875,
  247. "y": 277
  248. },
  249. {
  250. "x": 989.171875,
  251. "y": 349
  252. }
  253. ],
  254. "output_connectors_coordinates": [
  255. {
  256. "x": 1130.8125,
  257. "y": 277
  258. }
  259. ]
  260. }
  261. },
  262. "wires": {
  263. "0": {
  264. "id": 0,
  265. "from_block_const_id": "1",
  266. "to_block_const_id": "4",
  267. "from_output_id": 0,
  268. "to_input_id": 0,
  269. "from_point": {
  270. "x": 576.40625,
  271. "y": 254
  272. },
  273. "to_point": {
  274. "x": 693.546875,
  275. "y": 255
  276. }
  277. },
  278. "1": {
  279. "id": 1,
  280. "from_block_const_id": "2",
  281. "to_block_const_id": "5",
  282. "from_output_id": 0,
  283. "to_input_id": 0,
  284. "from_point": {
  285. "x": 580.40625,
  286. "y": 373
  287. },
  288. "to_point": {
  289. "x": 702.546875,
  290. "y": 371
  291. }
  292. },
  293. "2": {
  294. "id": 2,
  295. "from_block_const_id": "2",
  296. "to_block_const_id": "7",
  297. "from_output_id": 0,
  298. "to_input_id": 1,
  299. "from_point": {
  300. "x": 580.40625,
  301. "y": 373
  302. },
  303. "to_point": {
  304. "x": 685.171875,
  305. "y": 564
  306. }
  307. },
  308. "3": {
  309. "id": 3,
  310. "from_block_const_id": "1",
  311. "to_block_const_id": "7",
  312. "from_output_id": 0,
  313. "to_input_id": 0,
  314. "from_point": {
  315. "x": 576.40625,
  316. "y": 254
  317. },
  318. "to_point": {
  319. "x": 685.171875,
  320. "y": 492
  321. }
  322. },
  323. "4": {
  324. "id": 4,
  325. "from_block_const_id": "7",
  326. "to_block_const_id": "6",
  327. "from_output_id": 0,
  328. "to_input_id": 1,
  329. "from_point": {
  330. "x": 826.8125,
  331. "y": 492
  332. },
  333. "to_point": {
  334. "x": 1016.53125,
  335. "y": 536
  336. }
  337. },
  338. "5": {
  339. "id": 5,
  340. "from_block_const_id": "8",
  341. "to_block_const_id": "6",
  342. "from_output_id": 0,
  343. "to_input_id": 0,
  344. "from_point": {
  345. "x": 1130.8125,
  346. "y": 277
  347. },
  348. "to_point": {
  349. "x": 1016.53125,
  350. "y": 464
  351. }
  352. },
  353. "6": {
  354. "id": 6,
  355. "from_block_const_id": "6",
  356. "to_block_const_id": "3",
  357. "from_output_id": 0,
  358. "to_input_id": 0,
  359. "from_point": {
  360. "x": 1181.453125,
  361. "y": 464
  362. },
  363. "to_point": {
  364. "x": 1360.625,
  365. "y": 478
  366. }
  367. },
  368. "7": {
  369. "id": 7,
  370. "from_block_const_id": "5",
  371. "to_block_const_id": "8",
  372. "from_output_id": 0,
  373. "to_input_id": 1,
  374. "from_point": {
  375. "x": 861.4375,
  376. "y": 371
  377. },
  378. "to_point": {
  379. "x": 989.171875,
  380. "y": 349
  381. }
  382. },
  383. "8": {
  384. "id": 8,
  385. "from_block_const_id": "4",
  386. "to_block_const_id": "8",
  387. "from_output_id": 0,
  388. "to_input_id": 0,
  389. "from_point": {
  390. "x": 852.4375,
  391. "y": 255
  392. },
  393. "to_point": {
  394. "x": 989.171875,
  395. "y": 277
  396. }
  397. }
  398. },
  399. "tests": [
  400. [
  401. 0,
  402. 0,
  403. 0
  404. ],
  405. [
  406. 1,
  407. 1,
  408. 0
  409. ],
  410. [
  411. 1,
  412. 0,
  413. 1
  414. ],
  415. [
  416. 0,
  417. 1,
  418. 1
  419. ]
  420. ]
  421. }