Re: [Cbor] Suresh Krishnan's No Objection on draft-ietf-cbor-cddl-06: (with COMMENT)

Carsten Bormann <cabo@tzi.org> Wed, 21 November 2018 20:34 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 2CA19130DC7; Wed, 21 Nov 2018 12:34:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, 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 z7o3aQR1WjbU; Wed, 21 Nov 2018 12:34:20 -0800 (PST)
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 39B55130DC5; Wed, 21 Nov 2018 12:34:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost2.informatik.uni-bremen.de [IPv6:2001:638:708:30c8:406a:91ff:fe74:f2b7]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id wALKYAA6020505; Wed, 21 Nov 2018 21:34:16 +0100 (CET)
Received: from [192.168.217.114] (p54A6CE66.dip0.t-ipconnect.de [84.166.206.102]) (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 430Z6p2fB4z1Bqf; Wed, 21 Nov 2018 21:34:10 +0100 (CET)
Content-Type: multipart/alternative; boundary="Apple-Mail=_1B87B330-3C11-437F-B247-017B090BA316"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <154281081024.11490.7408989329662108022.idtracker@ietfa.amsl.com>
Date: Wed, 21 Nov 2018 21:34:09 +0100
Cc: The IESG <iesg@ietf.org>, cbor@ietf.org, Barry Leiba <barryleiba@computer.org>, cbor-chairs@ietf.org, draft-ietf-cbor-cddl@ietf.org
X-Mao-Original-Outgoing-Id: 564525244.8497601-b4bad3a9f548a6e2c0cb9b26856f5305
Message-Id: <1D4773AD-0BC0-4ADB-890A-D1BE74B7BD2D@tzi.org>
References: <154281081024.11490.7408989329662108022.idtracker@ietfa.amsl.com>
To: Suresh Krishnan <suresh@kaloom.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/CnYk7TJSkg56I2TbhYk-NEiCkwM>
Subject: Re: [Cbor] Suresh Krishnan's No Objection on draft-ietf-cbor-cddl-06: (with COMMENT)
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, 21 Nov 2018 20:34:23 -0000

Hi Suresh,

> On Nov 21, 2018, at 15:33, Suresh Krishnan <suresh@kaloom.com <mailto:suresh@kaloom.com>> wrote:
> 
> Suresh Krishnan has entered the following ballot position for
> draft-ietf-cbor-cddl-06: No Objection
> 
> When responding, please keep the subject line intact and reply to all
> email addresses included in the To and CC lines. (Feel free to cut this
> introductory paragraph, however.)
> 
> 
> Please refer to https://www.ietf.org/iesg/statement/discuss-criteria.html <https://www.ietf.org/iesg/statement/discuss-criteria.html>
> for more information about IESG DISCUSS and COMMENT positions.
> 
> 
> The document, along with other ballot positions, can be found here:
> https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl/ <https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl/>
> 
> 
> 
> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
> 
> * Section 3.8.1
> 
> Looks like there is an off-by-one error here. Shouldn't
> 
> BYTES_N == 256**N
> 
> be
> 
> BYTES_N == 256**N-1

That would be correct if the line said 

   “0..BYTES_N”, where BYTES_N == 256**N-1.

But it says:

   "0...BYTES_N”, where BYTES_N == 256**N.

where “…” is the half-closed range operator that is closed on the left and open on the right, i.e., does not include the upper bound in the interval (“..” is closed on both sides and therefore does).
Please see Section 2.2.2.1 about the two range operators “..” and “…”.

(And, yes, I’m now aware that Swift uses “...” for the closed and “..<“ for the half-closed range operator (originally the latter even was “..”, the other way around from CDDL…).  Nice, but we nailed down those for CDDL quite a while ago, based on the range operators in Ruby, which are in turn somewhat, but not quite, based on those in Perl, which of course were informed by subranges in Pascal, where “..” also is a closed range.  Maybe we can add “..<“ for more visual attention in CDDL 2.0, keeping “...” to also mean half-closed.)

Grüße, Carsten

PS.: Yes, I admit I constructed the example to induce attentive readers to do a double-take, so they look up the two range operators again.  
Apparently, it kind of almost worked :-)