docs← Back to article

Markdown for LLMs

LDC-E8306 — Column type without a value universe

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E8306 — Column type without a value universe

## What it means

Every table column draws its values from a known universe: booleans,
enumerations with a declared composition, numbers, dates, instants, and
text. The compiler partitions that universe to prove coverage and
reachability. A column declared with any other type — an entity, for
instance — has no universe to partition, so no execution could ever build
a value of that kind for the table, and the compiler stops at the column.

Redeclare the column with one of the supported types. A domain
enumeration is accepted once its composition is known to the package.

## Example

```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:demo:diagnostics\"\n", "main.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:demo:diagnostics\";\n\nentity Person;\n", "rate.lawtable.json": "{\"schemaVersion\": \"law.decision/0.1\", \"kind\": \"decision-table\", \"id\": \"urn:demo:diagnostics#rate\", \"mode\": \"function\", \"hitPolicy\": \"first\", \"total\": false, \"inputs\": [{\"id\": \"x\", \"name\": \"days late\", \"type\": {\"name\": \"urn:demo:diagnostics#Person\"}}], \"outputs\": [{\"id\": \"r\", \"name\": \"rate\", \"type\": {\"name\": \"urn:law:std#Decimal\"}}], \"rows\": [{\"id\": \"small\", \"when\": [{\"input\": \"x\", \"condition\": {\"kind\": \"any\"}}], \"then\": [{\"output\": \"r\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.5\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}]}", "law.lock": "{\"lockVersion\": \"0.2\", \"resources\": [{\"capability\": \"compile_time\", \"contentHash\": \"sha256:5384ad1cd9a116ccae93649b00f064ec768bd5360bcdd697b416cdf1cbc824a8\", \"id\": \"urn:demo:diagnostics#rate\", \"kind\": \"decision-table\", \"path\": \"rate.lawtable.json\"}]}"}, "expect": "LDC-E8306"}
```

## Fix

```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:demo:diagnostics\"\n", "main.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:demo:diagnostics\";\n\nentity Person;\n", "rate.lawtable.json": "{\"schemaVersion\": \"law.decision/0.1\", \"kind\": \"decision-table\", \"id\": \"urn:demo:diagnostics#rate\", \"mode\": \"function\", \"hitPolicy\": \"first\", \"total\": true, \"inputs\": [{\"id\": \"x\", \"name\": \"days late\", \"type\": {\"name\": \"urn:law:std#Natural\"}}], \"outputs\": [{\"id\": \"r\", \"name\": \"rate\", \"type\": {\"name\": \"urn:law:std#Decimal\"}}], \"rows\": [{\"id\": \"small\", \"when\": [{\"input\": \"x\", \"condition\": {\"kind\": \"comparison\", \"op\": \"lt\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Natural\"}, \"value\": 10}}}], \"then\": [{\"output\": \"r\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.5\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}, {\"id\": \"big\", \"when\": [{\"input\": \"x\", \"condition\": {\"kind\": \"comparison\", \"op\": \"gte\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Natural\"}, \"value\": 10}}}], \"then\": [{\"output\": \"r\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.5\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}]}", "law.lock": "{\"lockVersion\": \"0.2\", \"resources\": [{\"capability\": \"compile_time\", \"contentHash\": \"sha256:f71405f806ae828f56c08d6dc7018561bf0058f838a3ed6b96cf3b985431ce2f\", \"id\": \"urn:demo:diagnostics#rate\", \"kind\": \"decision-table\", \"path\": \"rate.lawtable.json\"}]}"}, "expect": null}
```

## Engine message

The table checker reports this in its own wording:

```text
LDC-E8306: column "x" is declared with type "urn:demo:diagnostics#Person": it has no universe §A3.3.1, and a value of this kind is not built by a slice-0.1 term — the table lowers, but execution yields TYPE_ERROR
```

## Related

- [LDC-E8302](/diagnostics/LDC-E8302/) — hit policies and row guards.