{
  "input": {
    "check_livelocks": true,
    "initial": {
      "phase": "idle",
      "tries": 0
    },
    "initial_states": null,
    "reachability": null,
    "terminal_condition": {
      "op": "in",
      "values": [
        "acked",
        "failed"
      ],
      "var": "phase"
    },
    "transitions": [
      {
        "guard": {
          "op": "eq",
          "value": "idle",
          "var": "phase"
        },
        "name": "send",
        "updates": {
          "phase": {
            "op": "const",
            "value": "sending"
          }
        }
      },
      {
        "guard": {
          "op": "eq",
          "value": "sending",
          "var": "phase"
        },
        "name": "retry",
        "updates": {
          "tries": {
            "arg": {
              "left": {
                "op": "var",
                "var": "tries"
              },
              "op": "add",
              "right": {
                "op": "const",
                "value": 1
              }
            },
            "max": 2,
            "min": 0,
            "op": "clamp"
          }
        }
      },
      {
        "guard": {
          "op": "eq",
          "value": "sending",
          "var": "phase"
        },
        "name": "ack",
        "updates": {
          "phase": {
            "op": "const",
            "value": "acked"
          }
        }
      },
      {
        "guard": {
          "args": [
            {
              "op": "eq",
              "value": "sending",
              "var": "phase"
            },
            {
              "op": "eq",
              "value": 2,
              "var": "tries"
            }
          ],
          "op": "and"
        },
        "name": "give_up",
        "updates": {
          "phase": {
            "op": "const",
            "value": "failed"
          }
        }
      }
    ],
    "variables": [
      {
        "name": "phase",
        "type": "enum",
        "values": [
          "idle",
          "sending",
          "acked",
          "failed"
        ]
      },
      {
        "max": 2,
        "min": 0,
        "name": "tries",
        "type": "int"
      }
    ]
  },
  "output": {
    "deadlock": {
      "found": false,
      "trace": null
    },
    "domain_violations": [],
    "exhaustive": false,
    "invariant_violations": [],
    "livelock": {
      "found": true,
      "loop_start": 3,
      "trace": [
        {
          "state": {
            "phase": "idle",
            "tries": 0
          },
          "step": 0,
          "transition": null
        },
        {
          "state": {
            "phase": "sending",
            "tries": 0
          },
          "step": 1,
          "transition": "send"
        },
        {
          "state": {
            "phase": "sending",
            "tries": 1
          },
          "step": 2,
          "transition": "retry"
        },
        {
          "state": {
            "phase": "sending",
            "tries": 2
          },
          "step": 3,
          "transition": "retry"
        },
        {
          "state": {
            "phase": "sending",
            "tries": 2
          },
          "step": 4,
          "transition": "retry"
        }
      ]
    },
    "reachability": [],
    "states_explored": 8,
    "stats": {
      "elapsed_ms": 0,
      "timed_out": false
    },
    "status": "counterexample_found",
    "transitions_fired": 8,
    "unreachable_transitions": [],
    "verified": true
  },
  "slug": "fsm-retry-livelock",
  "tool": "verify_state_machine"
}
