{
  "format": "intrepyd-diagram",
  "version": 3,
  "circuit": {
    "nodes": [
      {
        "id": 1,
        "kind": "input",
        "name": "door_open",
        "type": "bool"
      },
      {
        "id": 2,
        "kind": "input",
        "name": "speed",
        "type": "int16"
      },
      {
        "id": 3,
        "kind": "input",
        "name": "ack",
        "type": "bool"
      },
      {
        "id": 4,
        "kind": "input",
        "name": "open_request",
        "type": "bool"
      },
      {
        "id": 5,
        "kind": "const",
        "parent": 22,
        "name": "const1",
        "type": "int16",
        "value": "5"
      },
      {
        "id": 6,
        "kind": "gate",
        "parent": 22,
        "name": "gt1",
        "op": "gt"
      },
      {
        "id": 7,
        "kind": "gate",
        "parent": 22,
        "name": "not1",
        "op": "not"
      },
      {
        "id": 8,
        "kind": "component",
        "parent": 22,
        "name": "rs1",
        "module": "plc",
        "symbol": "mk_rs"
      },
      {
        "id": 9,
        "kind": "gate",
        "parent": 22,
        "name": "not2",
        "op": "not"
      },
      {
        "id": 10,
        "kind": "gate",
        "parent": 22,
        "name": "or1",
        "op": "or"
      },
      {
        "id": 11,
        "kind": "gate",
        "parent": 22,
        "name": "and1",
        "op": "and",
        "inputs": 3
      },
      {
        "id": 12,
        "kind": "output",
        "name": "alarm"
      },
      {
        "id": 13,
        "kind": "const",
        "parent": 27,
        "name": "const2",
        "type": "int16",
        "value": "0"
      },
      {
        "id": 14,
        "kind": "latch",
        "parent": 27,
        "name": "last_speed",
        "type": "int16"
      },
      {
        "id": 15,
        "kind": "const",
        "parent": 27,
        "name": "const3",
        "type": "int16",
        "value": "0"
      },
      {
        "id": 16,
        "kind": "gate",
        "parent": 27,
        "name": "gt2",
        "op": "gt"
      },
      {
        "id": 17,
        "kind": "const",
        "parent": 27,
        "name": "const4",
        "type": "int16",
        "value": "0"
      },
      {
        "id": 18,
        "kind": "gate",
        "parent": 27,
        "name": "gt3",
        "op": "gt"
      },
      {
        "id": 19,
        "kind": "gate",
        "parent": 27,
        "name": "or2",
        "op": "or"
      },
      {
        "id": 20,
        "kind": "gate",
        "parent": 27,
        "name": "and2",
        "op": "and"
      },
      {
        "id": 21,
        "kind": "output",
        "name": "lock"
      },
      {
        "id": 22,
        "kind": "subsystem",
        "name": "alarm_logic"
      },
      {
        "id": 23,
        "kind": "input",
        "parent": 22,
        "name": "door_open"
      },
      {
        "id": 24,
        "kind": "input",
        "parent": 22,
        "name": "speed"
      },
      {
        "id": 25,
        "kind": "input",
        "parent": 22,
        "name": "ack"
      },
      {
        "id": 26,
        "kind": "output",
        "parent": 22,
        "name": "alarm"
      },
      {
        "id": 27,
        "kind": "subsystem",
        "name": "lock_logic"
      },
      {
        "id": 28,
        "kind": "input",
        "parent": 27,
        "name": "speed"
      },
      {
        "id": 29,
        "kind": "input",
        "parent": 27,
        "name": "open_request"
      },
      {
        "id": 30,
        "kind": "output",
        "parent": 27,
        "name": "lock"
      },
      {
        "id": 31,
        "kind": "gate",
        "name": "implies1",
        "op": "implies"
      },
      {
        "id": 32,
        "kind": "gate",
        "name": "not1",
        "op": "not"
      },
      {
        "id": 33,
        "kind": "assertion",
        "name": "ack_silences"
      },
      {
        "id": 34,
        "kind": "const",
        "name": "const1",
        "type": "int16",
        "value": "0"
      },
      {
        "id": 35,
        "kind": "gate",
        "name": "neq1",
        "op": "neq"
      },
      {
        "id": 36,
        "kind": "gate",
        "name": "and1",
        "op": "and"
      },
      {
        "id": 37,
        "kind": "gate",
        "name": "implies2",
        "op": "implies"
      },
      {
        "id": 38,
        "kind": "assertion",
        "name": "locked_in_motion"
      },
      {
        "id": 39,
        "kind": "target",
        "name": "alarm_sounds"
      },
      {
        "id": 40,
        "kind": "const",
        "name": "const2",
        "type": "int16",
        "value": "0"
      },
      {
        "id": 41,
        "kind": "gate",
        "name": "geq1",
        "op": "geq"
      },
      {
        "id": 42,
        "kind": "assumption",
        "name": "speed_not_negative"
      }
    ],
    "edges": [
      {
        "from": 24,
        "to": 6,
        "port": "a"
      },
      {
        "from": 5,
        "to": 6,
        "port": "b"
      },
      {
        "from": 23,
        "to": 7,
        "port": "in"
      },
      {
        "from": 7,
        "to": 8,
        "port": "r"
      },
      {
        "from": 25,
        "to": 8,
        "port": "s"
      },
      {
        "from": 10,
        "to": 9,
        "port": "in"
      },
      {
        "from": 25,
        "to": 10,
        "port": "a"
      },
      {
        "from": 8,
        "to": 10,
        "port": "b"
      },
      {
        "from": 23,
        "to": 11,
        "port": "in0"
      },
      {
        "from": 6,
        "to": 11,
        "port": "in1"
      },
      {
        "from": 9,
        "to": 11,
        "port": "in2"
      },
      {
        "from": 22,
        "to": 12,
        "port": "in"
      },
      {
        "from": 13,
        "to": 14,
        "port": "init"
      },
      {
        "from": 28,
        "to": 14,
        "port": "next"
      },
      {
        "from": 28,
        "to": 16,
        "port": "a"
      },
      {
        "from": 15,
        "to": 16,
        "port": "b"
      },
      {
        "from": 14,
        "to": 18,
        "port": "a"
      },
      {
        "from": 17,
        "to": 18,
        "port": "b"
      },
      {
        "from": 16,
        "to": 19,
        "port": "a"
      },
      {
        "from": 18,
        "to": 19,
        "port": "b"
      },
      {
        "from": 29,
        "to": 20,
        "port": "a"
      },
      {
        "from": 19,
        "to": 20,
        "port": "b"
      },
      {
        "from": 27,
        "to": 21,
        "port": "in"
      },
      {
        "from": 3,
        "to": 22,
        "port": "ack"
      },
      {
        "from": 1,
        "to": 22,
        "port": "door_open"
      },
      {
        "from": 2,
        "to": 22,
        "port": "speed"
      },
      {
        "from": 11,
        "to": 26,
        "port": "in"
      },
      {
        "from": 4,
        "to": 27,
        "port": "open_request"
      },
      {
        "from": 2,
        "to": 27,
        "port": "speed"
      },
      {
        "from": 20,
        "to": 30,
        "port": "in"
      },
      {
        "from": 3,
        "to": 31,
        "port": "a"
      },
      {
        "from": 32,
        "to": 31,
        "port": "b"
      },
      {
        "from": 22,
        "to": 32,
        "port": "in"
      },
      {
        "from": 31,
        "to": 33,
        "port": "in"
      },
      {
        "from": 2,
        "to": 35,
        "port": "a"
      },
      {
        "from": 34,
        "to": 35,
        "port": "b"
      },
      {
        "from": 4,
        "to": 36,
        "port": "a"
      },
      {
        "from": 35,
        "to": 36,
        "port": "b"
      },
      {
        "from": 36,
        "to": 37,
        "port": "a"
      },
      {
        "from": 27,
        "to": 37,
        "port": "b"
      },
      {
        "from": 37,
        "to": 38,
        "port": "in"
      },
      {
        "from": 22,
        "to": 39,
        "port": "in"
      },
      {
        "from": 2,
        "to": 41,
        "port": "a"
      },
      {
        "from": 40,
        "to": 41,
        "port": "b"
      },
      {
        "from": 41,
        "to": 42,
        "port": "in"
      }
    ]
  },
  "layout": {
    "blocks": {
      "1": {
        "x": 40,
        "y": 40
      },
      "2": {
        "x": 40,
        "y": 190
      },
      "3": {
        "x": 40,
        "y": 90
      },
      "4": {
        "x": 40,
        "y": 240
      },
      "5": {
        "x": 40,
        "y": 90
      },
      "6": {
        "x": 210,
        "y": 60
      },
      "7": {
        "x": 210,
        "y": 140
      },
      "8": {
        "x": 330,
        "y": 150
      },
      "9": {
        "x": 680,
        "y": 180
      },
      "10": {
        "x": 540,
        "y": 170
      },
      "11": {
        "x": 800,
        "y": 110
      },
      "12": {
        "x": 510,
        "y": 170
      },
      "13": {
        "x": 40,
        "y": 240
      },
      "14": {
        "x": 230,
        "y": 210
      },
      "15": {
        "x": 40,
        "y": 90
      },
      "16": {
        "x": 230,
        "y": 130
      },
      "17": {
        "x": 40,
        "y": 140
      },
      "18": {
        "x": 400,
        "y": 170
      },
      "19": {
        "x": 520,
        "y": 150
      },
      "20": {
        "x": 650,
        "y": 90
      },
      "21": {
        "x": 510,
        "y": 340
      },
      "22": {
        "x": 230,
        "y": 80
      },
      "23": {
        "x": 40,
        "y": 140
      },
      "24": {
        "x": 40,
        "y": 40
      },
      "25": {
        "x": 40,
        "y": 190
      },
      "26": {
        "x": 930,
        "y": 130
      },
      "27": {
        "x": 230,
        "y": 260
      },
      "28": {
        "x": 40,
        "y": 190
      },
      "29": {
        "x": 40,
        "y": 40
      },
      "30": {
        "x": 790,
        "y": 100
      },
      "31": {
        "x": 650,
        "y": 150
      },
      "32": {
        "x": 510,
        "y": 220
      },
      "33": {
        "x": 790,
        "y": 150
      },
      "34": {
        "x": 40,
        "y": 140
      },
      "35": {
        "x": 230,
        "y": 190
      },
      "36": {
        "x": 510,
        "y": 270
      },
      "37": {
        "x": 650,
        "y": 270
      },
      "38": {
        "x": 790,
        "y": 270
      },
      "39": {
        "x": 510,
        "y": 100
      },
      "40": {
        "x": 40,
        "y": 290
      },
      "41": {
        "x": 230,
        "y": 350
      },
      "42": {
        "x": 510,
        "y": 390
      }
    }
  },
  "simulation": {
    "steps": 10,
    "stimuli": {
      "1": [
        "false",
        "true",
        "true",
        "true",
        "true",
        "true",
        "false",
        "true",
        "true",
        "false"
      ],
      "2": [
        "0",
        "3",
        "8",
        "12",
        "12",
        "12",
        "12",
        "12",
        "0",
        "0"
      ],
      "3": [
        "false",
        "false",
        "false",
        "true",
        "false",
        "false",
        "false",
        "false",
        "false",
        "false"
      ],
      "4": [
        "false",
        "false",
        "false",
        "false",
        "false",
        "false",
        "false",
        "false",
        "true",
        "false"
      ]
    }
  }
}
