Re: [netmod] type equivalence

"Rob Wilton (rwilton)" <rwilton@cisco.com> Fri, 26 February 2021 15:27 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 0847D3A0BC5 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:27:45 -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=HOhNhk+w; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=Vt2FygAL
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 sRPTpDsQfHnh for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:27:43 -0800 (PST)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 430303A0BBC for <netmod@ietf.org>; Fri, 26 Feb 2021 07:27:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5451; q=dns/txt; s=iport; t=1614353263; x=1615562863; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=IJQjV/djN08irlpcYH6q1iawS8/+tHqu4HucKwrAMl4=; b=HOhNhk+wTXYgiWPTrVfyLfnxr64d7SiiopRq05MpCN5k6SGPkTddIxBm jizMIA5rc1i1QC8zeAV7d2YXDfps6YKBXV7Cj65bXDQy7JoLfZxFxpnav XRFe2eWNXKTkYViLLIIXnl9fl3fzCjas8Z+WCaRPymg0/8Yj2ZH6lwOiU M=;
IronPort-PHdr: 9a23:brmjhh1sP6NWTznUsmDT+zVfbzU7u7jyIg8e44YmjLQLaKm44pD+JxWEtadvhVTOV56e9vRFlefMqKH8SCoM7MXJvHMDdclKUBkIwYUTkhc7CcGIQUv8MLbxbiM8EcgDMT0t/3yyPUVPXsqrYVrUry6w5DUVEA66KAx0OOnvAY/OnoK72rP695jaeQ4dgj27bPt7Jwm3qgOEsM4QjO4AYqY8wxfEuD1GYeNTkGhpPlmU2R3745S9
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0C1AAAyEjlg/4sNJK1iHQEBAQEJARIBBQUBQIE8BwELAYFSKSgHgVA2MQoBh34DhTmIVQOZIYEugSUDVAsBAQENAQEyAgQBAYRNAoF6AiU1CA4CAwEBCwEBBQEBAQIBBgRxhWENhkQBAQEBAgE6BgEBNwELBAIBCA4CAQQBAQEeEDIdCAIEDgUIgh2DIQMOIQEDpUkCiiV0gTSDBAEBBoUhGIISCYE4AYJ1ik0mHIFFQoFUglc+hEGDSIIrgVkQYXUHX3hFJ7kagRQKgnycQqNWtnICAgICBAUCDgEBBoFWATeBV3AVgyRQFwINjh+Db4pZczgCBgoBAQMJfIoIAYEOAQE
X-IronPort-AV: E=Sophos;i="5.81,208,1610409600"; d="scan'208";a="852826399"
Received: from alln-core-6.cisco.com ([173.36.13.139]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 26 Feb 2021 15:27:42 +0000
Received: from mail.cisco.com (xbe-rcd-003.cisco.com [173.37.102.18]) by alln-core-6.cisco.com (8.15.2/8.15.2) with ESMTPS id 11QFRgod026862 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Fri, 26 Feb 2021 15:27:42 GMT
Received: from xfe-aln-004.cisco.com (173.37.135.124) by xbe-rcd-003.cisco.com (173.37.102.18) 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 09:27:41 -0600
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by xfe-aln-004.cisco.com (173.37.135.124) 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 09:27:41 -0600
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 26 Feb 2021 10:27:41 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QiLsWpiFfyJck4xcKVFVZlCi+xSSk1a8av6lrqxcTpqha44yn2aO+nQiYL3dBcOlrGyaTTEPSRsEoKbPskNlz4CC3PGoFtnmP2123gugyMsSnXLoWFwzhn2zaBsVmxsgnWwzZ2zDmNpRh/Jhcl2hdtIxCw2JiuYgxg/vC2Ucp761Ps6I3bZgDuIA1nfKjyYU5tFCwnc+owy7sqt9/TOJjhXbKizIgHlfOm6f6m2nupENaPvxjY0rVLJnahkNIDbi5i0oCkGVAMz+Oohtbv4WY2keDE8+Y5iscbNUUaFdpwrHajOjo/HwRX9xTR/l+SvgkaJiVDqOiowPSJNv3zyqCg==
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=8/eTt9KCDz7JKASwRwKgumwBqLmLmt20fy6axIAeU/0=; b=DCIWwq8NgiJTXAEpLYh6u41lpau6P9qjvVQpymj8Hc5Nae6gkzXOFd08TOsTSbtJLvwPx70v7iJG4nsCU9mDTnhuXWSzcTGQXg5XViAQIIC0h22JfD48pf/MGBRZaUX0jq4X0pwNMcwp1H4U/ogDKPWAxR6aBF6Obx+u38E0Wq73Cee6ErdqBAcE5cRPokk6GWEAhTLAbnlZDROShUrS+9ODt8XMSYL4QDhXKcBvzf3Dzubndm9yEqIJYiH9oU+4iok3wyc39bHio+DWkoBNB3JT4z3PEhnjOrAAEIA2zOWdiCC/yW+7kB9Hhe5TZ9ZUQkCLtVETpCoFZ+NE2KakZA==
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=8/eTt9KCDz7JKASwRwKgumwBqLmLmt20fy6axIAeU/0=; b=Vt2FygALrxFhNpec9J00QuPD9bVVbsBtLsk8OBmkNggqN7NmiGh2JbTwxCHoZWGlF19XUyrP2fp8HFRqHFxl0AXpv171ElCLuf+aNgmSBfbhoaNq+qD2aEo/iuwWtHXtbi7uG+Qxec2+k9x2LrY1I9XndWCrLSIFauYr1aGTVC8=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (2603:10b6:208:190::17) by MN2PR11MB4613.namprd11.prod.outlook.com (2603:10b6:208:26d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Fri, 26 Feb 2021 15:27:40 +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 15:27:40 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] type equivalence
Thread-Index: AQHXBuAq1qfCOH6jZk2wI7AlPAHCcKpfukcAgAAPWQCAADYYAIAD67GAgAAG5wCAAAVmgIAAAVWAgAAJU4CAADQZgIAAAKuAgAAF9ICAAADHAIADjp2AgAKQV9CAACyMgIAADmCA
Date: Fri, 26 Feb 2021 15:27:39 +0000
Message-ID: <MN2PR11MB436663499BB4589CC8581FD2B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <20210222.104938.680142326480637892.id@4668.se> <20210222100857.ovetw7udo4ccbezx@anna.jacobs.jacobs-university.de> <20210222.111343.254950973345362316.id@4668.se> <04B94A94-236A-44CE-B47C-BE5F36FFF278@tzi.org> <20210222135333.t4hfa3ekguwm33pm@anna.jacobs.jacobs-university.de> <C83451C6-56D2-4A95-A0FE-66197E7DFB59@tzi.org> <20210222141715.vhzqka77yzhbkpst@anna.jacobs.jacobs-university.de> <450E683C-4F47-4314-BA63-DAC17AF60970@tzi.org> <20210224203915.2ysjgjv6izjoh6to@anna.jacobs.jacobs-university.de> <MN2PR11MB4366BD4F7DE5297B38488749B59D9@MN2PR11MB4366.namprd11.prod.outlook.com> <20210226142749.ry2pbyym6ernhgi4@anna.jacobs.jacobs-university.de>
In-Reply-To: <20210226142749.ry2pbyym6ernhgi4@anna.jacobs.jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: jacobs-university.de; dkim=none (message not signed) header.d=none;jacobs-university.de; 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: 2dbd83f8-231d-42a5-1cbf-08d8da6b0e12
x-ms-traffictypediagnostic: MN2PR11MB4613:
x-microsoft-antispam-prvs: <MN2PR11MB4613D8F90F9DC67AE27C27F1B59D9@MN2PR11MB4613.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: q4ZLk7F8GOhHzAVB1PTjhS2P0ubyL0fHq4OD+TbIibnhu98FFFdqzy0mzlb2o6F/Cm6p6hcqyJTz4yp9BwzJcaxJ5JEocpjGqzbnKhwmFSbOX01qW8JQ//H8cWU5DxgxwzzDJoEpCw/0C9wATYf49CiGJtsauUz466fKFg4gjCV212DaknTSM8yUdRcJ5/CpVJVJu1jqcAWakJ2GG0S3Zl5AQ0tswiCQgm7d82ptTI+FAV04ks7F9RY6TXUqzkxl7uc2Gr99D4wjZSaHeA9HKHO7w8XC5JcFzcrmVOlp4N/L+IgDecGAZ0MDSIPFaR7A6Q9K4ELWlssgnfJXtAhQZbdoX7cnc0LTUzuZUvoOILzmMtBmBEIevZX95R0zTGqCw8Syi0AfWRPzPUqxPIQOPh9zezs6ZAyzmhhm6eDKdxA0byoB73U1UeVSP2jR7MF0NsELQi5uvn6BHGUIryPvtExCuyH5j0MPiND+1vfbX+OMNkSVIlbZahKLk+BYveBDXWAmJ+EbPt0+VrsN78VUXw==
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:(366004)(39860400002)(396003)(136003)(346002)(376002)(316002)(26005)(66556008)(64756008)(66446008)(86362001)(66476007)(76116006)(71200400001)(52536014)(66946007)(186003)(8676002)(5660300002)(7696005)(478600001)(53546011)(2906002)(6506007)(33656002)(4326008)(6916009)(8936002)(9686003)(83380400001)(55016002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: NXFifhtCD1+N6QiSkjpjkDt+vdwmvSFdgZTO46XHau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3GwYcw/cezK7f08B2qUlMCQnJjW+m0jUTY7S9koYmPInJqjC1ouPRejxzT//G/oYnRadWC8gECXjp9uvuCLqumOQyzNf/ma6YGZURgaSE+R4sptn4Y8z0miogaHgL9mxDaSff3i7nLrH3WG12N+4yXfqQCk3Cf9mFSZom81hK+q62rELtZwTpv0KKfyfY+4z7ebJrlFFdQ8zq3baeaz1Bejln+D7VCmJj5AcnONnkZ
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
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: 2dbd83f8-231d-42a5-1cbf-08d8da6b0e12
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2021 15:27:40.4589 (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: COy9M/OYlxcsqSk745XNpdek0/x8RlQ9mjg68YMCGI2q9auiwAoyPG0sZtfR2787x2z08kTvu+vbbbWCNbD91A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4613
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.18, xbe-rcd-003.cisco.com
X-Outbound-Node: alln-core-6.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/mquAOfuF24oqYEqZIFMyvqQTymg>
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 15:27:45 -0000


> -----Original Message-----
> From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> Sent: 26 February 2021 14:28
> To: Rob Wilton (rwilton) <rwilton@cisco.com>
> Cc: netmod@ietf.org
> Subject: Re: [netmod] type equivalence
> 
> On Fri, Feb 26, 2021 at 12:21:26PM +0000, Rob Wilton (rwilton) 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.
> > [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,
> >         ...
> 
> Perhaps - but it is not just the built-in type that matters...
> 
> > What does "semantics of the type" cover?
> >
> > 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";
> >   }
> 
> This example seems to be constructed since "in any format" is already
> broken to begin with. A more perhaps better example: If you have
[RW] 

Constructed merely to have exactly the same type, but with different descriptions.

> 
>     type inet:ipv4-address;
> 
> then you can't replace that with
> 
>     type inet:ipv6-address;
> 
> since that changes the semantics of the type. If you have a counter
> that only counts upwards (until it wraps or latches), then you can't
> replace it with a gauge that goes up and down. The point is that you
> break expectations about the semantics of a value of existing
> applications.
> 
> In your example, if you have time in any format, then well
> interoperability does not seem to be expected in the first place and
> then you can start a philosophical discussion whether making something
> non-interoperable even more non-interoperable is not just leading to
> non-interoperable.
> 
> Anyway, the "semantics" part was not the question that triggered this
> thread, the question was whether changing built-in types is allowed or
> not.
[RW] 

Sure, but if we are going to submit an errata for this definition, we want to ensure that updated definition is clear in all axes, not only the specific issue that was originally raised.

Hence, my question is really whether "semantics of the type" is intuitively obvious, or it requires further text that defines what is meant by that, specifically, that the description in the type (and probably parent types it's derived from) forms part of the semantics of a type definition.

Otherwise, it is possible that someone may think that it is pattern statement that defines the semantics of inet:ipv6-address, and not also the description.


> 
> > 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.
> 
> Perhaps this requires a separate thread.
[RW] 

I'll split the rest into a separate thread.

Regards,
Rob