You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 29
Next »
Principles of Operation
Please see the package documentation for the dsom package in the code base (dsom folder, package.scala file), as that is where the primary motivational documentation is.
In general, Daffodil converts the DFDL schema into a DSOM tree/graph. The DSOM tree is used for much semantic checking, but it is the generator for a corresponding Gram (short for Grammar) tree the nodes of which correspond to combinators and terminals of a data syntax grammar. This grammar provides a simple framework for localized optimizations. Ultimately the Gram tree/graph generates the processors - parser and unparser - which are themselves trees of objects derived from the Parser and Unparser base traits/classes.
So really it's a 4 step process DFDL XSD → DSOM → Gram → Parser/Unparser.
UML Class Diagram
This diagram shows only the primary traits and classes of DSOM. Threre are many other components, and a wide variety of mixin traits that enable code sharing.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6Ik1pa2UgQmVja2VybGUiLCJvdXRwdXRUeXBlIjoiYmxvY2siLCJsYXN0TW9kaWZpZXJOYW1lIjoiTWlrZSBCZWNrZXJsZSIsImxhbmd1YWdlIjoiZW4iLCJkaWFncmFtRGlzcGxheU5hbWUiOiIiLCJzRmlsZUlkIjoiIiwiYXR0SWQiOiI3NDY4NjY3MiIsImRpYWdyYW1OYW1lIjoiRFNPTS1wcmltYXJ5LWNsYXNzZXMiLCJhc3BlY3QiOiIiLCJsaW5rcyI6ImF1dG8iLCJjZW9OYW1lIjoiREZETCBTY2hlbWEgT2JqZWN0IE1vZGVsIChEU09NKSB3aXRoIFVNTCIsInRic3R5bGUiOiJ0b3AiLCJjYW5Db21tZW50IjpmYWxzZSwiZGlhZ3JhbVVybCI6IiIsImNzdkZpbGVVcmwiOiIiLCJib3JkZXIiOnRydWUsIm1heFNjYWxlIjoiMSIsIm93bmluZ1BhZ2VJZCI6NzQ2ODY2ODIsImVkaXRhYmxlIjpmYWxzZSwiY2VvSWQiOjE1ODg2MjU5NiwicGFnZUlkIjoiIiwibGJveCI6dHJ1ZSwic2VydmVyQ29uZmlnIjp7ImVtYWlscHJldmlldyI6IjEifSwib2RyaXZlSWQiOiIiLCJyZXZpc2lvbiI6MzcsIm1hY3JvSWQiOiIyMTI3NDYxNC1hNDAxLTQ5MGEtODgyZS02Y2E0NTc0ZDkxODIiLCJwcmV2aWV3TmFtZSI6IkRTT00tcHJpbWFyeS1jbGFzc2VzLnBuZyIsImxpY2Vuc2VTdGF0dXMiOiJPSyIsInNlcnZpY2UiOiIiLCJpc1RlbXBsYXRlIjoiIiwid2lkdGgiOiIyNTQ4Iiwic2ltcGxlVmlld2VyIjpmYWxzZSwibGFzdE1vZGlmaWVkIjoxNjI3NDc2MzgyMDAwLCJleGNlZWRQYWdlV2lkdGgiOmZhbHNlLCJvQ2xpZW50SWQiOiIifQ==
The above shows now fact that each def-ref relationship is many (refs) to 1 (def) and is bi-directional in that the "backpointer" is to multiple refs, from a def, not a single one.
Shading for concrete Term subclasses.
This next diagram shows the simpleType and complexType system.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6Ik1pa2UgQmVja2VybGUiLCJvdXRwdXRUeXBlIjoiYmxvY2siLCJsYXN0TW9kaWZpZXJOYW1lIjoiTWlrZSBCZWNrZXJsZSIsImxhbmd1YWdlIjoiZW4iLCJkaWFncmFtRGlzcGxheU5hbWUiOiIiLCJzRmlsZUlkIjoiIiwiYXR0SWQiOiIxNDU3MjUwODciLCJkaWFncmFtTmFtZSI6IkVsZW1lbnRzLCBUeXBlcywgR3JvdXBzIiwiYXNwZWN0IjoiIiwibGlua3MiOiJhdXRvIiwiY2VvTmFtZSI6IkRGREwgU2NoZW1hIE9iamVjdCBNb2RlbCAoRFNPTSkgd2l0aCBVTUwiLCJ0YnN0eWxlIjoidG9wIiwiY2FuQ29tbWVudCI6ZmFsc2UsImRpYWdyYW1VcmwiOiIiLCJjc3ZGaWxlVXJsIjoiIiwiYm9yZGVyIjp0cnVlLCJtYXhTY2FsZSI6IjEiLCJvd25pbm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