Re: [Cbor] [core] CDDL Model for YANG-SID (draft-ietf-core-sid)
Carsten Bormann <cabo@tzi.org> Sat, 25 February 2023 21:53 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 C7454C151536; Sat, 25 Feb 2023 13:53:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.885
X-Spam-Level:
X-Spam-Status: No, score=-6.885 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id japiZNJPxh2o; Sat, 25 Feb 2023 13:53:00 -0800 (PST)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4506EC14CE55; Sat, 25 Feb 2023 13:52:56 -0800 (PST)
Received: from [192.168.217.124] (p548dc9a4.dip0.t-ipconnect.de [84.141.201.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4PPL920L7dzDCbr; Sat, 25 Feb 2023 22:52:54 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <5935.1677359412@localhost>
Date: Sat, 25 Feb 2023 22:52:53 +0100
Cc: "core@ietf.org WG (core@ietf.org)" <core@ietf.org>, cbor@ietf.org, anima@ietf.org
X-Mao-Original-Outgoing-Id: 699054773.484436-649933f1528eb58473b96d5886db3db3
Content-Transfer-Encoding: quoted-printable
Message-Id: <B36F6970-7C0E-4870-A90B-4ACFABA3A4DA@tzi.org>
References: <FF048123-7AC9-4F6D-8F72-1DD17E40BAF8@tzi.org> <5935.1677359412@localhost>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/EeiRU2maUBad45cpo-c_iYOzsGY>
Subject: Re: [Cbor] [core] CDDL Model for YANG-SID (draft-ietf-core-sid)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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: Sat, 25 Feb 2023 21:53:05 -0000
> I think you did this manually, right? Yes. To my best understanding of YANG and YANG-JSON. (E.g., I needed to find out how to represent empty lists in YANG-JSON — this was recently (2022!) still a discussion point on the mailing list, which needed the author of RFC 7951 to resolve [1]...) [1]: https://mailarchive.ietf.org/arch/msg/netmod/Jlgpucc0wI6YpCIuXk6k1gicjsE I think one needs to do a couple of translations by hand, before it becomes clear what an automatic translator needs to do. And there are limits, e.g., there is a co-occurrence constraint expressed in English that is trivial to express in CDDL and, in a different way, certainly also in YANG (with the `when` stuff), but translating the latter automatically into a grammar based co-occurrence constraint sounds heroic. I’d probably start by translating a yang tree into CDDL and then filling in the things the YANG tree is missing from the YANG. >> [1]: https://www.ietf.org/archive/id/draft-bormann-cbor-rfc-cddl-models-00.html > > 2.4. Your favorite RFC here... > > RFC8366. Good idea. Let’s see when I get to it… (I actually need to do translations like this as a therapeutic so I get a better understanding of what a draft is trying to say(*)…) > Not seeing a venu for your draft. I’d expect that draft to be looked at both in CBOR and by subject matter experts. I’m focusing a bit on documents in late stages because the translation might actually help others understand a draft as well. > The thing is, once it gets translated to CDDL, I'm actually not sure I want > to keep the YANG anymore. I feared that this would come up. I’m not so interested in setting up an adversarial relationship between a YANG and a CDDL faction. But, indeed, there are some things where one or the other can be intrinsically better (YANG: data at rest with RPCs on them etc., CDDL: data in flight…). The question is just in which cases this is outweighed by a still much stronger industry ecosystem around YANG. > A huge huge huge amount of effort on our part, for > almost zero benefit. We didn't really have CDDL 8 years ago, so we had no clear > alternative when we started, but I sure wouldn't go down the YANG path again. RFC8366 clearly looks like a rather natural application of CDDL to me. Grüße, Carsten (*) Or hide...
- [Cbor] CDDL Model for YANG-SID (draft-ietf-core-s… Carsten Bormann
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Michael Richardson
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Carsten Bormann
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Carsten Bormann
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Carsten Bormann
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Michael Richardson
- Re: [Cbor] [core] CDDL Model for YANG-SID (draft-… Michael Richardson
- Re: [Cbor] [Anima] [core] CDDL Model for YANG-SID… Carsten Bormann
- [Cbor] MORE control operators (Re: [core] CDDL Mo… Carsten Bormann
- Re: [Cbor] MORE control operators (Re: [core] CDD… Michael Richardson
- Re: [Cbor] MORE control operators (Re: [core] CDD… Carsten Bormann