<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.27 (Ruby 3.2.1) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bormann-cbor-cddl-modules-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="CDDL Module Structure">CDDL Module Structure</title>
    <seriesInfo name="Internet-Draft" value="draft-bormann-cbor-cddl-modules-00"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2023" month="March" day="10"/>
    <area>ART</area>
    <workgroup>CBOR</workgroup>
    <keyword>Concise Data Definition Language</keyword>
    <abstract>
      <t>At the time of writing,
the Concise Data Definition Language (CDDL) is defined by
RFC 8610 and RFC 9165.
The latter has used the extension point provided in RFC 8610,
the <em>control operator</em>.</t>
      <t>As CDDL is being used in larger projects, the need for corrections
and additional features has become known that cannot be easily
mapped into this single extension point.
Hence, there is a need for evolution of the base CDDL
specification itself.</t>
      <t>The present document defines a backward- and forward-compatible
way to add a module structure to CDDL.</t>
      <t><cref anchor="status">Previous versions of the changes in this document were part
of draft-bormann-cbor-cddl-2-draft and previously
draft-bormann-cbor-cddl-freezer.
This submission extracts out the functionality that is ready
for WG adoption and further WG work.</cref></t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://cbor-wg.github.io/cddl-modules/"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-bormann-cbor-cddl-modules/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        CBOR Working Group mailing list (<eref target="mailto:cbor@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/cbor/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/cbor/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cbor-wg/cddl-modules"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>At the time of writing,
the Concise Data Definition Language (CDDL) is defined by
RFC 8610 and RFC 9165.
The latter has used the extension point provided in RFC 8610,
the <em>control operator</em>.</t>
      <t>As CDDL is being used in larger projects, the need for corrections
and additional features has become known that cannot be easily
mapped into this single extension point.
Hence, there is a need for evolution of the base CDDL
specification itself.</t>
      <t>The present document defines a backward- and forward-compatible
way to add a module structure to CDDL.</t>
      <t><cref anchor="status_1">Previous versions of the changes in this document were part
of draft-bormann-cbor-cddl-2-draft and previously
draft-bormann-cbor-cddl-freezer.
This submission extracts out the functionality that is ready
for WG adoption and further WG work.</cref></t>
      <t><cref anchor="seealso">Proposals for additional functionality that needs more
work can be found in <xref target="I-D.bormann-cbor-cddl-2-draft"/>.  Proposals for other
additions to the CDDL specification base are in <xref target="I-D.draft-bormann-cbor-cddl-freezer"/>.</cref></t>
      <t>The present document is intended to be the specification
base of what has colloquially been called CDDL 2.0, a term hat is now
focusing on module structure (other documents make up what is now
called CDDL 1.1).
Additional documents describe further work on CDDL.</t>
      <section anchor="conventions-and-definitions">
        <name>Conventions and Definitions</name>
        <t>The Terminology from <xref target="RFC8610"/> applies.</t>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="module-superstructure">
      <name>Module superstructure</name>
      <dl>
        <dt><em>Compatibility</em>:</dt>
        <dd>
          <t>bidirectional (both backward and forward)</t>
        </dd>
      </dl>
      <t>Originally, CDDL was used for small data models that could be
expressed in a few lines.  As the size of data models that need to be
expressed in CDDL has increased, the need to modularize and re-use
components is increasing.</t>
      <t>CDDL 1.0 has been designed with a crude form of composition:
Concatenating a number of CDDL snippets creates a valid CDDL data
model unless there is a name collision (identical redefinition is
allowed to facilitate this approach).
With larger models, managing the name space to avoid collisions
becomes more pressing.</t>
      <t>The knowledge which CDDL snippets need to be concatenated in order to
obtain the desired data model lives entirely outside the CDDL snippets
in CDDL 1.0.
In CDDL 2.0, rules are packaged as modules and referenced from other
modules, providing methods for control of namespace pollution.</t>
      <t>Further work may be expended on
unambiguous referencing into evolving specifications ("versioning")
and selection of alternatives (as was emulated with snippets in
<xref section="11" sectionFormat="of" target="RFC8428"/>.  Note that one approach for expressing
variants is demonstrated in <xref target="useful"/> based on <xref section="4" sectionFormat="of" target="RFC9165"/>).
See also <xref section="4" sectionFormat="of" target="I-D.bormann-cbor-cddl-2-draft"/>.</t>
      <section anchor="compatibility">
        <name>Compatibility</name>
        <t>To achieve the module structure in a way that is friendly to
