Re: [netmod] type equivalence

"Rob Wilton (rwilton)" <rwilton@cisco.com> Fri, 26 February 2021 16:45 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9D4C13A1115 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 08:45:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.598
X-Spam-Level:
X-Spam-Status: No, score=-9.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=hj+FP5O2; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=t51uIxGA
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 DXDlJRJYX9uj for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 08:45:38 -0800 (PST)
Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 514AB3A110A for <netmod@ietf.org>; Fri, 26 Feb 2021 08:45:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=9071; q=dns/txt; s=iport; t=1614357937; x=1615567537; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=xGU2WdZx3UPPXlz+qG+VzBTrCWWjnAOgb/FSFQYSOxc=; b=hj+FP5O2adp+OZvdx9PHaVOlD1Pod9mIvml0nHB3Zf91kLdoWYkGq9zb bSI5KuyuQHYyT+lRLyCRH2NwVejr7/zvCc5nvKQm/i0ztQoicOC/PMx1V bGa4vVSNT3CDJxdiEqRgt2bAQiIV5Th2vOOmu8y38jT2oDkPh25tzWYZ2 U=;
IronPort-PHdr: 9a23:HlO/DxKk6FprvDLRTNmcpTVXNCE6p7X5OBIU4ZM7irVIN76u5InmIFeGvK0/0AGXDcPA5qEMh+nXtvXmXmoNqdaEvWsZeZNBHxkClY0NngMmDcLEbC+zLPPjYyEgWsgXUlhj8iLnbxYFXt3zNBXep3So5msUHRPyfQN+OuXyHNvUiMK6n+C/8pHeeUNGnj24NLhzNx6x6w7Ws5ob
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BWCQALJTlg/4cNJK1fAx4BAQsSDECBRAuBUykoB3ZaNjEKAYd+A4U5iFQDmSGCUwNUCwEBAQ0BAR0LCgIEAQGBEwGCdUQCgXoCJTcGDgIDAQELAQEFAQEBAgEGBHGFYQ2GRAEBAQEDAQE+AQEsCwELAgICAQgQAQQBAQEuGwwLHQgCBA4FCIIdTIJVAy8BAwulZAKKJXSBNIMEAQEGhRsYghIJBYEzgnaKTSYcgUVCgRFDglc+gl0BAQKBYB8mgwOCK4FpWwZ8EyxbPYEABp1Am0CBFAqCfIk/kwOEbJ5qsiGEUQICAgIEBQIOAQEGgWokgVdwFTuCaQlHFwINjh+DbzOEYYVFcwI2AgYBCQEBAwl8iggBgQ4BAQ
X-IronPort-AV: E=Sophos;i="5.81,209,1610409600"; d="scan'208";a="842095775"
Received: from alln-core-2.cisco.com ([173.36.13.135]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 26 Feb 2021 16:45:36 +0000
Received: from mail.cisco.com (xbe-rcd-005.cisco.com [173.37.102.20]) by alln-core-2.cisco.com (8.15.2/8.15.2) with ESMTPS id 11QGjagd031549 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Fri, 26 Feb 2021 16:45:37 GMT
Received: from xfe-aln-001.cisco.com (173.37.135.121) by xbe-rcd-005.cisco.com (173.37.102.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Fri, 26 Feb 2021 10:45:36 -0600
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by xfe-aln-001.cisco.com (173.37.135.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Fri, 26 Feb 2021 10:45:07 -0600
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 26 Feb 2021 11:45:06 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwnKQr8sdqkTP87IbZt17+eplw/GcJuLRELKtyrXgKda4YNC4js8B6XknM7bIsr/TxNmia7tvc4MDHvkv3bJx6cTBBVsVYWtPD0woWeMYkHF4fF2qXOkJbo87dRtS3ZE4gUD0k9k7Q8wc3AdharnMl0BzhA4rSVEdZqc6nfDnzVVgAkRmkCytptPo7etl8G1yOX70nIu2/XYNGygnExMvmghKpQcyc7IwoN4jfA1vMuJ0TJLyg1KIqglKo14JR5u2DaLLWGmF9ifZJt6BaVKd9XST1e+fpLYNk+l40NooYyVHNHUjkz0LPRGkaw3n4hgsqOKO1LicWLZ/XnembCUSA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g44iAzE3MBxZGUpQVji1y2foKIfMNir3ZOo67V9HWhk=; b=C75+dlXCU+2SSoZ4YigNNrmKN+8qjGRPLj8rfa2n8J0gvnofMc/AsPQkBFXoo/zNs9n5fasQDS5+18S3fPnj6Q0SrF/7XtEIf1SevOw3ywJT+pDH0yw+J97ZnFu0moRHQxcuDdlhc+j45+TxzirXfnUBiW+JYrw/wp01JyjruYeBu2mKIw2ahGM/F3jJX6MtQdegaIEmPxOEvCzjhC8IN0Q7wQ0DSjxx/hKIUbPrl2p33/8XPh8lUFHsuEu/azzVMJABhhWte0BzkZB6WnX6wJD0N7a6R7MT3ysemei/1rx0CBAi4Y/sf2wQ559SFuMNaE8632LadJKU91DcUVtfgQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g44iAzE3MBxZGUpQVji1y2foKIfMNir3ZOo67V9HWhk=; b=t51uIxGArDAPkaFeUjznVkQos99kX3G0jmBRW05TNK8RErlFH6ZMs5AYGiy7+kWVME7yLR9mWRiI+cJKOLTv0z84AxRkOjaM/t3wpKvXOGdTPp2W9ObLpesMTabKDXM8H0MDI88M6NV8NWblLQI0AtNeZxo2pp42CWKrA7M1q70=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (2603:10b6:208:190::17) by MN2PR11MB4759.namprd11.prod.outlook.com (2603:10b6:208:26a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Fri, 26 Feb 2021 16:45:05 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::24c4:4c09:f6f0:5510]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::24c4:4c09:f6f0:5510%2]) with mapi id 15.20.3868.033; Fri, 26 Feb 2021 16:45:05 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Martin Björklund <mbj+ietf@4668.se>
CC: "andy@yumaworks.com" <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] type equivalence
Thread-Index: AQHXDFy4UeJFz4iWp0CmSIZf3pshw6pqoOTwgAABfgCAAADBIA==
Date: Fri, 26 Feb 2021 16:45:05 +0000
Message-ID: <MN2PR11MB4366C4E31768E134F7BD0028B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <CABCOCHSeMpgjmws0X5HStsbjvr8h=8tP3-qwAdjYfqcX3=-P5g@mail.gmail.com> <20210226.173010.2304782771110060094.id@4668.se> <MN2PR11MB43668FAFF23A1DBCB643C21CB59D9@MN2PR11MB4366.namprd11.prod.outlook.com> <20210226.173638.580648753389514487.id@4668.se>
In-Reply-To: <20210226.173638.580648753389514487.id@4668.se>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: 4668.se; dkim=none (message not signed) header.d=none;4668.se; dmarc=none action=none header.from=cisco.com;
x-originating-ip: [82.12.233.180]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 0bda8667-63d7-495c-48f9-08d8da75def3
x-ms-traffictypediagnostic: MN2PR11MB4759:
x-ms-exchange-minimumurldomainage: www.jacobs-#0
x-microsoft-antispam-prvs: <MN2PR11MB4759B6B73635E79E074E6142B59D9@MN2PR11MB4759.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Obp5e6hmS/7bJ1WZ5PS3ncdTaMI60FGA3ce+OJ9BYHp/Q8JWe1C3cXt+ErfcuQYo8Sx4gJ9uxxzeFzy0s7URE+QCuTF6M9SDLUZKeVeUFyvJnMuEoNGT1RuDvdYkNzWE3weN7i1hVRi65hlwYvXFZx6oaYRad9NMF7EJ1Ev8V5OS1yeY+Qd3c9+765bH9UOsuFRlj/L+qEGXeTE8ZiotmYzV31hUU1wFgQdYRSwi0T5b12cJMvem3xqCRK4mOb1NFq6bAAlVeLxK6v94RSY3zuXcgMtMwDUUBV4DLXAhPRzFz/HHfSK9ubP5nkyRb580iMYFjzghhie2PDc8RGyRroHKpa+Jq2vPHcZo9EkK/RzoHDUBsJWryfQUTqZhhLlaeUByWhWMn4NlccaEoZGcyYZmuYQ5lANgLpC5us0qEFGLa/hjR0DT5lhfQpdZ7AIKPDre2TTcY1gG1WXBDGgMc4XNYgn03UWckrf1yYo40uv8sowhsdsMQ6BMvZJd9Wlyu2RduX+9YXDhLTv3pK5reVLpeq/7ZVcB/xhfan+SuhKJ6EZgstSqnvDc+sM1/baI6gxdZ0s4ABa/vnOPE89h72eMvdcvpjIbUI2ezTPO4Iw=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(366004)(39860400002)(136003)(396003)(346002)(2906002)(5660300002)(54906003)(66476007)(316002)(33656002)(6506007)(4326008)(8936002)(64756008)(66446008)(66946007)(86362001)(966005)(478600001)(76116006)(9686003)(55016002)(8676002)(186003)(26005)(7696005)(71200400001)(52536014)(53546011)(83380400001)(66574015)(66556008); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: xI6TSoH67coBbUlTo3D1FOABvUwWbGViFJL30NJ3QaWcR6nGMz+7qMXLAG+pUFMnGpS0cqyHgSgzobFVUZrZKtzHF4dkfR3q1GKqyqjFtgevajuJQr/7gZlEnDf5p+0HT4cxPPrrmmaaE0/ZV62sLQ9YY+ipVNWtMaMMoPJf0bztDqNd4bFCxhBtwIepSJuJ8YLbr1f6ijyyk485R8F3VEhZBYlk1UanfZ4vWwoJF7EkvkOrdahBZUeatPjCteONAgN2VGJsqEN+es7+h+fEsjJmTbHwixjF8N/dtsB1plan2fr7ZLsZABAQ/hacux21dW/EZPQkC8bP7p+MGsWh4o/L4Ozr1eVFNJ+EgovaBupvbm+NcIo8eDMn+jKDAdzMuwbq6ERocM++lGznKeNadk9KFEMNw/tNxYlUfEKabGTX/ONuN0bJLfCZ3Zowuejz7rCOEJhbT9E0YN7clVz0lMEVPhh90eYF3tKBeIFJAh1yRsLpgGezyf+L4uEANHU+PVFaNpBdM25JFJyu87jcvXpWEkKNiHLIVtXsN01p2sXHwdhhGwmvnQapyxCIqeSYzPXCfF6exPMy/o9EUCIduxe6iz5U0oZvoKZ/s3f2Fq5+YLrysRHUm/yXD6XC5a1U8x6Oyg+EmdJcnFoohfnD71oI9CJwcv0v2F7Iffi+p1h0zaYEyTVRl72COVdFnicrqCm59MmB2fp4vjQl8nDHzn2ohqAwkUbTNBQBCauedRKXlB91fEbnOwWmYtkyPRnDzfacSGgz3FJ0xxrW1mreiHyQfKH7InOTw+GAaH5g0EJDte6F0L50EjoSEWecwnQ5cFre1M4WS2MD7qtvn3AOyn9RC0gg4zD3u/EL+bG7Bth5qLDH7HaPSVTGZvC3zX621YEkakCyOITY5PUfeUlPSfRGyPTfZlR6EcsiPfsjB5S0gu/d6HymuyPeyZabyn5yEOjQ4meekAIvDESCEqV26d4u1HCn75wAAaCieuNC1+nK8LnDO4zZv2HGU3zkGX4CKO1n1m8vUUJOHOhWWeQqvgcrIVnoSoeBFSrgR3+hDEqiXqXVjX14VSzRvZrheZgpyPzHzNv/9pGWZaX4Q0BonC4vd8RNRw/WBSwmzVWitncFQLzg0dH2kKNOErubsbd8VF4DnQttuiKsekrZxvwTU/ZubvCXNwhbR2vvk0g/z7eOFq+a3TxVNh6ELsH/diRSby/slWLMGvN2nEedT0VLWvexb3U6OE2eLB8nPoM8iTxXTdpWO5nuf8ws9xCtRp6sv47hRdyxCywQIKTl7mu9HmV8gIa7/X7xKAygwuqvYLGHjfoBNuPj5CIi14WZlb+j
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4366.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0bda8667-63d7-495c-48f9-08d8da75def3
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2021 16:45:05.8070 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 8e7br7soWU9xg8nWdvxZ/3XADKQJsQVfmY7KPbGyK5ThEHnm3yrLxloJu+B1BLwcpvAK2yOeGd+Ipjacsjv3iw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4759
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.20, xbe-rcd-005.cisco.com
X-Outbound-Node: alln-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/i0c8DkEb6F20RXoce3NdY_sD4Lo>
Subject: Re: [netmod] type equivalence
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Feb 2021 16:45:42 -0000


