Re: [Json] [abnf-discuss] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?

Joe Hildebrand <hildjj@cursive.net> Wed, 20 September 2023 17:40 UTC

Return-Path: <hildjj@cursive.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8A535C14CE40 for <json@ietfa.amsl.com>; Wed, 20 Sep 2023 10:40:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cursive.net
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id COb6GgaYbY_F for <json@ietfa.amsl.com>; Wed, 20 Sep 2023 10:40:00 -0700 (PDT)
Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E12DDC14CE24 for <json@ietf.org>; Wed, 20 Sep 2023 10:40:00 -0700 (PDT)
Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-792965813e7so4440439f.2 for <json@ietf.org>; Wed, 20 Sep 2023 10:40:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cursive.net; s=google; t=1695231600; x=1695836400; darn=ietf.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SMb+oZ4p6onJX2y+GTYEok/iAif47CIDRjWDNfbYiOc=; b=Nsw5+NWo4Bvrbe5gI3LUvA/Oo0AJrFDMV55PMn04XravrSRIWsMNYkZNQ2sWN2hka9 HyeYeburhAnyaVLHNr0LSW4d9GTpQUE9Akk+SKxkffAFfFEs6jZ0q6VyNwH4rRfZm2By p4c2u3+D3LuEYRkKUobRoOVgN8R+h+c2X2Cuk=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695231600; x=1695836400; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SMb+oZ4p6onJX2y+GTYEok/iAif47CIDRjWDNfbYiOc=; b=LGtvChwXa8obfPf9hRSnNMJFV0oaCpa0+sewJA2+87LI/n7qc74sjk83MN3Wf6k99Q ebhpCyMo5ZwuCh6Npr0PxbExPaM87CQiw69GT5ezNvO6yqhBNFHDRdJm6N2/b0vHMlwb x4Z5e06+TShCSInEIE8JBdnG5M+Fc1hgftQuQDUH9DZ1QGpdmotFzY3CKbZR7yPCHsUd YfaEc/O2fV++GxkJsN6F2TC4GJMwoSM2SUdM2ndaeDtB2c9HezKDs1y2bF4PwEoW2xAY Updsp1zbHnFHXqnPpwEFtJ8EMLVlKrRH+ENo8BWR9Zs6zrm9kZEI99zi5RrJ5f/yt3y6 sZIg==
X-Gm-Message-State: AOJu0Yxpyyx0cU3nVly7F08vLb7STNY111oxGz5Ia+vtf/r083YebTK6 MNTJARsPLGigFc86y7UNXoXz+vUflBsDbY+2P8M=
X-Google-Smtp-Source: AGHT+IFSKpfLUSv6C2643OEXpW9dk05VIP7EgG0HPu8ekWVipHk3ydwfXVW9C95ZjrjN7laQjZIyvg==
X-Received: by 2002:a05:6602:1592:b0:798:2665:8939 with SMTP id e18-20020a056602159200b0079826658939mr4210047iow.20.1695231599786; Wed, 20 Sep 2023 10:39:59 -0700 (PDT)
Received: from smtpclient.apple ([2601:282:2101:423e:c189:8ade:95f7:a63a]) by smtp.gmail.com with ESMTPSA id b11-20020a02a58b000000b0042b09036e5fsm4179954jam.175.2023.09.20.10.39.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2023 10:39:59 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Joe Hildebrand <hildjj@cursive.net>
In-Reply-To: <3c38cda7-98d5-48c8-9b36-ea25f1ab5da4@gmail.com>
Date: Wed, 20 Sep 2023 11:39:48 -0600
Cc: Carsten Bormann <cabo@tzi.org>, "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>, json@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <360AE449-DFD5-44D7-BB57-18C5DECFB741@cursive.net>
References: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org> <3c38cda7-98d5-48c8-9b36-ea25f1ab5da4@gmail.com>
To: Dave Crocker <dcrocker@gmail.com>
X-Mailer: Apple Mail (2.3731.700.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/hxtGqEzj-aQUy56RF8VZ02sXoQE>
Subject: Re: [Json] [abnf-discuss] Are the Core Rules (Appendix B.1 of RFC 5234) always present in an ABNF spec?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Sep 2023 17:40:04 -0000

I agree with Dave and Julian.  The fix for this errata should be a statement about which rules are imported, and a statement that CHAR is NOT imported, to be absolutely specific.  Changing the ABNF itself is neither needed nor desirable, IMO.

— 
Joe Hildebrand

> On Sep 20, 2023, at 10:26 AM, Dave Crocker <dcrocker@gmail.com> wrote:
> 
> On 9/20/2023 8:20 AM, Carsten Bormann wrote:
>> 
>> The problem here is that RFC 8259 seems to (implicitly) import “DIGIT" and “HEXDIG" from RFC 5234 Appendix B.1, but also defines a rule “char”, which conflicts with “CHAR” in Appendix B.1 (rule names are case-insensitive per Section 2.1 of RFC 5234).
>> 
>> Is this a bug in 8259?
> Probably.  To use a rule that is not defined within the document using it has to mean that it comes from somewhere else.  (This is a tautology, but seems to be needed as a foundation for the concern here.)  
> If it comes from somewhere else, how is that importation specified?  
> If it is implied, how is a reader to reliably and accurately know what is imported and where it comes from?  Readers vary widely in subject matter knowledge and a specification needs to work for all readers.
> In other words, it must not be 'implied'.  It has to be specified explicitly.
> 
> 
>> And, if yes, is that bug that “char” and “CHAR” conflict (i.e., because B.1 is always implicitly imported), or that 8259 forgets to import DIGIT and HEXDIG (i.e., because B.1 is not implicitly imported)?
> This hits some different issues, IMO.
> One is formal specification requirements.  To that, anything clearly and precisely defined in fine.  So if a rulename is common elsewhere, there is nothing wrong with defining it differently, within the 4 walls of a given specification.
> The other is a human factors concern.  If readers are generally already used to using the rulename and that rulename has a particular semantic, defining it differently within a spec creates a cognitive conflict, called proactive inhibition.  That invites error.
> However sometimes it can be useful to note the history of the name and explicitly redefine it.  As long as the rationale for doing this is clear and documented, it might make sense to do. This would be an explicitly 'derivative' specification of the rulename, rather than purely replacement.
> Lastly, while it might make sense to say that a spec citing the ABNF spec can be assumed to be importing rules from it, that seems to me a pretty risky approach to spec writing.  For example:
>     • there is nothing in the ABNF spec that declares these rules to be automatically imported by users of ABNF
>     • having something in an Appendix means it is extra, and therefore not 'inherent'
>     • the language at the start of the Appendix is "This appendix contains some basic rules that are in common use." which is casts this as informative rather than normative.
> 
> d/
> -- 
> Dave Crocker
> dcrocker@gmail.com
> mast:@dcrocker@mastodon.social
> 408.329.0791
> 
> Volunteer, Silicon Valley Chapter
> Information & Planning Coordinator
> American Red Cross
> dave.crocker2@redcross.org
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json