existing environments that operate with CDDL 1.0 snippets and CDDL 1.0
implementations, we add a super-syntax (similar to the way pragmas
are often added to a language), by carrying them in what is
parsed as comments in CDDL 1.0.</t>
        <t>This enables each module source file to be valid CDDL\ 1 (but
possibly needing to add some rule definitions imported from other
source files).</t>
      </section>
      <section anchor="namespacing">
        <name>Namespacing</name>
        <t>When importing rules from other modules, there is the potential for
name collisions.  This is exacerbated when the modules evolve, which
may lead to the introduction of a name into an imported module that is
also used (likely in a different way) in the importing module.</t>
        <t>To be able to manage names in such a way that collisions can be
avoided, we introduce means to prepend a prefix to the names of rules
being imported: the "as" clause.</t>
      </section>
      <section anchor="directives-the-module">
        <name>"Directives", the "module"</name>
        <t>This specification introduces <em>directives</em> into CDDL.
A single CDDL file becomes a <em>module</em> by processing the (zero or more)
directives in it.</t>
        <t>The semantics of the module are independent of the module(s) using it,
however, importing a module may involve transforming its rule names
into a new namespace (<xref target="namespacing"/>).</t>
        <t>Directives look like comments in CDDL 1, so they do not interfere
with forward compatibility.</t>
        <t>Lines starting with the prefix <tt>;#</tt> are parsed as directives in CDDL 2.0.</t>
      </section>
      <section anchor="naming-and-finding-modules">
        <name>Naming and Finding Modules</name>
        <t>We assume that module names are filenames taken from one of several
source directories available to the CDDL 2.0 processor via the
environment.
This avoids the need to nail down brittle pathnames or (partial?) URIs
into the CDDL files.</t>
        <t>The exact way how these source directories and possibly a precedence
between them are established is intentionally not fully defined in
this specification; it is expected that this will be specified in the
context of the models just as the way they are intended to be used
will be.  (A more formal structure may follow later.)</t>
        <t>In the CDDL 2.0 Tool described in <xref target="cddlc-tool"/>, the set of sources is
determined from an environment variable, <tt>CDDL_INCLUDE_PATH</tt>, which is
modeled after usual command-line search paths.
It is a colon-separated list of pathnames to directories, with one
special feature: an empty element points to the tool's own collection.
This collection contains fragments of extracted CDDL from published
RFCs, using names such as <tt>rfc9052</tt>.</t>
        <t>(Future versions might augment this with Web extractors and/or ways to
extract CDDL modules from github and from Internet-Drafts; see
<xref section="A.2" sectionFormat="of" target="I-D.bormann-cbor-cddl-2-draft"/> for some design considerations.)</t>
        <t>The default <tt>CDDL_INCLUDE_PATH</tt> is:</t>
        <artwork><![CDATA[
.:
]]></artwork>
        <t>That is: files are found in the current directory (<tt>.</tt>) and, if not
found there, cddlc’s collection.</t>
        <t>In the examples following, a cddlc command line will be shown
(starting with an isolated <tt>$</tt> sign) with the CDDL 2.0 input; the
resulting CDDL 1 will be shown separately.</t>
      </section>
      <section anchor="directives">
        <name>Basic Set of Directives</name>
        <t>Two groups of directives are defined at this point:</t>
        <ul spacing="normal">
          <li>
            <tt>include</tt>, which includes all the rules from a module (which
includes the ones imported/included there, transitively), or
specific explicitly selected rules (clause ending in "from");</li>
          <li>
            <tt>import</tt>, which includes only those rules from the module that are
 referenced, implicitly or explicitly (clause ending in "from"), including the
 rules that are referenced from these rules, transitively.</li>
        </ul>
        <t>The <tt>include</tt> function is more useful for composing a single model
