Skip to content

Type System

AXL uses determinatives - single-character sigils prefixed to values - to declare type at the point of use. This concept is borrowed from Egyptian hieroglyphs, where determinative glyphs at the end of a word disambiguated its meaning.

In AXL, determinatives serve the same purpose: they make every value self-describing and unambiguous, eliminating an entire class of parsing errors and injection attacks.


Determinative Table

Sigil Type Meaning Example
# Integer Whole number quantity threshold:#100
% Float Decimal / percentage / ratio confidence:%0.87
$ Currency Monetary value or asset reference price:$3450.00
@ Reference Agent, entity, or external pointer author:@dev-agent-3
! Assertion Declarative truth claim status:!DOWN
? Uncertainty Unconfirmed, provisional, or queried status:?DEGRADED

Bare strings (no sigil) are permitted for free-text fields like detail, memo, finding, pattern, action, and reason.


Egyptian Hieroglyph Inspiration

In Middle Egyptian, the word for "sun" could be written with phonetic signs alone, but a circular determinative glyph was appended to signal "this word refers to a celestial body." Without the determinative, the same phonetic sequence might mean something else entirely.

AXL applies this principle to machine communication. The sigil is not decoration - it is semantic metadata embedded in the grammar itself. A parser does not need a schema lookup to know that %0.87 is a float or that !DOWN is an assertion. The type travels with the value.

How Types Prevent Injection

Consider a value like DOWN. Without a determinative, a malicious or confused agent could inject it into a field expecting a number, a reference, or a currency amount. The receiving parser would have to guess.

With determinatives:

  • !DOWN is an assertion - the sender is making a truth claim.
  • ?DOWN is uncertainty - the sender is not sure.
  • #DOWN would fail to parse - DOWN is not an integer.
  • $DOWN would fail to parse - DOWN is not a currency value.

This means type validation is syntactic, not semantic. A parser rejects malformed values before they ever reach application logic.

# Valid: assertion in a status field
status:!DOWN

# Valid: uncertain status
status:?DEGRADED

# Invalid: integer determinative on a non-numeric value
threshold:#abc    ← parse error

# Invalid: currency determinative on a non-monetary value
price:$none       ← parse error

Type Coercion Rules

AXL does not perform implicit type coercion. Each determinative maps to exactly one type:

Sigil Parsed As Internal Representation
# Signed 64-bit integer int64
% IEEE 754 double float64
$ Decimal string with 2–8 decimal places Decimal
@ UTF-8 identifier string string (validated as agent/entity ID)
! Uppercase assertion token enum (domain-specific valid values)
? Uppercase uncertainty token enum (same domain values, marked provisional)

Assertion vs. Uncertainty

The ! and ? determinatives form a complementary pair. They carry identical content but different epistemic weight:

# Agent is certain the service is down
status:!DOWN

# Agent suspects the service may be down
status:?DOWN

This distinction propagates through the system. An !DOWN assertion triggers automated failover. A ?DOWN uncertainty triggers investigation. The grammar encodes confidence at the value level, not just in a separate confidence field.


Combining Types and Confidence

Many domains include an explicit confidence field alongside typed values. This is not redundant - the determinative declares the kind of value, while confidence declares the degree of belief in it:

direction:!LONG|confidence:%0.87

This reads: "I assert LONG with 87% confidence." The assertion is a commitment; the confidence quantifies it. Both are necessary for downstream decision-making.