Re: [Cbor] CDDL Module Design

Carsten Bormann <cabo@tzi.org> Wed, 01 July 2020 06:31 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BED5D3A084A for <cbor@ietfa.amsl.com>; Tue, 30 Jun 2020 23:31:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HGUMTgHiFzWg for <cbor@ietfa.amsl.com>; Tue, 30 Jun 2020 23:31:47 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 180663A084B for <cbor@ietf.org>; Tue, 30 Jun 2020 23:31:46 -0700 (PDT)
Received: from [172.16.42.112] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 49xWbP1JcyzyWw; Wed, 1 Jul 2020 08:31:45 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <58F93C93-9EC6-465E-B421-12AA69F17CAF@tzi.org>
Date: Wed, 01 Jul 2020 08:31:44 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 615277904.801942-b67c6fe1bdc1d374c5e1a7e3514c59fa
Content-Transfer-Encoding: quoted-printable
Message-Id: <5A3152DB-7A16-4831-8508-FD4AEF2F415B@tzi.org>
References: <03c701d64f41$e1763fa0$a462bee0$@augustcellars.com> <58F93C93-9EC6-465E-B421-12AA69F17CAF@tzi.org>
To: Jim Schaad <ietf@augustcellars.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/_5i3cHPpuu2e2YOw6LUJocXuMkk>
Subject: Re: [Cbor] CDDL Module Design
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Jul 2020 06:31:50 -0000

So here are a few terms (and items of thought) that I would like to propose as a ground structure:

Symbols: Rule names as defined in RFC 8610.  This namespace is used within a specification and should stay reasonably clean of considerations on where the name came from.  E.g., a CDDL specification today can use symbols from prelude and from itself.

External names: Names that go into a larger name space, some of which may be global.  A CDDL spec can import definitions associated with an external name (mapping that into symbols local to the spec) and export into (make its symbols available in) the global namespace.  

Global namespace: external names that are curated in such a way that there are no conflicts.  It probably makes sense to allow for “ecosystem namespaces”, i.e., a way to partition off subspaces of the global namespace that can be used in an SDO without the need for coordination with others.

Revision: a specific instant in the progression of a specification.  Revisions may or may not semantically differ (a new revision could have a better copyright statement, a new license, better acknowledgements, reordered rules, etc. without any semantic implications).

Module reference: a name that, at a particular point in time, identifies a set of specifications that make up a module (if that term makes sense).  Module references are intended to allow for evolution of the modules; they may also be frozen to specific revisions (which doesn’t allow for bug fixing).  Module references need to cope with the fact that a specific implementation may be bound to a state of the module that is earlier in time than the one considered most recent by a contributing entity; whether that state is compatible with the desired use of the module will have to be expressed in the module reference (e.g., by using feature identifiers).

Feature name: Name for a (potentially upwardly compatible, potentially not) state of a module that incorporates certain additions/changes.  A feature name can take the form of a version (≠ revision), or it can be more granular.

Semantic name: a name that interfaces with the world outside CDDL, e.g., an RDF class name.  These often will be URIs.  Often, a symbol in a specification will be annotated with a semantic name; this is of no consequence to the structural semantics of CDDL, but might turn up in a post-validation instance.

(It is not clear to me whether there needs to be a shortcut between semantic names and external names — I’d like to keep them separate for now.)

Note that keys (the name part of a name/value pair) in groups are often used as abbreviated semantic names (whether they are ignored at the CDDL level as in arrays or &-choices, or actually used as map keys).  There probably needs to be some way to map these to fully fleshed out semantic names.  (Note that these keys often are written as barewords, so they may look like symbols, but aren’t!)

Grüße, Carsten