Re: [Cbor] Some comments on cbor-cddl-05 and cbor-7049bis-02

Carsten Bormann <cabo@tzi.org> Wed, 12 September 2018 14:56 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 C60DF130DC6 for <cbor@ietfa.amsl.com>; Wed, 12 Sep 2018 07:56:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 1NmjJlf2bS1u for <cbor@ietfa.amsl.com>; Wed, 12 Sep 2018 07:56:33 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0F243130DD8 for <cbor@ietf.org>; Wed, 12 Sep 2018 07:56:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [134.102.201.11]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id w8CEuT5s025892; Wed, 12 Sep 2018 16:56:29 +0200 (CEST)
Received: from client-0131.vpn.uni-bremen.de (client-0131.vpn.uni-bremen.de [134.102.107.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 429PxT1BzLzDXlp; Wed, 12 Sep 2018 16:56:29 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <6691D9B4-08D0-47D1-8709-F9ED1DFCF21F@ericsson.com>
Date: Wed, 12 Sep 2018 16:56:28 +0200
Cc: "cbor@ietf.org" <cbor@ietf.org>
X-Mao-Original-Outgoing-Id: 558456986.90047-7e7af94927afa13119c00bebe1134a80
Content-Transfer-Encoding: quoted-printable
Message-Id: <28367D43-F916-4885-869C-A46F70B5F11A@tzi.org>
References: <D7D9E583-B019-4F96-B71E-C703887557D7@ericsson.com> <6691D9B4-08D0-47D1-8709-F9ED1DFCF21F@ericsson.com>
To: John Mattsson <john.mattsson@ericsson.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/u2IxwDg-dz5cW6-fIvSqo-pQ4kQ>
Subject: Re: [Cbor] Some comments on cbor-cddl-05 and cbor-7049bis-02
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, 12 Sep 2018 14:56:35 -0000

Hi John,

I’m still processing all your useful comments from the last message.
Here are quick answers for the new points:

On Sep 12, 2018, at 16:43, John Mattsson <john.mattsson@ericsson.com> wrote:
> 
> Hi,
> 
> Two additional comments
> 
> /John
> 
> --------------------------------------------------
> 
> Should’t [], {}, and () be in Table 1?

These are not “operators” in the traditional sense.
But it might sense to include them in the table just for completeness.

> --------------------------------------------------
> 
> Would it be possible to allow the << >> notation also in CCDL? The CDDL notation for wrapping things in byte strings are very different from the diagnostic notation. Realising which diagnostic notation expressions matches bstr .cbor type1 and bstr .cborseq type2 are not obvious. I think that allowing the << >> notation in CDDL would make it easier for users of CDDL (e.g. writers of internet-drafts and developers). 
> 
> def1 = << int >>
> 
> def2 = <<
>   x: float,
>   y: float,
>>> 

This would definitely be possible.
There is a little snag in that it wouldn’t be clear whether a group or a type would be used, but we could go for the semantics of .cborseq always and just make use of the fact that when a group always creates a single entry the semantics is the same as for .cbor.
(The existing controls also allow the left hand side type to add some restrictions on the byte string, e.g., on their size; the new notation would not provide that capability.)

The reason we were happy to just introduce .cbor/.cborseq was that adding new syntax is more heavy weight for the spec; that new syntax as well as new matching rules would have been a larger change than just using the existing extension point (controls).  If people do agree this syntactic sugar is good, we could shoehorn it in.  (We are in IESG processing already, so a change of this size might create some delay.)

Grüße, Carsten