> -----Original Message-----
> From: Martin Björklund <mbj+ietf@4668.se>
> Sent: 26 February 2021 16:37
> To: Rob Wilton (rwilton) <rwilton@cisco.com>
> Cc: andy@yumaworks.com; netmod@ietf.org
> Subject: Re: [netmod] type equivalence
> 
> "Rob Wilton (rwilton)" <rwilton@cisco.com> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Martin Björklund <mbj+ietf@4668.se>
> > > Sent: 26 February 2021 16:30
> > > To: andy@yumaworks.com
> > > Cc: Rob Wilton (rwilton) <rwilton@cisco.com>; netmod@ietf.org
> > > Subject: Re: [netmod] type equivalence
> > >
> > > Andy Bierman <andy@yumaworks.com> wrote:
> > > > On Fri, Feb 26, 2021 at 7:06 AM Martin Björklund <mbj+ietf@4668.se>
> > > wrote:
> > > >
> > > > > "Rob Wilton \(rwilton\)" <rwilton=40cisco.com@dmarc.ietf.org>
> wrote:
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: netmod <netmod-bounces@ietf.org> On Behalf Of Juergen
> > > > > Schoenwaelder
> > > > > > > Sent: 24 February 2021 20:39
> > > > > > > To: netmod@ietf.org
> > > > > > > Subject: Re: [netmod] type equivalence
> > > > > > >
> > > > > > > Here is an attempt to come up with better wording. If people
> agree
> > > on
> > > > > > > a new wording, I volunteer to submit an errata.
> > > > > > >
> > > > > > > OLD
> > > > > > >
> > > > > > >    o  A "type" statement may be replaced with another "type"
> > > statement
> > > > > > >       that does not change the syntax or semantics of the
> type.
> > > For
> > > > > > >       example, an inline type definition may be replaced with
> a
> > > > > typedef,
> > > > > > >       but an int8 type cannot be replaced by an int16, since
> the
> > > syntax
> > > > > > >       would change.
> > > > > > >
> > > > > > > NEW
> > > > > > >
> > > > > > >    o  A "type" statement may be replaced with another "type"
> > > statement
> > > > > > >       that does not change the semantics of the type or the
> > > underlying
> > > > > > >       built-in type.  For example, an inline type definition
> may
> > > be
> > > > > > >       replaced with a semantically equivalent typedef derived
> from
> > > the
> > > > > > >       same built-in type, but an int8 type cannot be replaced
> by
> > > an
> > > > > > >       int16, since the underlying built-in type would change.
> > > > >
> > > >
> > > >
> > > > I think the NEW text captures the original intent and is OK for an
> > > errata.
> > >
> > > +1
> > >
> > >
> > > > I believe the use-case discussed at the time of writing was simply
> > > > replacing an inline
> > > > type with the identical type but within a typedef-stmt instead of
> > > > inline
> > > > within a leaf or leaf-list.
> > > >
> > > > Perhaps this rule is too strict.
> > > > There is a simple way to defeat it:
> > > >
> > > > Change all
> > > >    type foo {  ... }
> > > > to
> > > >    type union {
> > > >       type foo { ... }
> > > >     }
> > > >
> > > > Now you can add new values and semantics without taking away the
> > > original
> > > > syntax and semantics.
> > > >
> > > >  type union {
> > > >       type foo { ... }
> > > >       type bar { ... }   // note new member types added at end of
> list
> > > >     }
> > > >
> > > > But it is not clear that this would be legal or completely BC. It
> > > certainly
> > > > could change the encoding in JSON and CBOR.
> > >
> > > It is not allowed by sec 11 in 7950, since it changes the syntax of
> > > the type.
> > [RW]
> >
> > But the proposed errata removes the text about not changing the
> > syntax, or are you referring to other text?
> 
> The new text says that the built-in type cannot change, which it does
> if we add a type to a union.  Hmm, perhaps this isn't clear.
[RW] 

