{
  "format": "intrepyd-requirements",
  "version": 1,
  "signals": [
    {
      "name": "door_open",
      "type": "bool",
      "description": "a door is open"
    },
    {
      "name": "speed",
      "type": "int16",
      "description": "the vehicle's speed, in km/h"
    },
    {
      "name": "ack",
      "type": "bool",
      "description": "the driver pressed the acknowledgement button"
    },
    {
      "name": "open_request",
      "type": "bool",
      "description": "a passenger asked a door to open"
    },
    {
      "name": "locked",
      "type": "bool",
      "description": "the doors are locked"
    }
  ],
  "requirements": [
    {
      "id": "DA-001",
      "title": "Door open while moving",
      "text": "The alarm shall sound when a door is open while the vehicle moves faster than 5 km/h.",
      "formula": "door_open and speed > 5"
    },
    {
      "id": "DA-002",
      "title": "Driver's acknowledgement",
      "text": "The alarm shall stop when the driver acknowledges it, until a door is opened again.",
      "formula": "door_open and speed > 5 and not (ack or (pre(ack, 1) and pre(door_open, 1)))"
    },
    {
      "id": "DA-003",
      "title": "Opening in motion",
      "text": "The door shall stay locked when it is asked to open while the vehicle moves, or did a step before.",
      "formula": "open_request and (speed > 0 or pre(speed, 1) > 0)"
    },
    {
      "id": "DA-004",
      "title": "Lock on departure",
      "text": "When the vehicle starts moving, the doors shall be locked at the next step.",
      "formula": "pre(speed, 1) = 0 and speed > 0 => next(locked, 1)"
    }
  ]
}
