Re: [Anima-signaling] CDDL mistake

Brian E Carpenter <brian.e.carpenter@gmail.com> Thu, 08 December 2016 02:09 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 ED9D3129622 for <anima-signaling@ietfa.amsl.com>; Wed, 7 Dec 2016 18:09:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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_NONE=-0.0001, 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 NcgRjQpOrrhU for <anima-signaling@ietfa.amsl.com>; Wed, 7 Dec 2016 18:09:34 -0800 (PST)
Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (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 13AE1129621 for <anima-signaling@ietf.org>; Wed, 7 Dec 2016 18:09:34 -0800 (PST)
Received: by mail-pg0-x22e.google.com with SMTP id x23so168327146pgx.1 for <anima-signaling@ietf.org>; Wed, 07 Dec 2016 18:09:34 -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=y+Gud0YzStJXPtiumqVEnXV1/ZN2vQLEHRsVT0IdD5g=; b=RLOytlFndGUGM7ex/xiS4ukixaqrmf6bFs9GPEl/YJyHME2WdClDVxSRh7fgBoM7C9 tXpot69Geo10Rjv0BG490StaKtGAi8l+0/gkwnCVKOnlZTh/FOWK2C003tmOP+gTmkcl BWG6zj+VhUlcYRRkeJW+9pyOoB3LTCPPUZJpjj7+yk2fQQgK5VDLPEnUrQ05r4iQZnRP FiUbNZnne9OoVJBpxkIsuJX8wHIoF4l5yZ06Z8WvCOQinKVSUoPMXgRzFMrFSb0iYl5d xWSwlbrhY68C3zHGQx+Jgq2jRRRM4llMvfPTURzYO+pGO96CLk44d2KlZpCNrYX7aPNq j50g==
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=y+Gud0YzStJXPtiumqVEnXV1/ZN2vQLEHRsVT0IdD5g=; b=EBJtFl5S4SVH801pLgtQ2ClFkrhv5HqA4rFqRN4J5ehF7+Pz8IWsQlo4pMzFSUD0rx ziwZDmmzsWQFMVrTCdUBwiH8+OtfJpKyTqdvSzS6qKwVWBtYkBCn5rAcZs0tHlMJ4vim 4zKjIDE8NM86/TrbBiVnSBERz7ZBvbE+4kLF/ejBy+NEnvzGBXjfeAuq1kOQx9Sway56 1G5jkMxYlMJpDQIy6Q5/mnkhiJODb9Gd26Gm8imQhN7JGLsxzMRO+NnJeAHrpatSrDdH lC2LJu4FeXBDrPGQccRIcw+aGfPwjddOkQFlsPqu8B+LvofWbuWAA1mDUVSc50RlX1Nc 73dA==
X-Gm-Message-State: AKaTC00sacSwIXYj0BS925PStDybMYIH4/35Ix7XZgpHNbTH3hFkTRGyGl6LQKtQuH+uWQ==
X-Received: by 10.84.197.131 with SMTP id n3mr67990547pld.6.1481162973525; Wed, 07 Dec 2016 18:09:33 -0800 (PST)
Received: from [192.168.178.21] (80.217.69.111.dynamic.snap.net.nz. [111.69.217.80]) by smtp.gmail.com with ESMTPSA id 131sm45286460pfx.92.2016.12.07.18.09.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 18:09:32 -0800 (PST)
To: Michael Richardson <mcr+ietf@sandelman.ca>
References: <0f17ca76-f4ed-5596-776b-34e666e10d22@gmail.com> <32399.1481152073@obiwan.sandelman.ca>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <6e4bb53e-ec73-2790-0129-0953e7e96612@gmail.com>
Date: Thu, 8 Dec 2016 15:09:36 +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: <32399.1481152073@obiwan.sandelman.ca>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima-signaling/lBkq0yplLoRmliw9Z_snqlG6yr0>
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 02:09:36 -0000

On 08/12/2016 12:07, Michael Richardson 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,
and doing so in a language where uints are easier to deal with than bits.
But ignoring (or throwing an error) for unknown flags doesn't seem hard in
either case.

At the moment it's an error in my code which I can fix in a few minutes.
I'm happy to do so, and leave the CDDL unchanged. I really don't have strong
feelings, just want input.

   Brian