Not sure.  I think that it is reasonable clear, as long as you don't talk about changes in the syntax ;-)

But, it might be worth explicitly pulling out that union type is a change, otherwise someone might try and fudge this by changing uint32 to a union of uint32 and uint64.

Rob


> 
> 
> /martin
> 
> 
> >
> > Rob
> >
> >
> > >
> > >
> > > /martin
> > >
> > >
> > >
> > > >
> > > >
> > > > Andy
> > > >
> > > >
> > > > > [RW]
> > > > > >
> > > > > > Would the text be more clear it is just specified what is
> allowed,
> > > e.g.,
> > > > > >
> > > > > >      o  A "type" statement may be replaced with another "type"
> > > statement
> > > > > >         that resolves to the same underlying built-in type.  For
> > > example,
> > > > > >         ...
> > > > > >
> > > > > >
> > > > > > What does "semantics of the type" cover?
> > > > >
> > > > > Suppose you have:
> > > > >
> > > > >    typedef "timestamp" {
> > > > >      type yang:date-time;
> > > > >      description
> > > > >        "The time that an event occurred";
> > > > >    }
> > > > >
> > > > > then you can't change it to:
> > > > >
> > > > >    typedef "timestamp" {
> > > > >      type yang:date-time;
> > > > >      description
> > > > >        "The time that an event was received.";
> > > > >    }
> > > > >
> > > > > The syntax is the same, but the semantics are different.
> > > > >
> > > > >
> > > > > /martin
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > If I have this type:
> > > > > >
> > > > > >   typedef "timestamp" {
> > > > > >     type "string";
> > > > > >     description
> > > > > >       "The time of day that an event occurred, in any format";
> > > > > >   }
> > > > > >
> > > > > > then can I replace it with this definition:
> > > > > >
> > > > > >   typedef "timestamp" {
> > > > > >     type "string";
> > > > > >     description
> > > > > >       "The time of day, and optionally date, that an event
> > > > > >        occurred, in any format";
> > > > > >   }
> > > > > >
> > > > > >
> > > > > >
> > > > > > Tangentially, it is worth noting the RFC 8342 also writes about
> > > syntactic
> > > > > > constraints covering types:
> > > > > >
> > > > > > 5.3.  The Operational State Datastore (<operational>)
> > > > > >
> > > > > >    Syntactic constraints MUST NOT be violated, including
> > > hierarchical
> > > > > >    organization, identifiers, and type-based constraints.  If a
> node
> > > in
> > > > > >    <operational> does not meet the syntactic constraints, then
> it
> > > > > >    MUST NOT be returned, and some other mechanism should be used
> to
> > > flag
> > > > > >    the error.
> > > > > >
> > > > > > I'm not sure how clear RFC 8342 section 5.3 is about returning
> > > values
> > > > > > that can be represented by the underlying built-in-type, but are
> > > outside
> > > > > > the value space defined by a range, length, or pattern
> statement.
> > > > > >
> > > > > > My memory during the discussions was that it is allowed to
> return a
> > > value
> > > > > > outside arange, length, pattern statement, as long as it is
> > > contained
> > > > > > in the value space of the built-in-type.  E.g., cannot return
> 257 in
> > > a
> > > > > > uint8, but can return 11 even if the type range is 1..10.
> > > > > >
> > > > > > But, I'm not sure that is what the text actually states.
> > > > > >
> > > > > > Regards,
> > > > > > Rob
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > /js
> > > > > > >
> > > > > > > On Mon, Feb 22, 2021 at 03:20:02PM +0100, Carsten Bormann
> wrote:
> > > > > > > > On 2021-02-22, at 15:17, Juergen Schoenwaelder
> > > > > <j.schoenwaelder@jacobs-
> > > > > > > university.de> wrote:
> > > > > > > > >
> > > > > > > > > I guess considering the built-in types as incompatible is
> the
> > > most
> > > > > > > > > robust approach. If we agree that RFC 7950 tried to say
> this,
> > > we
> > > > > could
> > > > > > > > > file an errata and propose clearer language.
> > > > > > > >
> > > > > > > > Right.  And we can keep the COMI key-to-URL mapping as is,
> as
> > > this
> > > > > > > clarification is necessary for its correct functioning.
> > > > > > > >
> > > > > > > > Grüße, Carsten
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > > > > > > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen |
> > > Germany
> > > > > > > Fax:   +49 421 200 3103         <https://www.jacobs-
> > > university.de/>
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > netmod mailing list
> > > > > > > netmod@ietf.org
> > > > > > > https://www.ietf.org/mailman/listinfo/netmod
> > > > > >
> > > > > > _______________________________________________
> > > > > > netmod mailing list
> > > > > > netmod@ietf.org
> > > > > > https://www.ietf.org/mailman/listinfo/netmod
> > > > >
> > > > > _______________________________________________
> > > > > netmod mailing list
> > > > > netmod@ietf.org
> > > > > https://www.ietf.org/mailman/listinfo/netmod
> > > > >