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

Dave Crocker <dcrocker@gmail.com> Wed, 20 September 2023 16:26 UTC

Return-Path: <dcrocker@gmail.com>
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 C1705C151551; Wed, 20 Sep 2023 09:26:29 -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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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] 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ei7BRhVT29pc; Wed, 20 Sep 2023 09:26:25 -0700 (PDT)
Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 70365C151549; Wed, 20 Sep 2023 09:26:25 -0700 (PDT)
Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-68fbbb953cfso6232730b3a.2; Wed, 20 Sep 2023 09:26:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695227184; x=1695831984; darn=ietf.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5yHRdqaPFH0Bb4oLnNtA9n8qqqGjnY48MRLdboaSbNM=; b=QpnlFXdsuKCU0WKTuJrkb878PDtTiqDUi5aktoWSEVRJo+3kquYaMcqdHx7bKwPcda VDNJfUdYvv97wu2ph+Bs51dShREmee3BfzL5xNZQAOwW23phcqKhrB7t+A+u8D4gtsnn ekSwPpoxX7NC9zE/XXw/UXxcaw15/l9ARMmwyYWE0HFzjOiEoEhG0SkzOsfo2TJOPf08 E+9tTJ9DcAwt7gFnAH88OWAIUdT3xu10qqCJiukt6+n98rwzsHsSo0jIonWrFvpZEUmv swhkSzPOD1SZ26Ti8Z1YRyb8h0wgjSuorbWbgzW+B2zg/H9Sf/F538t+PwX0Ym1aUxhV qHgQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695227184; x=1695831984; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=5yHRdqaPFH0Bb4oLnNtA9n8qqqGjnY48MRLdboaSbNM=; b=DrcvYvpeiopcersjutgIUoir5muaSCrXVY8NxtMVu8f86ykLmifDuzTtqOyRajYgnv YmeCgYR+sBPpV0Ym2DKdoYMxdWAspZlMIjt5G5g93o4REYaPfK0uMCDRfBsqd9idUpPZ eyo5392S9r9Llx8/duMCruPK5NIR45Cg48UycNdTAPIUCPMFgxZUpT1Fsv8ZwS0h3LBf TN4FINo+FKbVwv5YKGQjwVhv3CuvHzGDnAk64pD+wQ8tNDcuA95Si8iQZyM4phTBCiI5 cQb2NENpgQ+Zjf0nL5p99S/ufxnGCqklGhsMHpfQBp06wsHGK/p1PfTcykc+bL2mGl2s aQdQ==
X-Gm-Message-State: AOJu0YzypyPvwJnfPMvc8h4FIpLAAALd2gwt8PViRwZyKsuoTEhaWv+Z sHHDBybSiZ5K5yzyEV8SITo1mkEvGjk=
X-Google-Smtp-Source: AGHT+IHSnHXJvl1t75+4tGMOPNfe2hJxU3P/FjIHxbR2i84Q8XAVcXizwxeUg5Yi5/4xUGplmyp4wA==
X-Received: by 2002:a05:6a00:2493:b0:682:4c1c:a0fc with SMTP id c19-20020a056a00249300b006824c1ca0fcmr3768211pfv.19.1695227184461; Wed, 20 Sep 2023 09:26:24 -0700 (PDT)
Received: from [192.168.0.103] (c-98-42-225-165.hsd1.ca.comcast.net. [98.42.225.165]) by smtp.gmail.com with ESMTPSA id g21-20020a62e315000000b0068c670afe30sm10408304pfh.124.2023.09.20.09.26.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Sep 2023 09:26:24 -0700 (PDT)
Content-Type: multipart/alternative; boundary="------------Es6YG7XMlskfHYHRYsqG2eHg"
Message-ID: <3c38cda7-98d5-48c8-9b36-ea25f1ab5da4@gmail.com>
Date: Wed, 20 Sep 2023 09:26:24 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Carsten Bormann <cabo@tzi.org>, "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>
Cc: json@ietf.org
References: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org>
From: Dave Crocker <dcrocker@gmail.com>
In-Reply-To: <A9C3993F-D73B-4529-A94B-A6A33589726E@tzi.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/-4yqtaGTS63qCOj0D1haYpq6Ivg>
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 16:26:29 -0000

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