2.5 Identifier System
2.5 Identifier System
LexID (Lexical Identifier)
Primary numeric identifier within a RUML file:
- Format: Positive integer, encoded as a JSON string (e.g.
"12") - Pattern:
^[1-9][0-9]*$(Rule FMT-11FMT-11 Every key ofrulemap.nodesand every entry ofchildrenMUST be a LexID, a string matching^[1-9][0-9]*$.) - Start: MUST begin at 1 (root node) (
Rule FMT-08FMT-08rulemap.nodesMUST contain an entry with key"1", the root node.) - Uniqueness: MUST be unique within the file (
Rule FMT-12FMT-12 A LexID MUST NOT occur more than once as a key ofrulemap.nodes.) - Reuse: A modular node (see
6.2) exists once in
nodes; its LexID stays unique
LexIDs are strings everywhere they appear — as rulemap.nodes keys and in children. The node map
is a JSON object, so its keys are strings by construction; using the same form for references keeps
a reference and its key directly comparable.
UUID (Universally Unique Identifier)
Globally unique identifier for external referencing:
- Format: UUID v4 (randomly generated)
- Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$(Rule FMT-10FMT-10 Every UUID MUST be a lowercase UUID version 4 (pattern in 2.5).) - Standard: RFC 4122 Version 4
- Entropy: 122 bits cryptographically secure
- Generation: SHOULD use standard UUID library (e.g.
uuidnpm package, v4 function)
Examples of valid UUIDs:
e7c9a3f1-4b82-4d15-9a6c-3d8f2b01e794a3f5c9e7-2d48-4b71-8f6a-1c3d0b92e475b8d2e4f6-0a73-4c85-9b1e-5f7c2a34d098c1e3a5f7-6b90-4d42-8c4a-7f2e3b01d563