document #318

Action 242 part 3 - complex types with interior alignment with dfdl:value/content length and deadlocks

Added by Michael Beckerle almost 3 years ago. Updated over 1 year ago.

Status:submitted Start date:08/02/2016
Priority:Normal Due date:
Assignee:- % Done:


Target version:DFDL v1.0
Document Type:Proposed Recommendation


When unparsing, the dfdl:contentLength and dfdl:valueLength of a complex element is allowed to be a function of its starting position due to variable-sized alignment regions interior to the complex representation.

This creates a situation where a element with dfdl:outputValueCalc can have variable-length itself, and hence a complex element after it, that it forward references, can't compute its content's length, because it can't know the start position due to the variable length OVC element preceding it. (Got that?)

This scenario is possible due to the way that features compose in DFDL, which features are trying to be fairly orthogonal to each other. Alignment causes representation lengths to break this orthogonality because length of one thing now depends on the length of previous things.

This deadlock where an OVC forward referencing expression refers to the length of something the length of which cannot be determined due to the OVC's variable length, must be detected, and it is an SDE.

It is perhaps a quite subtle circularity, but there are other circular deadlock situations that can arise with DFDL expressions.

A sub-section will be added to Section 23 on the DFDL expression language dealing with forward and backward references, and it will discuss the deadlock scenarios including this one.

This new sub-section can then be referenced from the places in the specification where forward reference, or limitations on reference (to backward-only) are discussed.

(There is an additional issue - Action 289 - associated with setVariable and newVariableInstance expressions and unparsing where these backward-referencing expressions can refer to an OVC element which forward references - effectively making these expressions forward referencing as well. This section will likely also discuss this issue so as to gather all these sorts of matters in one place.)


Updated by Michael Beckerle over 1 year ago

  • Target version set to DFDL v1.0

Also available in: Atom PDF