# SSA Phi Placement Validator (Minimal SSA, Control-Flow Graph)

> SSA Phi Placement Validator (Minimal SSA, Control-Flow Graph) is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-04).

Verifies that claimed SSA phi-function placements in a control-flow graph are correct according to iterated dominance frontier analysis.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/workflow/workflow-minimal-ssa-phi-placement?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ssa-phi-placement-validator-minimal-ssa-control-flow-graph-e029dd14
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BRoticPBvnNHQHxNzok5e

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ssa-phi-placement-validator-minimal-ssa-control-flow-graph-e029dd14 -d '<json body>'
```

Example prompt: Check whether my claimed phi placements are correct for a 6-node CFG with 3 variables: edges [[0,1],[0,2],[1,3],[2,3],[3,4],[4,5]], definitions at node 0 for variable 0 and node 2 for variable 1, and claimed phi placements of variable 0 at node 3 and variable 1 at node 3.

## When to prefer this

Use this endpoint when you need to formally verify SSA phi placement correctness against iterated dominance frontier theory, especially in compiler or program analysis pipelines where phi node accuracy is critical. Prefer this over manual calculation when CFGs have complex branching or many variables. This is specifically suited for checking claimed placements rather than generating them from scratch.

## Known failure modes

- Invalid edge references (node indices out of range for declared node count)
- Disconnected CFG with no reachable path from entry node
- Claimed phi placements referencing undefined variables
- Input exceeds schema limits (>32 nodes, >16 variables, >256 edges)
- Malformed artifact object missing required fields (nodes, variables, edges, definitions, claimed_phi)

## How this service works

An agent that hands over a workflow compiler needs its claimed unpruned SSA phi placements checked against iterated dominance frontiers in the supplied control-flow graph.

## Output

The endpoint returns a determination of whether each claimed phi placement is valid per iterated dominance frontier rules — identifying any incorrectly placed phi nodes (false positives), any missing phi nodes required by the dominance frontier (false negatives), and an overall pass/fail verdict for the claimed SSA phi placement set.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "required": [
    "nodes",
    "variables",
    "edges",
    "definitions",
    "claimed_phi"
   ],
   "properties": {
    "edges": {
     "type": "array",
     "items": {
      "type": "array",
      "items": {
       "type": "integer",
       "maximum": 31,
       "minimum": 0
      },
      "maxItems": 2,
      "minItems": 2
     },
     "maxItems": 256,
     "minItems": 0
    },
    "nodes": {
     "type": "integer",
     "maximum": 32,
     "minimum": 1
    },
    "variables": {
     "type": "integer",
     "maximum": 16,
     "minimum": 1
    },
    "claimed_phi": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "node",
       "variable"
      ],
      "properties": {
       "node": {
        "type": "integer",
        "maximum": 31,
        "minimum": 0
       },
       "variable": {
        "type": "integer",
        "maximum": 15,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 512,
     "minItems": 0
    },
    "definitions": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "node",
       "variable"
      ],
      "properties": {
       "node": {
        "type": "integer",
        "maximum": 31,
        "minimum": 0
       },
       "variable": {
        "type": "integer",
        "maximum": 15,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 256,
     "minItems": 0
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ssa-phi-placement-validator-minimal-ssa-control-flow-graph-e029dd14/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
