Arxo A3 decision table 0.1
Canonical typed decision table: the authoring surface of the A3 format.
Versions
Section titled “Versions”Accepted schemaVersion: law.decision/0.1.
Top-level fields
Section titled “Top-level fields”| name | type-or-$ref | required | description |
|---|---|---|---|
schemaVersion | "law.decision/0.1" | yes | — |
kind | "decision-table" | yes | — |
id | #/$defs/StableId | yes | — |
mode | enum (2) | yes | — |
hitPolicy | enum (6) | yes | — |
priorityOrder | array | no | — |
total | boolean | yes | — |
aggregation | enum (5) | no | — |
inputs | array | yes | — |
outputs | array | yes | — |
emit | #/$defs/EmitTarget | no | — |
rows | array | yes | — |
labels | array | no | Labels of the table ITSELF — they propagate to its symbol_decl. They do not spill onto rows: a row has its own carrier, because the table generates a node for each row, and the table label would give them all the same name. |
metadata | object | no | — |
Enumerations
Section titled “Enumerations”| location | values |
|---|---|
properties/schemaVersion | "law.decision/0.1" |
properties/kind | "decision-table" |
properties/mode | "function", "rules" |
properties/hitPolicy | "unique", "first", "any", "priority", "collect", "multiple" |
properties/aggregation | "list", "count", "sum", "min", "max" |
allOf/0/if/properties/hitPolicy | "priority" |
allOf/1/if/properties/mode | "rules" |
allOf/2/if/properties/hitPolicy | "collect" |
$defs/LiteralTerm/properties/kind | "value" |
$defs/Operand/oneOf/1/properties/kind | "parameter" |
$defs/Condition/oneOf/0/properties/kind | "any" |
$defs/Condition/oneOf/1/properties/kind | "comparison" |
$defs/Condition/oneOf/1/properties/op | "eq", "neq", "lt", "lte", "gt", "gte" |
$defs/Condition/oneOf/2/properties/kind | "interval" |
$defs/Condition/oneOf/3/properties/kind | "in" |
$defs/Condition/oneOf/4/properties/kind | "and" |
$defs/Label/properties/status | "official", "unofficial", "translation" |
$defs/EmitArgument/oneOf/0/properties/kind | "input" |
$defs/EmitArgument/oneOf/1/properties/kind | "output" |
$defs/EmitArgument/oneOf/2/properties/kind | "literal" |
$defs/EmitTarget/properties/polarity | "positive", "negative" |
Raw schema
Section titled “Raw schema”StableId
Section titled “StableId”Type: string.
LocalId
Section titled “LocalId”Type: string.
TypeRef
Section titled “TypeRef”Type: object.
Required: name.
| name | type-or-$ref | description |
|---|---|---|
name | #/$defs/StableId | — |
args | array | — |
optional | boolean | — |
JsonValue
Section titled “JsonValue”Definition JsonValue.
LiteralTerm
Section titled “LiteralTerm”Type: object.
Required: kind, type.
| name | type-or-$ref | description |
|---|---|---|
currency | string | — |
display | string | — |
kind | "value" | — |
type | #/$defs/TypeRef | — |
unit | string | — |
value | #/$defs/JsonValue | — |
factors | array | The multiset of base units of a quantity. unit is not parsed on read but is CHECKED against its rendering: the “base per base” grammar is ambiguous. |
lower | string | Lower bound of the interval, an irreducible fraction <n>/<d>. |
upper | string | Upper bound of the interval. |
derivation | string | The derivation canon. The bounds are RECOMPUTED from it, not checked field by field. |
poly | array | Algebraic minimal-polynomial coefficients in ascending order, as ASCII-int decimal strings; verified through the canon funnel on read, never trusted. |
root | integer | 1-based index of the real root in ascending order; range-checked against the Sturm count on read. |
expr | string | Real-expression canon string; verified through the constructor funnel on read, never trusted. |
Operand
Section titled “Operand”Definition Operand.
Condition
Section titled “Condition”Definition Condition.
InputColumn
Section titled “InputColumn”Type: object.
Required: id, type.
| name | type-or-$ref | description |
|---|---|---|
id | #/$defs/LocalId | — |
name | string | — |
type | #/$defs/TypeRef | — |
OutputColumn
Section titled “OutputColumn”Type: object.
Required: id, type.
| name | type-or-$ref | description |
|---|---|---|
id | #/$defs/LocalId | — |
name | string | — |
type | #/$defs/TypeRef | — |
InputCell
Section titled “InputCell”Type: object.
Required: input, condition.
| name | type-or-$ref | description |
|---|---|---|
input | #/$defs/LocalId | — |
condition | #/$defs/Condition | — |
OutputCell
Section titled “OutputCell”Type: object.
Required: output, value.
| name | type-or-$ref | description |
|---|---|---|
output | #/$defs/LocalId | — |
value | #/$defs/Operand | — |
DecisionRow
Section titled “DecisionRow”Type: object.
Required: id, when, then, anchors.
| name | type-or-$ref | description |
|---|---|---|
id | #/$defs/LocalId | — |
when | array | — |
then | array | — |
anchors | array | — |
labels | array | Labels of a table row. They propagate to the nodes generated by THIS row (in mode=rules — to its rule, in mode=function — to its helper symbol); the table label does NOT spill onto rows, otherwise every row would be named after the table. Outside the semantic hash, inside the content hash of the node. |
LanguageTag
Section titled “LanguageTag”Type: string.
A copy of the label definition from the intermediate-representation schema: A3 schemas are self-contained and do not borrow even their own primitives (StableId, LiteralTerm, TypeRef).
Type: object.
Required: language, status, text.
| name | type-or-$ref | description |
|---|---|---|
grammaticalForms | object | Morphological forms of the label; the key is a slot from the closed dictionary of its language tag, the value is a non-empty form. |
language | #/$defs/LanguageTag | — |
status | enum (3) | — |
text | string | — |
EmitArgument
Section titled “EmitArgument”Definition EmitArgument.
EmitTarget
Section titled “EmitTarget”Type: object.
Required: predicate, polarity, args.
| name | type-or-$ref | description |
|---|---|---|
predicate | #/$defs/StableId | — |
polarity | enum (2) | — |
args | array | — |
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.