You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by mb...@apache.org on 2019/11/07 00:54:22 UTC

[incubator-daffodil-site] 02/02: Publishing from ff07a90ad2f85d2dabecffab95e5db7cc5060b15

This is an automated email from the ASF dual-hosted git repository.

mbeckerle pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-daffodil-site.git

commit 242702d1ff45ad9e8b0035edd088c96c2608d695
Author: Michael Beckerle <mb...@tresys.com>
AuthorDate: Wed Nov 6 19:51:27 2019 -0500

    Publishing from ff07a90ad2f85d2dabecffab95e5db7cc5060b15
---
 .../infoset-inputter-redesign/index.html           | 353 ---------------------
 content/images/dsom-sequence-child-classes.png     | Bin 31082 -> 0 bytes
 content/images/runtime1-sequence-child-classes.png | Bin 45085 -> 0 bytes
 ...l.xml => exampleTDMLTutorial.tutorial.tdml.xml} |   0
 4 files changed, 353 deletions(-)

diff --git a/content/dev/design-notes/infoset-inputter-redesign/index.html b/content/dev/design-notes/infoset-inputter-redesign/index.html
deleted file mode 100644
index 02f554a..0000000
--- a/content/dev/design-notes/infoset-inputter-redesign/index.html
+++ /dev/null
@@ -1,353 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <title>Apache Daffodil (incubating) | Infoset Inputters and Runtime 1 Streaming Unparser Changes</title>
-    
-    <meta name="author" content="">
-
-    <!-- Enable responsive viewport -->
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-    <!-- HTML5 shim, for IE6-8 support of HTML elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <link href="/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">
-    <link href="/assets/themes/apache/css/style.css?body=1" rel="stylesheet" type="text/css">
-    <link href="/assets/themes/apache/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" />
-
-  </head>
-
-  <body>
-
-        <div class="navbar navbar-inverse" role="navigation">
-      <div class="container">
-        <div class="navbar-header"><a class="navbar-brand" href="/"><img src="/assets/themes/apache/img/apache-daffodil-logo.png" alt="Apache Daffodil"/></a></div>
-        <nav role="navigation">
-          <ul class="nav navbar-nav navbar-right">
-            <li><a href="/releases">Releases</a></li>
-            <li id="documentation">
-              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Docs<b class="caret"></b></a>
-              <ul class="dropdown-menu dropdown-left">
-                <li><a href="/getting-started/">Getting Started</a></li>
-                <li><a href="/examples/">Examples</a></li>
-                <li><a href="/docs/latest/javadoc/">Java API</a></li>
-                <li><a href="/docs/latest/scaladoc/">Scala API</a></li>
-                <li><a href="/docs/dfdl/">DFDL Specification</a></li>
-                <li><a href="/unsupported/">Unsupported Features</a></li>
-                <li><a href="/faq/">Frequently Asked Questions</a></li>
-              </ul>
-            </li>
-            <li id="community">
-              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community<b class="caret"></b></a>
-              <ul class="dropdown-menu dropdown-left">
-                <li><a href="/community">Get Involved</a></li>
-                <li><a href="/people">People</a></li>
-              </ul>
-            </li>
-            <li id="development">
-              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Development<b class="caret"></b></a>
-              <ul class="dropdown-menu dropdown-left">
-                <li><a class="external" href="https://cwiki.apache.org/confluence/display/DAFFODIL/">Wiki</a></li>
-                <li><a class="external" href="https://github.com/search?q=repo%3Aapache%2Fincubator-daffodil+repo%3Aapache%2Fincubator-daffodil-site&type=Repositories">GitHub</a></li>
-                <li><a class="external" href="https://issues.apache.org/jira/projects/DAFFODIL/">JIRA</a></li>
-              </ul>
-            </li>
-            <li id="apache">
-              <a href="#" data-toggle="dropdown" class="dropdown-toggle">Apache<b class="caret"></b></a>
-              <ul class="dropdown-menu">
-                <li><a class="external" href="https://www.apache.org/">Apache Software Foundation</a></li>
-                <li><a class="external" href="https://www.apache.org/licenses/">License</a></li>
-                <li><a class="external" href="https://www.apache.org/security">Security</a></li>
-                <li><a class="external" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
-                <li><a class="external" href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
-              </ul>
-            </li>
-          </ul>
-        </nav>
-      </div>
-    </div>
-
-
-<div class="title">
-  <div class="container">
-    <h2>Infoset Inputters and Runtime 1 Streaming Unparser Changes</h2>
-  </div>
-</div>
-
-
-
-    <div class="container">
-      <div class="row">
-  <div class="col-md-12">
-    <div class="sect1">
-<h2 id="introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>In order to fix DAFFODIL-2192, a significant change must be made to the structure of the InfosetInputter trait/classes, and the unparser generally.</p>
-</div>
-<div class="paragraph">
-<p>Currently, the InfosetInputter architecture is dependent on being able to take an element name (+ namespace when used), have as a context a current element ElementRuntimeData object, and then given a hash-table which is stored on the element ERD, lookup the name and namespace (when used) to get the next element ERD.
-This lookup hash table is encapsulated in the NextElementResolver classes.
-At schema compile time, given each element ERD, it is precomputed what the possible valid set of subsequent following ERDs can be (including the current one again, in case of an array).
-This set of possibilities is captured in an instance of the NextElementResolver class, and is stored on each ERD.</p>
-</div>
-<div class="paragraph">
-<p>This process makes unparsing a self-validating kind of processing. As an external representation of the Infoset is converted into an actual stream of Infoset events, each incoming element event is scrutinized against the schema for whether it is allowed. This scrutiny is built into the fact that the incoming element name+namespace is being looked up in the NextElementResolver, and then once each element is created, a new NextElementResolver object is taken from its ERD for the next in [...]
-</div>
-<div class="paragraph">
-<p>An invariant is that the next element resolution process cannot cross a complex-type element boundary, as an end-element event ends the scope of the possible legal subsequent elements that can arrive next.
-However, within a complex type, there can be many groups and group references.</p>
-</div>
-<div class="paragraph">
-<p>This architecture depends on the fact that the ElementRuntimeData (ERD) objects are unique per element, and per element context - that is, they are depending on the fact that element ERDs are not shared and so they uniquely identify both the element, and the context of that element (nest of all enclosing groups).</p>
-</div>
-<div class="paragraph">
-<p>As part of the changes to fix our schema compiler speed/space issues (DAFFODIL-1444), this assumption is no longer valid. Elements (specifically DSOM ElementBase objects) can be shared. Groups can be shared. The expected improvement in schema compiler performance and the space reduction is fundamentally driven from this sharing. This sharing is also needed to implement a desirable future feature which is to enable recursive definitions in DFDL.</p>
-</div>
-<div class="paragraph">
-<p>Ultimately, the required change is from one where an ERD is a unique identifier of an element and all its dynamic context, to one where because ERDs are shared, the Unparser runtime must maintain a stack of the dynamic context information sufficient to perform next-element resolution as each infoset event must be synthesized.</p>
-</div>
-<div class="sect2">
-<h3 id="an-aside-about-a-recursive-future">An Aside about a Recursive Future</h3>
-<div class="paragraph">
-<p>In a future version of DFDL we plan to allow recursive definitions. It is theoretically possible to define a recursive structure using only reusable groups:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;xs:element name="r"&gt;
-  &lt;xs:complexType&gt;
-    &lt;xs:group ref="g"/&gt;
-  &lt;/xs:complexType&gt;
-&lt;/xs:eleemnt&gt;</pre>
-</div>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;xs:group name="g"&gt;
-  &lt;xs:choice&gt;
-    &lt;xs:sequence&gt;
-      &lt;xs:sequence&gt;
-      &lt;xs:annotation&gt;&lt;xs:appinfo source="http://www.ogf.org/dfdl/"&gt;
-        &lt;dfdl:assert testKind="pattern" testPattern="."/&gt;&lt;!-- there is more data --&gt;
-      &lt;/xs:appinfo&gt;&lt;/xs:annotation&gt;
-      &lt;/xs:sequence&gt;
-      &lt;xs:element name="x" type="xs:string" dfdl:length="1" dfdl:lengthKind="explicit"/&gt;
-      &lt;xs:group ref="g"/&gt;
-    &lt;/xs:sequence&gt;
-    &lt;xs:sequence/&gt;
- &lt;/xs:choice&gt;
-&lt;xs:group&gt;</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The above example simulates an array using group recursion.</p>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<img src="/images/icons/note.png" alt="Note">
-</td>
-<td class="content">
-It is not clear that even if DFDL allows recursion it would allow it on groups alone.
-Requiring recursion to utilize elements would seem to be consistent with DFDL&#8217;s current restriction which requires repeating/optional things to be elements.
-Furthermore, it is not clear if the above is allowed in XML Schema. XML Schema&#8217;s UPA rules may in fact require elements to be used in the formulation of recursive structure.
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>Recursion requires evolution of the current Daffodil architecture to one that enables sharing of definitions of groups, elements and types.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="design-evolution">Design Evolution</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>The sections below describe the evolution of the Daffodil schema compiler and runtime to fix the DAFFODIL-2192 issue.</p>
-</div>
-<div class="sect2">
-<h3 id="dsom-and-sequencechild">DSOM and SequenceChild</h3>
-<div class="paragraph">
-<p>In Daffodil, DSOM now enables sharing of ElementBase objects, and ModelGroup objects (SequenceTermBase, ChoiceTermBase).</p>
-</div>
-<div class="paragraph">
-<p>A SequenceChild object represents the non-shared aspects of a term that is a child of a sequence.</p>
-</div>
-<div class="paragraph">
-<p>There is no corresponding ChoiceChild object. A child of a choice can be a sequence, or some other non-sequencce, in which case the non-sequence is wrapped in an "implied sequence" object so there is an invariant that the child of a choice is always a sequence.</p>
-</div>
-<div class="paragraph">
-<p>This makes a SequenceChild object the non-shared part of any term, and the Term object itself the shared part.</p>
-</div>
-<div class="paragraph">
-<p>A SequenceChild object therefore represents that Term in context of the enclosing sequence.</p>
-</div>
-<div class="paragraph">
-<p>A DSOM class diagram showing an added taxonomy of SequenceChild classes is below:</p>
-</div>
-<div class="imageblock">
-<div class="content">
-<img src="/images/dsom-sequence-child-classes.png" alt="dsom sequence child classes" width="901" height="409">
-</div>
-</div>
-<div class="paragraph">
-<p>The above reflects the status quo of objects. However, we introduce new schema-compile-time calculations.
-For each ElementSequenceChild DSOM object, we compute things that were previously computed on ElementBase.
-We compute the possible next ElementSequenceChild that can follow it.
-This is defined inductively on the SequenceChild, and the subsequent ElementSequenceChild objects that can follow it up until the enclosing end-of-element must be encountered.
-An ElementSequenceChild can follow itself if it is for an array declaration.
-When an ElementSequenceChild is for an optional element (array or optional), then that element, or the subsequent ElementSequenceChild of the model group, can be subsequent.
-If an ElementSequenceChild is required, then only that ElementSequnceChild is possible after the prior ElementSequenceChild.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="runtime-1-and-sequencechildruntimedata">Runtime 1 and SequenceChildRuntimeData</h3>
-<div class="paragraph">
-<p>Below is the proposed corresponding data structures used at runtime (in daffodil runtime 1).
-The SequenceChildRuntimeData class and all derived from it are new, as is the relationship from ERD to the ModelGroupRuntimeData that corresponds to the complex type element&#8217;s model group.</p>
-</div>
-<div class="imageblock">
-<div class="content">
-<img src="/images/runtime1-sequence-child-classes.png" alt="runtime1 sequence child classes" width="1059" height="550">
-</div>
-</div>
-<div class="paragraph">
-<p>By introducing SequenceChildRuntimeData (SCRD) we now have a place where runtime data associated with individual terms within the context of a sequence can access values needed at runtime.
-Many pieces of runtime information currently carried on ERD (or SRD, CRD) will move onto the corresponding SCRD.
-For example alignment-related values should all be on element SCRD (ESCRD) classes.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="next-element-resolution-at-runtime">Next-Element Resolution at Runtime</h3>
-<div class="paragraph">
-<p>The existing NextElementResolver class will be renamed PartialNextElementResolver to reflect that the class itself implements only part of the algorithm.
-Any given PartialNextElementResolver can resolve a name (+ namespace when used) to an ERD, or it can not be able to perform the resolution, which is not an error.</p>
-</div>
-<div class="paragraph">
-<p>As a whole the next-element resoluiton algorithm requires that the unparser maintain a stack of SequenceChildRuntimeData objects and the resolution algorithm works down the stack using the partial resolver from the most-recently pushed runtime data object first.
-If that does not resolve the element it moves to the next deeper runtime-data object on the stack having a partial next element resolver, and tries that.
-This continues until it succeeds, or until an ERD is found on the stack, at which point the resolution fails and an unparse error (fatal) is issued.</p>
-</div>
-<div class="paragraph">
-<p>Note that the context of next-element-resolution cannot span the boundary of a complex element.
-This is because an end-element event must be received before any subsequent element start events.</p>
-</div>
-<div class="paragraph">
-<p>The InfosetInputter calls back to a UState method which does resolution using this stack and the above-described algorithm. This requires the InfosetInputter have the ability to call back to a method of the UStateMain object.</p>
-</div>
-<div class="paragraph">
-<p>This dynamic-context stack need not be copied to UStates for Suspensions as those only occur after Infoset elements have been created.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="schema-compilation-of-partialnextelementresolvers">Schema Compilation of PartialNextElementResolvers</h3>
-<div class="paragraph">
-<p>The set of possible subsequent ElementSequenceChild objects that can follow another is compute inductively starting from the last element or group within a sequence.
-It is limited to the length of the current sequence, since sequences can be shared.</p>
-</div>
-<div class="paragraph">
-<p>(Note that unshared i.e., local sequences could in principle be special cased - collapsed together - for purposes of this analysis.
-We assume here that we will treat all sequence groups as if they were shared via group refs.)</p>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="some-interactions-or-non-interactions">Some interactions, or non-interactions</h2>
-<div class="sectionbody">
-<div class="ulist">
-<ul>
-<li>
-<p>Orthogonal to suspensions - next element resolution is over before a suspension is constructed for the element.</p>
-</li>
-<li>
-<p>Orthogonal to choiceBranchMap - next element resolution must be done first, and the result of it is used by the choiceBranchMap to choose which branch of the choice is implied by arrival of that element.</p>
-</li>
-</ul>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="summary-of-changes">Summary of Changes</h2>
-<div class="sectionbody">
-<div class="ulist">
-<ul>
-<li>
-<p>Implement the Dynamic context stack (stack of RuntimeData) in UState</p>
-</li>
-<li>
-<p>Modify unparsers to maintain dynamic context stack, pushing and popping as model-groups are processed.</p>
-</li>
-<li>
-<p>Implement new Runtime 1 classes for subtypes derived from SCRD</p>
-</li>
-<li>
-<p>Implement construction of these classes using new resolvers.</p>
-</li>
-<li>
-<p>Implement new DSOM classes</p>
-</li>
-<li>
-<p>Implement algorithms on ElementSchemaChild to determine sets of possibly following infoset events.</p>
-</li>
-</ul>
-</div>
-</div>
-</div>
-  </div>
-</div>
-
-
-      <footer>
-        <footer class="site-footer">
-    <div class="wrapper">
-        <div class="footer-col-wrapper" style="font-size: .85em;">
-            <hr>
-            <div class="container">
-                <div class="row">
-                    <div class="col-xs-3" style="margin-top: 15px;">
-                        <a href="https://incubator.apache.org"><img src="/assets/themes/apache/img/incubator_feather_egg_logo.png"
-                                                                   alt="Apache Incubator" style="width:100%;"/></a>
-                    </div>
-                    <div class="col-xs-9">
-                        Apache Daffodil is an effort undergoing <a href="https://incubator.apache.org/index.html">Incubation</a>
-                        at The Apache Software Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly
-                        accepted projects until a further review indicates that the infrastructure, communications, and decision
-                        making process have stabilized in a manner consistent with other successful ASF projects. While incubation
-                        status is not necessarily a reflection of the completeness or stability of the code, it does indicate that
-                        the project has yet to be fully endorsed by the ASF.
-                    </div>
-                </div>
-            </div>
-            <hr>
-            <div>
-                <div style="text-align: center;">
-                    Copyright &copy; 2019 <a href="https://www.apache.org">The Apache Software Foundation</a>.
-                    Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
-                    2.0</a>.
-                    <br>
-                    Apache, the Apache Incubator project logo, Apache Daffodil, Daffodil, and the
-                    Apache Daffodil logo are trademarks of The Apache Software Foundation.
-                </div>
-            </div>
-        </div>
-    </div>
-</footer>
-
-      </footer>
-    </div>
-
-    <script src="/assets/themes/apache/jquery/jquery-2.1.1.min.js"></script>
-
-    <script src="/assets/themes/apache/bootstrap/js/bootstrap.min.js"></script>
-
-
-  </body>
-</html>
-
diff --git a/content/images/dsom-sequence-child-classes.png b/content/images/dsom-sequence-child-classes.png
deleted file mode 100644
index baaaf7f..0000000
Binary files a/content/images/dsom-sequence-child-classes.png and /dev/null differ
diff --git a/content/images/runtime1-sequence-child-classes.png b/content/images/runtime1-sequence-child-classes.png
deleted file mode 100644
index 098ef89..0000000
Binary files a/content/images/runtime1-sequence-child-classes.png and /dev/null differ
diff --git a/content/tutorials/test1.tutorial.tdml.xml b/content/tutorials/exampleTDMLTutorial.tutorial.tdml.xml
similarity index 100%
rename from content/tutorials/test1.tutorial.tdml.xml
rename to content/tutorials/exampleTDMLTutorial.tutorial.tdml.xml