8. Processing model
Contents of DID 0.2
- Parse; read
language.idandlanguage.version. A file that cannot be parsed (not a JSON text, or not an object at the top level) produces the findingstd.unparseable(DISL 8.7), located at the file and, where the parser can tell, at the line and column of the failure; no other finding is evaluated for it, and the diagram shows that finding instead of the model. If the language id differs from the specification's, refuse. - If the definition's language version is older, run the specification's migrations (DISL 11.9) on the raw structure.
- Validate against
$defs/Definitionand the specification's metamodel (types exist, attributes typed, references resolvable). Missing and duplicate ids are loaded and reported as section 4 describes. A record inelementsorrelationsthat fails$defs/ElementRecordor$defs/RelationRecordfor any other reason is preserved verbatim as unknown content (section 8.2), left out of the model, and reported asstd.unreadableEntrywith its JSON Pointer (RFC 6901, for example/elements/4) asdetail.entry.path(DISL, section 8.7); the rest of the definition is loaded. The keys ofnodesandedgesin a view are not references for this step: a key that names no element is handled in step 5. Records of derived types are unknown content (section 3); stored values of fixed attributes are ignored (section 3). - Compute derived elements (DISL 4.11) from the validated model, and recompute derived ids (section 4).
- Resolve view data, including keys that name derived elements; ignore keys that name no element and keys that name ephemeral ids (section 5). Run layout for elements lacking view data if the specification's layout
triggerisonLoadIfMissingoralways(DISL 10). - Evaluate constraints with
livetiming; show findings, the reader's findings of steps 1 to 5 first (DISL 8.6). - Render.
A definition with a newer minor or patch language version than the loaded specification is opened with a warning; a newer major version is opened read-only or refused (DISL 11.9).
Elements of unknown types, unknown attributes and unknown view properties in a definition (for example written by a newer language version or a vendor extension) MUST be preserved on save. Unknown elements are shown as neutral placeholders ("Unknown element of type X") and reported by std.typeExists (DISL 8.7). Readers MUST NOT silently drop data.
Unknown content also includes a record kept by step 3 of section 8.1 (std.unreadableEntry) and a record of a derived type (section 3). Such a record is not part of the model and is not drawn; it MUST be written back verbatim, in its place in record order, until the user removes it.
- Evaluate constraints with
savetiming, as DISL 14.5 describes. - Serialize the logical definition canonically (section 6). The write rules of sections 3 to 5 apply: ids assigned on load are written, derived elements and values of fixed attributes are not, view keys and suppressions that name ephemeral ids are dropped, and unknown content is written back verbatim.
- Write files according to the specification's
files.modeatomically (write to temporary file, then rename).