[Tools-discuss] Re: [art] Re: Exploring ABNF extracts from RFCs
Dominique Hazael-Massieux <dom@w3.org> Fri, 26 July 2024 16:49 UTC
Return-Path: <dom@w3.org>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 44A7CC14F6BC; Fri, 26 Jul 2024 09:49:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.109
X-Spam-Level:
X-Spam-Status: No, score=-7.109 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] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org
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 7XWy-pMtMzTQ; Fri, 26 Jul 2024 09:49:27 -0700 (PDT)
Received: from anthe.w3.org (anthe.w3.org [IPv6:2600:1f18:7d7a:2700:318c:b74a:bdca:4a0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DD4EDC1DA1EC; Fri, 26 Jul 2024 09:49:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version: Date:Message-ID:Reply-To; bh=C0lrUkDdbJFluykeK+sXHPBu4wUt0THiXy3Flk4rGpA=; t=1722012563; x=1722876563; b=LnKfoeU9J/rkIuSs0lDCfgsYFuDM47H5g/vCw86m76K7oDP V/hLUdus/tc93QNQhGRGfN2MVSwKuxD752KlNho/gdpzKcll+7A7mmXzzKAVqDbbntGEK+Uu/DbgQ goBrX35t/Qpfai+S/aD4DmBcw2Jh6bMs5KDU3mbpSAggnoQQmX7XzfemahzDW30MIfDxdj4EuJRER tgH9W7U/C4jKp/7ZUkzxuNm9KOdqgblCFKvZREW/6xAnZ/OnLlPB31Tqi0OblY6+A2re4cQlaTnfA qN7DnfhY11C7HPDShXTGv/DJMdmvI0tfRs9lpDW2S5Y2+Ah/mVsJ1eQHjJMEAV7Q==;
Received: from ip-10-0-0-242.ec2.internal ([10.0.0.242] helo=spica.w3.internal) by anthe.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <dom@w3.org>) id 1sXO8A-00FBXf-2M; Fri, 26 Jul 2024 16:49:22 +0000
Received: from localhost ([::1] helo=spica.w3.internal) by spica.w3.internal with esmtp (Exim 4.96) (envelope-from <dom@w3.org>) id 1sXO8A-00AzdS-2A; Fri, 26 Jul 2024 16:49:22 +0000
Received: from [IPV6:2a01:cb1c:844e:f100:d049:8743:7b83:3d5b] ([2a01:cb1c:844e:f100:d049:8743:7b83:3d5b]) by spica.w3.internal with ESMTPSA id YlggMJHTo2Yw+ycANTRr8w (envelope-from <dom@w3.org>); Fri, 26 Jul 2024 16:49:21 +0000
Message-ID: <ff29ebe0-efbc-4bfc-8c79-f09ccbe3ffe3@w3.org>
Date: Fri, 26 Jul 2024 18:49:20 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Paul Kyzivat <pkyzivat@alum.mit.edu>, Carsten Bormann <cabo@tzi.org>, art@ietf.org
References: <89a4a566-8ffe-413e-9196-3f08bebe8d20@w3.org> <99E8B992-AF60-4CD6-9786-2EC180E95E4D@tzi.org> <2867abac-8c62-41b2-a20c-cb9fe8d3736d@alum.mit.edu>
Content-Language: en-US
From: Dominique Hazael-Massieux <dom@w3.org>
In-Reply-To: <2867abac-8c62-41b2-a20c-cb9fe8d3736d@alum.mit.edu>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: JSX53NO3NGQJS7SBBAOVURIURFL7Z4OE
X-Message-ID-Hash: JSX53NO3NGQJS7SBBAOVURIURFL7Z4OE
X-MailFrom: dom@w3.org
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tools-discuss.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: tools-discuss <tools-discuss@ietf.org>, CBOR <cbor@ietf.org>, abnf-discuss@ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Tools-discuss] Re: [art] Re: Exploring ABNF extracts from RFCs
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tools-discuss/wf6YZTLtdki7_r9Vng04D6nHgLM>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tools-discuss>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Owner: <mailto:tools-discuss-owner@ietf.org>
List-Post: <mailto:tools-discuss@ietf.org>
List-Subscribe: <mailto:tools-discuss-join@ietf.org>
List-Unsubscribe: <mailto:tools-discuss-leave@ietf.org>
Thanks Carsten for the pointers to the CDDL work and the existing extractions you've built! Reactions of my own to Paul's questions based on my automated ABNF consolidation experience: Le 26/07/2024 à 18:09, Paul Kyzivat a écrit : > There are interesting open issues around abnf dependencies: > > * If I want to use a rule defined in another document, do I add to my > abnf *all* of the foreign abnf that contains the rule definitions I > need? Or do I only import the specific rules I need and any other rules > those depend on? The consolidater takes the approach of importing only the specific rules needed and their dependencies. > * What to do if the imported abnf has rule names that duplicate ones I > have defined in my own abnf? Should the abnf of each document live in a > distinct namespace, linked only for the cross referencing rule names? Or > should the writer of abnf with dependencies be responsible for avoiding > naming conflicts? The consolidater assumes that each ABNF lives in its own namespace, and renames conflicting imported rules (by prefixing them with the rfc name they're imported from). (when I started the project, I assumed name conflicts would be considered a bug; but there were too many instances of it to make that assumption sustainable) > * How to deal with the different ways abnf is used in documents. E.g., > > - the simple case: the document contains a single block of abnf defining > the syntax for the protocol that is the subject of the document. > > - the doc has several blocks of abnf, each defining a separate syntax. > Rule names may be reused, with different syntax, in each. > > - the doc contains (possibly incomplete) fragments of abnf scattered > through the doc text, plus a complete consolidated abnf syntax that > likely duplicates some or all of the fragments. > > - the doc contains a complete abnf syntax that is broken into fragments > interspersed with text descriptions. Another case that I had to consider for my tool: RFC 9394 extends two versions of IMAP (RFC 3501 and 9051), and does so by extending rules that are present ine one version but not the other - I'm treating these as profiles in the ABNF (which I think would work to deal with the other cases you mention). > My interest in this came from working on sip for many years. It has a > root document RFC3261, and many extension & revision documents. There > are extensive dependencies among these documents. The manner of > expressing dependencies evolved over time. E.g., > > - Simple text in the doc prior to the abnf. E.g.,: "The rules foo, bar, > and baz are defined in RFCnnn". > > - Saying (or simply assuming) that all the Core Rules from RFC5234 are > available. > > - Stating the dependency in comment in the abnf > > - Stating the dependency in an abnf prose-val. E.g., > foo = <foo as defined in RFCnnn> The consolidater tool as it tries to determine whether a given ABNF can be consolidated identifies not only rules that are undefined, but also rules that are defined only as prose as indeed they often contain references to other RFCs. > The latter is now my recommended best practice. It results in an abnf > that can be fully syntax checked. Ideally we would formalize the syntax > within the prose-val so it can be mechanically processed. Or define a > new syntax for import, and possibly for namespaces. An import and a namespace syntax would sure have helped :) Dom
- [Tools-discuss] Exploring ABNF extracts from RFCs Dominique Hazael-Massieux
- [Tools-discuss] Re: Exploring ABNF extracts from … Carsten Bormann
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Paul Kyzivat
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Carsten Bormann
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Dominique Hazael-Massieux
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Paul Kyzivat
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Paul Kyzivat
- [Tools-discuss] Re: [art] Re: Exploring ABNF extr… Carsten Bormann
- [Tools-discuss] Re: [art] Exploring ABNF extracts… Carsten Bormann
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Dave Crocker
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Carsten Bormann
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Dave Crocker
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Paul Kyzivat
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Dave Crocker
- [Tools-discuss] Re: [abnf-discuss] Re: [art] Re: … Carsten Bormann