Zum Inhalt
HALOWERK

Technische Prüfungen & Formate

cms / cms constructor pattern exhaustiveness

An agent that compiles CMS variant templates needs whether its ordered constructor-pattern rows cover every finite value of the supplied recursive sum types without enumerating sample records.

POST https://detect.halowerk.com/v1/cms/cms-constructor-pattern-exhaustiveness

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
artifactobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "artifact": {
      "type": "object",
      "properties": {
        "types": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "constructors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 31
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 7
                      },
                      "minItems": 0,
                      "maxItems": 4
                    }
                  },
                  "required": [
                    "tag",
                    "fields"
                  ],
                  "additionalProperties": false
                },
                "minItems": 0,
                "maxItems": 8
              }
            },
            "required": [
              "constructors"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 8
        },
        "patterns": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "const": "wildcard"
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "const": "construct"
                  },
                  "tag": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 31
                  },
                  "arguments": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 127
                    },
                    "minItems": 0,
                    "maxItems": 4
                  }
                },
                "required": [
                  "kind",
                  "tag",
                  "arguments"
                ],
                "additionalProperties": false
              }
            ]
          },
          "minItems": 1,
          "maxItems": 128
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 127
          },
          "minItems": 0,
          "maxItems": 64
        },
        "root_type": {
          "type": "integer",
          "minimum": 0,
          "maximum": 7
        },
        "claimed_exhaustive": {
          "type": "boolean"
        }
      },
      "required": [
        "types",
        "patterns",
        "rows",
        "root_type",
        "claimed_exhaustive"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "artifact"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "artifact": {
    "types": [
      {
        "constructors": [
          {
            "tag": 0,
            "fields": []
          },
          {
            "tag": 1,
            "fields": [
              0
            ]
          }
        ]
      }
    ],
    "patterns": [
      {
        "kind": "wildcard"
      }
    ],
    "rows": [
      0
    ],
    "root_type": 0,
    "claimed_exhaustive": true
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →