Re: [Anima-signaling] CDDL mistake
Brian E Carpenter <brian.e.carpenter@gmail.com> Thu, 08 December 2016 19:02 UTC
Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima-signaling@ietfa.amsl.com
Delivered-To: anima-signaling@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF632129526 for <anima-signaling@ietfa.amsl.com>; Thu, 8 Dec 2016 11:02:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 L3p2u8XxQL2p for <anima-signaling@ietfa.amsl.com>; Thu, 8 Dec 2016 11:02:14 -0800 (PST)
Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 40C1112950A for <anima-signaling@ietf.org>; Thu, 8 Dec 2016 11:02:14 -0800 (PST)
Received: by mail-pf0-x231.google.com with SMTP id c4so84915498pfb.1 for <anima-signaling@ietf.org>; Thu, 08 Dec 2016 11:02:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=pUmmStdHaUl/Qye8l8+/m9tRykTfOb3mQhuibsjfP5E=; b=L4Bmoq229S6h30kVNYzSexvyzCkgkPtvzCM3QvFJOoDvYEg+5GGvhx/2AvQyYXVfCK 27ZNBgrtU1BMLtuu4Io5UadUbifLQqFlj0p+rXl6OS4XjoJXslmC9DqbEWl+PeNawIzL PiX5XbBI/YaDfo43i3TuGgi2oxS/TSQLQshlNvBJ3z34W0Nmug3TjIGEC9C1JbBk+wTx uspLccStNmY+94l2yvPb/HRLOAcd+sOaJBnVETYNZCA0PA0wQhi1nbOgLCH2Q/ALxgYD yEebnd3MCg+RPoIbZcM4fVJx9vWSXWTODMwzRBkdX67hzuXYfJqja9BNC2fyWRpuTFMR X4zw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=pUmmStdHaUl/Qye8l8+/m9tRykTfOb3mQhuibsjfP5E=; b=mtVT4xwB57lFI/j8rAbHbZ6B6gSFxIji4dxuNNuQzvri1giSGpCq1QMy6rbxdsVnaq TzvOHg3OIBlXxxEhlkSareo3Xst6Wud0VdTndbFFWRaEz/0WAVq5xmdREIesiQTURY80 xIns0RKoYqscEMoRUfbnPjWPKRKEaRdXpOhy24YRqoTzKtgC9rLwceaYZ+H8ouyF7E1m RGOG0liPOztM/lmJ6pv5oggfubtM5a9Licd0uS+ipx86Kq/39oWmVxrhU+/5WTeUkVFB sq+1PLMQ9JRbtJBmANjQgkxChHofUh2HPGt/s/1U07AxIEEX89bxfg9cEMDrUp2QjAc4 eFsw==
X-Gm-Message-State: AKaTC01UyUyyqJt+pWvcaedbl2oe3scoIVSvtx1gKPMXcQd4RwFUQ/4OvajUCDMM1G5VrA==
X-Received: by 10.99.127.16 with SMTP id a16mr105856699pgd.60.1481223733518; Thu, 08 Dec 2016 11:02:13 -0800 (PST)
Received: from [192.168.178.21] ([118.148.121.24]) by smtp.gmail.com with ESMTPSA id x2sm51841413pfx.65.2016.12.08.11.02.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 11:02:13 -0800 (PST)
To: Michael Richardson <mcr+ietf@sandelman.ca>
References: <0f17ca76-f4ed-5596-776b-34e666e10d22@gmail.com> <32399.1481152073@obiwan.sandelman.ca> <6e4bb53e-ec73-2790-0129-0953e7e96612@gmail.com> <14527.1481212581@obiwan.sandelman.ca>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <32536e38-267b-8ce5-a638-d5d6610ccebe@gmail.com>
Date: Fri, 09 Dec 2016 08:02:19 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1
MIME-Version: 1.0
In-Reply-To: <14527.1481212581@obiwan.sandelman.ca>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima-signaling/7npMRN3Vlr72_ai12FAo-rkXlB0>
Cc: Anima signaling DT <anima-signaling@ietf.org>
Subject: Re: [Anima-signaling] CDDL mistake
X-BeenThere: anima-signaling@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Mailing list for the signaling design team of the ANIMA WG <anima-signaling.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima-signaling/>
List-Post: <mailto:anima-signaling@ietf.org>
List-Help: <mailto:anima-signaling-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Dec 2016 19:02:16 -0000
On 09/12/2016 04:56, Michael Richardson wrote: > > Brian E Carpenter <brian.e.carpenter@gmail.com> wrote: > >> Brian E Carpenter <brian.e.carpenter@gmail.com> wrote: > >> > I've just realised that I have a mistake in my GRASP code > >> > concerning the following CDDL: > >> > >> So, basically, you are replacing a set with an enum. > >> I don't see a problem for the current three flags. > >> > >> > On balance I think this is better (and certainly easier to implement). > >> > There doesn't seem to be any advantage in using bit positions. > >> > >> What happens if we need an additional flag? > >> Bit positions had the advantage that you understand the things you > >> understand > >> and ignore the rest. > > > I noticed the problem while adding code for the (proposed) new > > F_NEG_DRY flag, > > I think upon reflection, that I'd rather the bit definition. Yes, I was mulling it over and I reached the same conclusion. I think I need to to tweak the text a bit to avoid other implementers making the same mistake that I did. Thus: <section title="Objective flags"> <t>An objective may be relevant for discovery only, for discovery and negotiation, or for discovery and synchronization. This is expressed in the objective by logical flags:</t> <t><figure> <artwork><![CDATA[ objective-flags = uint .bits objective-flag objective-flag = &( F_DISC: 0 ; valid for discovery F_NEG: 1 ; valid for negotiation F_SYNCH: 2 ; valid for synchronization F_NEG_DRY: 3 ; negotiation is dry-run ) ]]></artwork> </figure></t> <t>Note that for a given negotiation session, an objective must be either used for negotiation, or for dry-run negotiation. Mixing the two modes in a single negotiation is not possible.</t> </section> Does this work? Now I will mend my Python code. Brian
- [Anima-signaling] CDDL mistake Brian E Carpenter
- Re: [Anima-signaling] CDDL mistake Michael Richardson
- Re: [Anima-signaling] CDDL mistake Brian E Carpenter
- Re: [Anima-signaling] CDDL mistake Michael Richardson
- Re: [Anima-signaling] CDDL mistake Brian E Carpenter
- Re: [Anima-signaling] CDDL mistake Michael Richardson
- Re: [Anima-signaling] CDDL mistake Brian E Carpenter