Re: [netmod] type equivalence
Martin Björklund <mbj+ietf@4668.se> Fri, 26 February 2021 15:06 UTC
Return-Path: <mbj+ietf@4668.se>
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 1E9D43A09BC for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:06:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.099
X-Spam-Level:
X-Spam-Status: No, score=-0.099 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, PDS_NAKED_TO_NUMERO=1.999, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=htQSY67Z; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=UIC0fBY7
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 rVUimzrQuIV7 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:06:22 -0800 (PST)
Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7A3CC3A09B9 for <netmod@ietf.org>; Fri, 26 Feb 2021 07:06:22 -0800 (PST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 53CFCBC0; Fri, 26 Feb 2021 10:06:21 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 26 Feb 2021 10:06:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= ix7ZGhfO/C4q2FIrZjxzEpSRILevKWlpj5TzjMoUs3o=; b=htQSY67ZonEDqHPh ocUZZn2aJihbmFpNnv5RkU5iM8fYHrJh1xYVPimKFXK7RPgj1eI27+Mjg7KvOLky NPToa+EL/cLt0Kf3H3i0TyjMNmtNHWNIU0xnlA2aWD1YbATljR+5qRkZ1mtyKIE6 /RlmLFwjj8vYjfEx/xKuVWNNGoQEJDI/YMww1cvjFCngssTnKEkH93CHEEeuDgxv ZS22YxT5ucyOFnb3G8xbf4IxyEVa+KsxAFv/kEMUGbmaRhYk5lwoxx8qzHIMevHD Yv67KRz5QgEKCq8kvVojZVlP/D1WKQXju34rI4bxc2d/Q//cMdGbq4g2dIrIp1kG J5Rg8w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ix7ZGhfO/C4q2FIrZjxzEpSRILevKWlpj5TzjMoUs 3o=; b=UIC0fBY7LLPBmEM5lX0ex+tWaFyQWWAi+pa/4i33Tlj2Bqzvh5JETO11h pfVk6DF1XMLnJxJ/HjuSMVb4BJpc1ibZMJ1+vlYKBZ3GnJbZcKaDQznZuTeHCZTG bputIvxnI5r+P+hJukX9mrpHAdV5aGSBebt1iv9aoJmC87B/Kywx71OwuLJ8cYf/ GTC+MKBVR8o+ffgOiwMzDP3f0MJhkQxAVljMhxM5EW1e4LHzaNqjKisX+m1mJsIb fIfBD5WkqIzofXpJRwmF2qEe7wt4Jtla6qchvb31SJQUkpANDNkyYr7UmENs3lym tT9QRIKaETK0fEdXH8R4WcY042Yyg==
X-ME-Sender: <xms:ag45YPQmJxDnhLNibTYpwaURVWCoP7hDrhk4lnIdWlEUZlKygzKaUA> <xme:ag45YFG5MixtF1SPeSBgiCTeoeIUc1XNmC2e1fnpaWLjTIqMvBcn3X7KwwVXmOHNQ 4JdxlhYY9pfNDzc0i8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrledugdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthhqre dtredtudenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpeduieevjeduffdvvedugedvud ehiedvleefhfeuheffjeeuvdegiedvffejleevheenucffohhmrghinhepjhgrtghosghs qdhunhhivhgvrhhsihhthidruggvpdhivghtfhdrohhrghenucfkphepudehkedrudejge drgedrvdduheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmsghjodhivghtfhesgeeiieekrdhsvg
X-ME-Proxy: <xmx:ag45YD9gWFRDROd756-P7sMgXfkNewlJYZ-MQZK3qqSF54MyHxw2Fg> <xmx:ag45YHKM_13Htepxwy4HxeuUBvq_m1WuDBLEQRdyJSMd_onyuntjlw> <xmx:ag45YOZAkyeQDPXABM1csvGBqpyEx6TPNtiB-SzrL13vq2iwghms9A> <xmx:bA45YMHkWOnhvMm4-LXFYOEgCxc6h7o_wBnLCo42mIA1Wvg4hmXRNA>
Received: from localhost (unknown [158.174.4.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 3E7AC240054; Fri, 26 Feb 2021 10:06:18 -0500 (EST)
Date: Fri, 26 Feb 2021 16:06:16 +0100
Message-Id: <20210226.160616.1276834419454673357.id@4668.se>
To: rwilton=40cisco.com@dmarc.ietf.org
Cc: j.schoenwaelder@jacobs-university.de, netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <MN2PR11MB4366BD4F7DE5297B38488749B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <450E683C-4F47-4314-BA63-DAC17AF60970@tzi.org> <20210224203915.2ysjgjv6izjoh6to@anna.jacobs.jacobs-university.de> <MN2PR11MB4366BD4F7DE5297B38488749B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DlSbObU-BY2xvE6k8K0T94wkfsE>
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:06:24 -0000
"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. > [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] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Ladislav Lhotka
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Ladislav Lhotka
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence tom petch
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] [SUSPECTED SPAM] Re: type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann