Skip to content
HALOWERK

Codewerk

cfg natural loop nesting

Return natural loops, back-edge tails and containment depths in a supplied reachable control-flow graph.

POST https://code.halowerk.com/v1/cfg-natural-loop-nesting

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
entrystringYes
blocksarrayYes
Show full input schema
{
  "type": "object",
  "properties": {
    "entry": {
      "type": "string",
      "maxLength": 32,
      "minLength": 1
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "next": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32,
              "minLength": 1
            },
            "maxItems": 32,
            "minItems": 0
          }
        },
        "required": [
          "id",
          "next"
        ],
        "additionalProperties": false
      },
      "maxItems": 32,
      "minItems": 1
    }
  },
  "required": [
    "entry",
    "blocks"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "entry": "A",
  "blocks": [
    {
      "id": "A",
      "next": [
        "B"
      ]
    },
    {
      "id": "B",
      "next": [
        "C",
        "D"
      ]
    },
    {
      "id": "C",
      "next": [
        "B"
      ]
    },
    {
      "id": "D",
      "next": []
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-18 UTC.

More endpoints in this hub

All endpoints in this hub โ†’