interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / spec / type-system.md

50 lines · 2810 bytes Raw Blame History Source

SPECIFICATION: The OMEGA Type System

Document ID:     SPEC-OMEGA-TYPE-M4
Classification:  Sovereign Semantic Specification
Target Substrate: Typed AST and Semantic Value Graphs
Status:          RATIFIED FOR M4 (OMEGA_SEMANTICS)

1. Type Invariants

The OMEGA type system enforces:

  1. Explicit Bounds: Every type declares exact mathematical bit-widths or cardinalities.
  2. Substrate Independence: Host machine words (int, long, usize, uintptr_t) are strictly forbidden.
  3. Finite Representation: Infinite types or unbounded recursive structures are refused fail-closed.

2. Canonical Semantic Types

Type TagNameParametersAllowed Range / Constraints
0x01UNITNoneSingleton type. Value: ()
0x02BOOLNoneBoolean truth values: false (0), true (1)
0x03UNSIGNED_INTEGERwidth: u16Fixed width $w \in [1, 256]$ bits
0x04SIGNED_INTEGERwidth: u16Fixed width $w \in [2, 256]$ bits, two's complement
0x05BITVECTORwidth: u16Bit sequence $w \in [1, 256]$ bits
0x06BYTENoneExact 8-bit octet (isomorphic to BITVECTOR(8))
0x07SEQUENCEelem_type_id: SemanticId, len: u32Fixed-length homogeneous sequence ($L \le 65535$)
0x08TUPLEelement_types: List<SemanticId>Ordered heterogeneous elements ($N \le 255$)
0x09ADDRESSwidth: u16Memory or register address index ($w \in [16, 64]$)
0x0ARESOURCEresource_class: u16Abstract resource identifier class
0x0BCAPABILITY_REFERENCEslot: u32, generation: u64OMEGA reference to an M3 capability token (64-bit generation: see spec/effect-cap64-migration.md)
0x0CEFFECT_INTENT_REFERENCEintent_digest: [u8; 32]Reference to an intended physical effect
0x0DEFFECT_RECEIPT_REFERENCEreceipt_digest: [u8; 32]Reference to an authoritative execution receipt
0x0EFP32width: u16 = 32IEEE binary32 value; amendment for E1 gap row 12 (spec/program-fp32.md); mixing with integers needs an explicit CONVERT (opcode 0x10)

3. Values

A value $v$ is a typed tuple $v = (\tau, \beta)$ where $\tau$ is the canonical SemanticId of its declared SemanticType, and $\beta$ is its canonical big-endian byte sequence.

Integer Canonicalization

Non-semantic human syntactic variations collapse to identical binary representations: