UNPKG

chimera-framework

Version:

Language agnostic framework for stand-alone and distributed computing

246 lines (245 loc) 6.79 kB
{ "id": 1, "branch": true, "vars": { "_verbose": 0 }, "ins": "num1, num2", "out": "output", "verbose": 0, "mode": "series", "chains": [ { "id": 2, "branch": "typeof(num1) !== \"number\" || typeof(num2) !== \"number\"", "mode": "series", "chains": [ { "id": 28, "branch": "true", "ins": [ "num1 dan num2 should be number" ], "out": "_error_message", "command": "{$.assignValue}", "loop": "false" }, { "id": 29, "branch": "true", "ins": [true], "out": "_error", "command": "{$.assignValue}", "loop": "false" } ], "loop": "false" }, { "id": 5, "branch": "true", "mode": "series", "chains": [ { "id": 6, "branch": "true", "mode": "parallel", "chains": [ { "id": 7, "branch": "true", "mode": "series", "chains": [ { "id": 8, "branch": true, "mode": "parallel", "chains": [ { "id": 9, "branch": "num1 >= num2", "mode": "series", "chains": [ { "id": 10, "branch": "true", "ins": "num2", "out": "bottom", "command": "{$.assignValue}", "loop": "false" }, { "id": 11, "branch": "true", "ins": "num1", "out": "top", "command": "{$.assignValue}", "loop": "false" } ], "loop": "false" }, { "id": 12, "branch": "!(num1 >= num2)", "mode": "series", "chains": [ { "id": 13, "branch": "true", "ins": "num1", "out": "bottom", "command": "{$.assignValue}", "loop": "false" }, { "id": 14, "branch": "true", "ins": "num2", "out": "top", "command": "{$.assignValue}", "loop": "false" } ], "loop": "false" } ], "loop": false }, { "id": 15, "branch": "true", "ins": "[]", "out": "evens", "command": "{$.assignValue}", "loop": "false" }, { "id": 16, "branch": "true", "ins": "bottom", "out": "x", "command": "{$.assignValue}", "loop": "false" }, { "id": 17, "branch": "true", "mode": "series", "chains": [ { "id": 18, "branch": "x%2 == 0", "ins": "x", "out": "evens[evens.length]", "command": "{$.assignValue}", "loop": "false" }, { "id": 19, "branch": "true", "ins": "x+1", "out": "x", "command": "{$.assignValue}", "loop": "false" } ], "loop": "x <= top" } ], "loop": "false" }, { "id": 20, "branch": "true", "ins": "", "out": "info.circle", "command": "[$.loadJs(_chain_cwd+\"circle.js\")]", "loop": "false" }, { "id": 21, "branch": "true", "ins": "7", "out": "info.area", "command": "[$.loadJs(_chain_cwd+\"circle.js\", \"area\")]", "loop": "false" } ], "loop": "false" }, { "id": 22, "branch": "true", "ins": "evens, \", \"", "out": "info.evens", "command": "{$.join}", "loop": "false" }, { "id": 23, "branch": "true", "ins": "\"Hello \", \"world\"", "out": "info[\"helloWorld\"]", "command": "{$.concat}", "loop": "false" }, { "id": 24, "branch": "true", "ins": [ "Hello ", "sekai" ], "out": "info[\"helloSekai\"]", "command": "{$.concat}", "loop": "false" }, { "id": 25, "branch": "true", "ins": "_chain_cwd+\"square.chiml\", 10", "out": "info.square", "command": "[_runChain]", "loop": "false" }, { "id": 26, "branch": "true", "ins": "[info.helloWorld, info.helloSekai, info.evens, info.circle, info.area, info.square], \"\\n\"", "out": "output", "command": "{$.join}", "loop": "false" } ], "loop": "false" }, { "id": 27, "branch": "typeof(num1) !== \"number\" || typeof(num2) !== \"number\"", "mode": "series", "chains": [ { "id": 28, "branch": "true", "ins": [ "num1 dan num2 should be number" ], "out": "_error_message", "command": "{$.assignValue}", "loop": "false" }, { "id": 29, "branch": "true", "ins": [true], "out": "_error", "command": "{$.assignValue}", "loop": "false" } ], "loop": "false" } ], "loop": false }