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

John Mattsson <john.mattsson@ericsson.com> Mon, 10 September 2018 21:07 UTC

Return-Path: <john.mattsson@ericsson.com>
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 34700130DE1 for <cbor@ietfa.amsl.com>; Mon, 10 Sep 2018 14:07:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.311
X-Spam-Level:
X-Spam-Status: No, score=-4.311 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=RrgHqSeF; dkim=pass (1024-bit key) header.d=ericsson.com header.b=JzEYMuYR
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 LSafDnFwNLv3 for <cbor@ietfa.amsl.com>; Mon, 10 Sep 2018 14:07:17 -0700 (PDT)
Received: from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58]) (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 9AA8B130DD7 for <cbor@ietf.org>; Mon, 10 Sep 2018 14:07:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1536613635; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=k83RPCD/ToChHwjSGOPpXPVybzySePxsifviVq6WFQU=; b=RrgHqSeFuS6+93Kml189OXWG2kHX9nBZJ1PJsSwZ1hWhsQfnyjZQq3dEhMLfKIwa peh318l7TV1Bb5g1f0mj+ZV/bU/4kD8SeLbHqy38wLC9E8SEZAtXHLXd06E5MYbT upCBbWNHsPfa8KEisW4FHirfBQ6G6Qlqb101yrQrf1A=;
X-AuditID: c1b4fb3a-6ba019c000007a64-98-5b96dd033e48
Received: from ESESSMB504.ericsson.se (Unknown_Domain [153.88.183.122]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id 1D.CF.31332.30DD69B5; Mon, 10 Sep 2018 23:07:15 +0200 (CEST)
Received: from ESESSMB504.ericsson.se (153.88.183.165) by ESESSMB504.ericsson.se (153.88.183.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 10 Sep 2018 23:07:15 +0200
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB504.ericsson.se (153.88.183.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Mon, 10 Sep 2018 23:07:15 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k83RPCD/ToChHwjSGOPpXPVybzySePxsifviVq6WFQU=; b=JzEYMuYRzZEQBjXFyBsS5s+jIgngeXIdmrbY/UNH9jcrJGVfk4mFhYNyiitgziuzl0PAUxlAOx4/FQ1AHcd1BYuKoKyckWcXFs9tQn8dghWuYYX20iHaVrLFo3Nyx6oguA2oFfwkQhKbxvi4g80zpdnL2B2sz3anikPlOFiMst0=
Received: from HE1PR07MB4169.eurprd07.prod.outlook.com (20.176.166.22) by HE1PR07MB4203.eurprd07.prod.outlook.com (20.176.166.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.12; Mon, 10 Sep 2018 21:07:14 +0000
Received: from HE1PR07MB4169.eurprd07.prod.outlook.com ([fe80::a451:7626:5a73:809]) by HE1PR07MB4169.eurprd07.prod.outlook.com ([fe80::a451:7626:5a73:809%5]) with mapi id 15.20.1143.010; Mon, 10 Sep 2018 21:07:14 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: Some comments on cbor-cddl-05 and cbor-7049bis-02
Thread-Index: AQHUSUo/j+kjrTH+rUafgOMUK+SRvw==
Date: Mon, 10 Sep 2018 21:07:14 +0000
Message-ID: <D7D9E583-B019-4F96-B71E-C703887557D7@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.10.0.180812
x-originating-ip: [82.214.50.105]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; HE1PR07MB4203; 6:lqXRu6cW7eLL4sIHEx2GhuzANJWhD5FZ13fztbIAyftsHCSSKBbOkrEwdYhSYfhD7QVhCaq2RMObNWo0CVB4UpcHPMxi85a40G7QKL+jobrVE9QZAXFMWhmuJ21fXMjm5iXX3724+r08g9+dfdfe8o56tbSAu6EDk/YC/FwolQ2jzU21NJR1yDPoigzo5749MLHd/cG1MkOo/UvDbXJZC3sLkf09+bj6ghy6bqTqy2NWb7jmz4+JGfPhVxlNOvaSI5xu9KNbUalO3YZgzH6MFzsQBNI/SA7YfEJBXW+Aucl1SUa1d+VDQrI27qXGKgQMfSJPWKGW88TxoctVBeJEdH1T8fWsz5KkUqglDJ/guNXsy4/K7CER+KSym4PYdCFjOj9A+Nsp/dBCxLeVUKfeDp1Q0Jj63qEEFlH2IT1B0tmoJlCOuaw3mWP2YYT6l3rTc/5sHqUPQoPCDAZnmiH2Fg==; 5:u01XKWH7w9qIpo0OxqLzyQM+kzwyIODMAzHh+GI24y60OQSOaa6jBW1W3J8b8SOpjAJhfTE5CupPr12QnI6alWCppxQAwr3lCohC75b8DNqplylvx/megX3B/cqUcpltZdUDjj/Gy0UElq5KE7NQKIRT/Ubfcy6fiK4mnqJxn5g=; 7:VryYznNY0ak6dsLDgoFaj+7xJoClioeDfEvYVLdlvhXXGNwdVOJZAgDKtGML5tBkSabdQ/YdDXFP7xBoSReCY929k3ReT9u2JAIozEYRdNBuXgQAvHIvaCmPWTKdwcC7rUiGxp3/eCF/AaN5DBnQf48pk6lU+I5VGniTreSEajha9ent/LfQQA38YIEzOYKWsV3ueCtMt6FIgMqTiA6BZfDgJ5IrSmhBH4CI58KdQfSGjJJbqpU/InAhye58QjQ9
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 37f98f46-b673-4861-9510-08d61761620a
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:HE1PR07MB4203;
x-ms-traffictypediagnostic: HE1PR07MB4203:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=john.mattsson@ericsson.com;
x-microsoft-antispam-prvs: <HE1PR07MB4203E581C11A7C9081C7401D89050@HE1PR07MB4203.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231344)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991033); SRVR:HE1PR07MB4203; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB4203;
x-forefront-prvs: 07915F544A
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(396003)(366004)(346002)(199004)(189003)(486006)(105586002)(478600001)(14454004)(36756003)(5640700003)(7736002)(305945005)(966005)(53936002)(99286004)(44832011)(6116002)(5660300001)(97736004)(6436002)(2906002)(2501003)(33656002)(6486002)(2616005)(476003)(66066001)(58126008)(1730700003)(6306002)(14444005)(316002)(68736007)(8676002)(81156014)(81166006)(256004)(5250100002)(26005)(186003)(25786009)(8936002)(6512007)(6506007)(82746002)(102836004)(7520500002)(3846002)(6916009)(106356001)(83716003)(2351001)(2900100001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB4203; H:HE1PR07MB4169.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: Qp0ScoiRRfk1jjnsAqWrl8yzCgZxEwJJGRC3ocsJD2mVlnz5BzIHykMWL4k9hRC8Hvl34K661z2JR1N08jUM3K7f10PI+P2FzUuxurDWbyKDqQxvKL2PzusvPlg1/evL48TTBq2mETlQJ4yOf8El6FGoGjm6iibc9Vrqr3bUTYikmWLMM1w6gMoVltxttEQ+5J+FMGpJ2FcXNB8xUauz4RnlLGiLdLVGL+j/0VYjGZj82K0nHn7gP05H9C2gHVp7WAhQhTqMyq1u095NEmKzb/RuLVeiBJPiBq8OS5hMaJ32pxPS9lbZpZKa+epYvmRYoUzITmutyvHEQPU/0PWUG7AuWOiQYi//xJ6ShdUoIDQ=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <476DAB4B254F2A44A5858B16106C215F@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 37f98f46-b673-4861-9510-08d61761620a
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2018 21:07:14.1839 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4203
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjleLIzCtJLcpLzFFi42KZGbG9Spf57rRogw/tGhYzO6azODB6LFny kymAMYrLJiU1J7MstUjfLoErY9GVt2wFP2Qqfjx8wNzAOEOmi5GTQ0LARGLDgk0sXYxcHEIC RxklOt9dZodwvjFKdCz+B5VZwiTx6WozG4jDIjCBWWLl6xdsEJnJTBLtMzqgyh4wSpw6dpoF ZDKbgIHE3D0NbCC2iICyxNQph8FsYQEriWVdp9kh4vYS99u3sUDYehLnjh9jBLFZBFQlnl2/ zQxi8wLVPJ/1FqyXUUBM4vupNUwgNrOAuMStJ/OZIL4QkFiy5zwzhC0q8fLxP9YuRg4OUQF9 iWmXAyDCihJvZi5mhLBlJS7N72YEuVlCYB+7xPqlb1khEroSH6ZOhZrjK3G5azdU0XFGiUlr /0F1a0m0z7vBCHFQrERr63SwZRIC2RLP1gbBlHQcmQV1m5zEqt6HLBBz9jNL3H21kx2iXkZi 8drACYwGs5C8MwsowyygKbF+lz5E2EPi364drBC2osSU7ofss8ChIihxcuYTlgWMrKsYRYtT i4tz042M9FKLMpOLi/Pz9PJSSzYxAlPHwS2/rXYwHnzueIhRgINRiYeX4cy0aCHWxLLiytxD jBIczEoivLt0gEK8KYmVValF+fFFpTmpxYcYpTlYlMR5ndIsooQE0hNLUrNTUwtSi2CyTByc Ug2M6lv1pxrLCUa/exr1s3nB9X8f5Znq5WdzxO9oYGufd+jJ3nfyv+ZdLC99s26fpajgtsO6 CtdUP5891DFh3R07JgHDxMmLvn5ctCF4rsVy0/XJDq/mzd9+vO6p4/6+ku9v+pbedszO5Pvq vtnNb4KytPxJvYVf6hfNYf5xtPtzWO4nu9bq2zNUZyqxFGckGmoxFxUnAgCs6JxwGQMAAA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/GxuBCpqrRQ3eQgtp8p_2qDGdtV8>
Subject: [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: Mon, 10 Sep 2018 21:07:20 -0000

Hi,

Hi, took some time to read these two documents in detail during my last trip. Both documents are very well written and quite easy to read and understand. Some comments:


Comments on cbor-cddl-05
---------------------------------

- I think cbor-cddl-05 should formally update RFC7049 or RFC7049bis as it extends the diagnostic notation.

- Section 2.2.1 seem to define value notation for integers, floats, and text strings, but not byte strings (which in my use cases are often used very much). Maybe the cddl tool already implements something that is just missings from the documents, otherwise all or some of the diagnostic notation for byte string would fit. e.g. h'0102030405'

- If I understand correctly, Section 3.8.5. uses the $ notation which is not defined until Section 3.9.

- That ".ctrl" in Table 1 means all CDDL control operators should be explained.

- Section 2.1.2 states that "comma is actually optional (not just in the final entry), but it is considered good style to set it."

Reading the doc it feels like the good style is to set all commas in definitions with a line break after each entry, but to leave out the last comma in definitions that do not use line breaks after each entry

orderedpair = [
   a: int,
   b: int,
]

orderedpair = [ a: int, b: int ]

I think the sentence should be updated to reflect this.

- More guidelines or at least links on how to include CDDL in RFCs would be helpful, i.e.

   <artwork type="CDDL"> in xml
   
   ~~~~~~~~~~~ CDDL in kramdown

- SenML is now published as RFC 8428

- The document refers to the cddl tool, it could also refer to tools for diagnostic notation in the extended diagnostic notation section, e.g. cbor.me


Comments on cbor-7049bis-02
---------------------------------

- 7049bis should obsolete RFC7049, I think.

- The terminology section should refer to RFC 8174

- JSON should refer to RFC 8259 instead of RFC 7159

- RFC 5226 should be replaced by RFC 8126

- ANS.1 should refer to the 2015 version
  https://www.itu.int/itu-t/recommendations/rec.aspx?rec=x.690

- ECMA/262 should refer to the 9th edition, 2018

- [TIME_T] should refer to the 2017 edition

- Could refer to tools for diagnostic notation in the extended diagnostic notation section, e.g. cbor.me


Comments on cbor-7049bis-02 or cbor-cddl-05
---------------------------------

I think it's a large benefit if the CDDL and the CBOR diagnostic notation is as similar as possible. The diagnostic notation should allow comma after the final entry. The specification is not clear here, but at least cbor.me dislikes all the following

[ 1, ]
{ 1, }
<< 1, >>

Cheers,
John