from parts controlled by one author, while the <tt>import</tt> function is
more about treating a module as a library:</t>
        <t>The way an <tt>import</tt> works is shown by this simple example:</t>
        <artwork><![CDATA[
$ cddlc -2tcddl -
start = COSE_Key
;# import rfc9052

]]></artwork>
        <t>This results in the following CDDL 1.0 specification:</t>
        <sourcecode type="cddl"><![CDATA[
start = COSE_Key
COSE_Key = {
  1 => tstr / int,
  ? 2 => bstr,
  ? 3 => tstr / int,
  ? 4 => [+ tstr / int],
  ? 5 => bstr,
  * label => values,
}
label = int / tstr
values = any

]]></sourcecode>
        <t>This is appropriate for using libraries that are well known to the
importing specification.
However, if it is not acceptable that the library can pollute the
namespace of the importing module, the import directive can specify a
namespace prefix ("as" clause):</t>
        <artwork><![CDATA[
$ cddlc -2tcddl -
start = cose.COSE_Key
;# import rfc9052 as cose

]]></artwork>
        <t>This results in the following CDDL 1.0 specification:</t>
        <sourcecode type="cddl"><![CDATA[
start = cose.COSE_Key
cose.COSE_Key = {
  1 => tstr / int,
  ? 2 => bstr,
  ? 3 => tstr / int,
  ? 4 => [+ tstr / int],
  ? 5 => bstr,
  * cose.label => cose.values,
}
cose.label = int / tstr
cose.values = any

]]></sourcecode>
        <t>Note how the imported names are prefixed with <tt>cose.</tt> as specified in
the import directive, but CDDL prelude (<xref section="D" sectionFormat="of" target="RFC8610"/>) names
such as <tt>tstr</tt> and <tt>any</tt> are not.</t>
      </section>
      <section anchor="explicit-selection-of-names">
        <name>Explicit selection of names</name>
        <t>Both <tt>import</tt> and <tt>include</tt> directives can be augmented by an explicit
mentioning of rule names (clause ending in "from").</t>
        <section numbered="false" anchor="include">
          <name><tt>include</tt></name>
          <t>Starting with <tt>include</tt>:</t>
          <artwork><![CDATA[
$ cddlc -2tcddl -
mydata = {* label => values}
;# include label, values from rfc9052

]]></artwork>
          <t>With <tt>include</tt>,
only exactly the rules mentioned are included:</t>
          <sourcecode type="cddl"><![CDATA[
mydata = {* label => values}
label = int / tstr
values = any

]]></sourcecode>
          <t>The module from which rules are explicitly imported can be namespaced:</t>
          <artwork><![CDATA[
$ cddlc -2tcddl -
mydata = {* label => values}
;# include cose.label, cose.values from rfc9052 as cose

]]></artwork>
          <t>Again, only exactly the rules mentioned are included:</t>
          <sourcecode type="cddl"><![CDATA[
mydata = {* label => values}
cose.label = int / tstr
cose.values = any

]]></sourcecode>
        </section>
        <section numbered="false" anchor="import">
          <name><tt>import</tt></name>
          <t>Both examples would work exactly the same with <tt>import</tt>, as the
included rules do not reference anything else from the included
module.</t>
          <t>An import however also draws in the transitive closure of the rules
