This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /boards/15/topics/39?r=382 at Thu, 03 Nov 2022 15:42:12 GMT Non-deterministic outcome of setVariable evaluations - Public Comments Archive - Open Grid Forum

Non-deterministic outcome of setVariable evaluations

Added by Steve Hanson about 9 years ago

There is concern that with multiple newVariableInstance or multiple setVariable at the same annotation point, an author can create schemas that are non-deterministic, because the spec says that statement annotations of the same kind in the resolved set for an annotation point are not evaluated in any particular order.


Replies (4)

Resolved RE: Non-deterministic outcome of setVariable evaluations - Added by Michael Beckerle about 9 years ago

Fixed by specifying the total order of evaluation for these annotations. Details are the rest of this posting.

Errata 3.20, 3.21, and Errata 3.25 must be modified (and the corresponding sections of the spec)

For errata 3.20, and errata 3.21 the sentence:

"However, the order of execution among them is not specified. Schema authors can insert sequences to control the timing of evaluation of statements more precisely."

is replaced by:

"The order of execution is specified in errata 3.25."

Errata 3.25 is modified.

Numbered item 3 of both the first list and second list is replaced by:

3. dfdl:setVariable(s) - in lexical order, innermost schema component first

Numbered item 2 of the second list is replaced by:

2. dfdl:newVariableInstance(s) - in lexical order, innermost schema component first

These two paragraphs are added below the numbered lists to clarify what 'lexical order, innermost schema component first' means.

The dfdl:setVariable annotations at any one annotation point of the schema are always executed in lexical order. However, dfdl:setVariable annotations can also be found in different annotation points that are combined into the resolved set of annotations for one schema component. In this case, the order of execution of the dfdl:setVariable statements from any one annotation point remains lexical. The order of execution of the dfdl:setVariable annotations different annotation points follows the principle of innermost first, meaning that a schema component that references another schema component has its dfdl:setVariable statements executed after those of the referenced schema component. For example, if an element reference and an element declaration both have dfdl:setVariable statements, then those on the element declaration will execute before those on the element reference. Similarly dfdl:setVariable statements on a base simple type execute before those of a simple type derived from it. The dfdl:setVariable statements on a simple type execute before those on an element having that simple type (whether by reference, or when the simple type is lexically nested within the element declaration). The dfdl:setVariable statements on the sequence or choice within a global group definition execute before those on a group reference.

The dfdl:newVariableInstance annotations at any one annotation point of the schema are always executed in lexical order. However, dfdl:newVariableInstance annotations can also be found in different annotation points that are combined into the resolved set of annotations for one schema component. In this case, the order of execution of the dfdl:newVariableInstance statements from any one annotation point remains lexical. The order of execution of the dfdl:newVariableInstance annotations different annotation points follows the principle of innermost first, meaning that a schema component that contains or references another schema component has its dfdl:newVariableInstance statements executed after those of the contained or referenced schema component. For example, if a group reference and the sequence or choice group of a group definition both have dfdl:newVariableInstance statements, then those on the global group definition will execute before those on the group reference.

Resolved: Non-deterministic outcome of setVariable evaluations - Added by Steve Hanson over 8 years ago

Updated errata 3.20, 3.21, 3.25 in experience document 1.

DONE - RE: Non-deterministic outcome of setVariable evaluations - Added by Michael Beckerle over 8 years ago

changes in draft draft-gwdrp-dfdl-v1.0.4-r05.docx

(1-4/4)

This is a static archive of the previous Open Grid Forum Redmine content management system saved from host redmine.ogf.org file /boards/15/topics/39?r=382 at Thu, 03 Nov 2022 15:42:12 GMT