referenced:</t>
          <artwork><![CDATA[
$ cddlc -2tcddl -
mydata = {Fritz: cose.empty_or_serialized_map}
;# import cose.empty_or_serialized_map from rfc9052 as cose

]]></artwork>
          <t>The transitive closure of the rules mentioned is included:</t>
          <sourcecode type="cddl"><![CDATA[
mydata = {"Fritz" => cose.empty_or_serialized_map}
cose.empty_or_serialized_map = bstr .cbor cose.header_map / bstr .size 0
cose.header_map = {
  cose.Generic_Headers,
  * cose.label => cose.values,
}
cose.Generic_Headers = (
  ? 1 => int / tstr,
  ? 2 => [+ cose.label],
  ? 3 => tstr / int,
  ? 4 => bstr,
  ? (5 => bstr // 6 => bstr),
  )
cose.label = int / tstr
cose.values = any

]]></sourcecode>
          <t>The <tt>import</tt> statement can also request an alias for an imported name:</t>
          <artwork><![CDATA[
$ cddlc -2tcddl -
mydata = {Fritz: cose.empty_or_serialized_map}
;# import empty_or_serialized_map from rfc9052 as cose

]]></artwork>
          <t>Note how an additional rule provides an alias for
<tt>empty_or_serialized_map</tt> that does not have the namespace prefix:</t>
          <sourcecode type="cddl"><![CDATA[
mydata = {"Fritz" => cose.empty_or_serialized_map}
empty_or_serialized_map = cose.empty_or_serialized_map
cose.empty_or_serialized_map = bstr .cbor cose.header_map / bstr .size 0
cose.header_map = {
  cose.Generic_Headers,
  * cose.label => cose.values,
}
cose.Generic_Headers = (
  ? 1 => int / tstr,
  ? 2 => [+ cose.label],
  ? 3 => tstr / int,
  ? 4 => bstr,
  ? (5 => bstr // 6 => bstr),
  )
cose.label = int / tstr
cose.values = any

]]></sourcecode>
        </section>
      </section>
      <section anchor="tool-support-for-command-line-control">
        <name>Tool Support for Command-Line Control</name>
        <t>Tools may provide a convenient way to initiate the processing of
directives from the command line.</t>
        <t>A tool may provide a way to root the module tree from the command line:</t>
        <artwork><![CDATA[
$ cddlc -2tcddl -icose=rfc9052 -scose.COSE_Key

]]></artwork>
        <t>The command line argument <tt>-icose=rfc9052</tt> is a shortcut for</t>
        <artwork><![CDATA[
;# import rfc9052 as cose
]]></artwork>
        <t>Together with the start rule name, <tt>cose.COSE_Key</tt>, this results in the following CDDL 1.0 specification:</t>
        <sourcecode type="cddl"><![CDATA[
$.start.$ = cose.COSE_Key
cose.COSE_Key = {
  1 => tstr / int,
  ? 2 => bstr,
  ? 3 => tstr / int,
  ? 4 => [+ tstr / int],
  ? 5 => bstr,
  * cose.label => cose.values,
}
cose.label = int / tstr
cose.values = any

]]></sourcecode>
        <t>In other words, the module synthesized from the command line had an
empty CDDL file, which therefore was not provided (no <tt>-</tt> on the
command line).</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The module structure specified in this document is not believed to
create additional security considerations beyond the general security
considerations in <xref section="5" sectionFormat="of" target="RFC8610"/>.</t>
      <t>Implementations that employ the module structure defined in this
document need to ascertain the provenance of the modules they combine
into the CDDL models they employ operationally.
This specification does not define how the source directories accessed
via the CDDL_INCLUDE_PATH are populated; this process needs to undergo
the same care and scrutiny as any other introduction of source code
into a build environment.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz">
              <organization/>
            </author>
            <author fullname="C. Vigano" initials="C." surname="Vigano">
              <organization/>
            </author>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049).  Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="RFC9165">
          <front>
            <title>Additional Control Operators for the Concise Data Definition Language (CDDL)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <date month="December" year="2021"/>
            <abstract>
              <t>The Concise Data Definition Language (CDDL), standardized in RFC 8610, provides "control operators" as its main language extension point.</t>
              <t>The present document defines a number of control operators that were not yet ready at the time RFC 8610 was completed: , , and  for the construction of constants; / for including ABNF (RFC 5234 and RFC 7405) in CDDL specifications; and for indicating the use of a non-basic feature in an instance.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9165"/>
          <seriesInfo name="DOI" value="10.17487/RFC9165"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="I-D.draft-bormann-cbor-cddl-freezer">
          <front>
            <title>A feature freezer for the Concise Data Definition Language (CDDL)</title>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <date day="24" month="October" year="2022"/>
            <abstract>
              <t>   In defining the Concise Data Definition Language (CDDL), some
   features have turned up that would be nice to have.  In the interest
   of completing this specification in a timely manner, the present
   document was started to collect nice-to-have features that did not
   make it into the first RFC for CDDL, RFC 8610, or the specifications
   exercising its extension points, such as RFC 9165.

   Significant parts of this draft have now moved over to the CDDL 2.0
   project, described in draft-bormann-cbor-cddl-2-draft.  The remaining
   items in this draft are not directly related to the CDDL 2.0 effort.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-bormann-cbor-cddl-freezer-10"/>
        </reference>
        <reference anchor="I-D.bormann-cbor-cddl-2-draft">
          <front>
            <title>CDDL 2.0 -- a draft plan</title>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <date day="5" month="March" year="2023"/>
            <abstract>
              <t>   The Concise Data Definition Language (CDDL) today is defined by
   RFC 8610 and RFC 9165.  The latter (as well as some more application
   specific specifications such as RFC 9090) have used the extension
   point provided in RFC 8610, the control operator.

   As CDDL is used in larger projects, feature requirements become known
   that cannot be easily mapped into this single extension point.
   Hence, there is a need for evolution of the base CDDL specification
   itself.

   The present document provides a roadmap towards a "CDDL 2.0".  It is
   based on draft-bormann-cbor-cddl-freezer, but is more selective in
   what potential features it takes up and more detailed in their
   discussion.  It is intended to serve as a basis for prototypical
   implementations of CDDL 2.0.  What specific documents spawn from the
   present one or whether this document is evolved into a single
   CDDL 2.0 specification.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-bormann-cbor-cddl-2-draft-01"/>
        </reference>
        <reference anchor="useful" target="https://github.com/cbor-wg/cddl/wiki/Useful-CDDL">
          <front>
            <title>Useful CDDL</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="cddlc" target="https://github.com/cabo/cddlc">
          <front>
            <title>CDDL conversion utilities</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="RFC8428">
          <front>
            <title>Sensor Measurement Lists (SenML)</title>
            <author fullname="C. Jennings" initials="C." surname="Jennings">
              <organization/>
            </author>
            <author fullname="Z. Shelby" initials="Z." surname="Shelby">
              <organization/>
            </author>
            <author fullname="J. Arkko" initials="J." surname="Arkko">
              <organization/>
            </author>
            <author fullname="A. Keranen" initials="A." surname="Keranen">
              <organization/>
            </author>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <date month="August" year="2018"/>
            <abstract>
              <t>This specification defines a format for representing simple sensor measurements and device parameters in Sensor Measurement Lists (SenML).  Representations are defined in JavaScript Object Notation (JSON), Concise Binary Object Representation (CBOR), Extensible Markup Language (XML), and Efficient XML Interchange (EXI), which share the common SenML data model.  A simple sensor, such as a temperature sensor, could use one of these media types in protocols such as HTTP or the Constrained Application Protocol (CoAP) to transport the measurements of the sensor or to be configured.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8428"/>
          <seriesInfo name="DOI" value="10.17487/RFC8428"/>
        </reference>
      </references>
    </references>
    <section anchor="abnf-specification">
      <name>ABNF Specification</name>
      <t>TO DO</t>
      <sourcecode type="abnf"><![CDATA[
directive = ";#" RS (%s"import" / %s"include") RS [from-clause]
                    filename [as-clause] CRLF
from-clause = 1*(id [","] RS) %s"from" RS
as-clause = RS %s"as" RS id
filename = 1*("-" / "." / %x30-39 / %x41-5a / "_" / %x61-7a)
id = ("$" / %x40-5a / "_" / %x61-7a)
     *("$" / %x30-39 / %x40-5a / "_" / %x61-7a)
RS = 1*WS
WS = SP
SP = %x20
CRLF = %x0A / %x0D.0A
]]></sourcecode>
    </section>
    <section anchor="cddlc-tool">
      <name>A CDDL 2.0 Tool</name>
      <t>This appendix is for information only.</t>
      <t>A rough CDDL 2.0 tool is available <xref target="cddlc"/>.  It can process CDDL 2.0
models into CDDL 1 models that can then be processed by the CDDL
tool described in <xref section="F" sectionFormat="of" target="RFC8610"/>.</t>
      <t>A typical command line involving both tools might be:</t>
      <artwork><![CDATA[
cddlc -2 -tcddl mytestfile.cddl | cddl - gp 10
]]></artwork>
      <t>Install on a system with a modern Ruby (Ruby version ≥ 3.0) via:</t>
      <artwork><![CDATA[
gem install cddlc
]]></artwork>
      <t>The present document assumes the use of <tt>cddlc</tt> version 0.1.6.</t>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1bzXIbSXK+11OUodkwqAVAgqK0I8jaWYiURgxrRFmkQrGW
ZaHQKIC1anRju7oJYWhO7NVnn3zbg/0i6zeZJ/GXmdV/ICnNenZ9cFgRM0J3
109WVuaXX2aV+v2+uhjpe0rlLo/tSHcOj45e6O/SWRFbfZpnRZQXme0oM51m
9uL272qWRolZYoRZZuZ5f5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