Re: [rfc-i] sourcecode type

Carsten Bormann <cabo@tzi.org> Thu, 28 October 2021 21:42 UTC

Return-Path: <rfc-interest-bounces@rfc-editor.org>
X-Original-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Delivered-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74DDB3A1255; Thu, 28 Oct 2021 14:42:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.651
X-Spam-Level:
X-Spam-Status: No, score=-2.651 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 I3ZkXGl-F3b0; Thu, 28 Oct 2021 14:42:55 -0700 (PDT)
Received: from rfc-editor.org (rfc-editor.org [4.31.198.49]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2C4833A1259; Thu, 28 Oct 2021 14:42:55 -0700 (PDT)
Received: from rfcpa.amsl.com (localhost [IPv6:::1]) by rfc-editor.org (Postfix) with ESMTP id E3F985BEC54; Thu, 28 Oct 2021 14:42:54 -0700 (PDT)
X-Original-To: rfc-interest@rfc-editor.org
Delivered-To: rfc-interest@rfc-editor.org
Received: from localhost (localhost [127.0.0.1]) by rfc-editor.org (Postfix) with ESMTP id 30AFB5BEC54 for <rfc-interest@rfc-editor.org>; Thu, 28 Oct 2021 14:42:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at rfc-editor.org
Received: from rfc-editor.org ([127.0.0.1]) by localhost (rfcpa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LjkWw5AxZzSr for <rfc-interest@rfc-editor.org>; Thu, 28 Oct 2021 14:42:50 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) by rfc-editor.org (Postfix) with ESMTPS id BCEAEE535D for <rfc-interest@rfc-editor.org>; Thu, 28 Oct 2021 14:42:50 -0700 (PDT)
Received: from [192.168.217.118] (p5089a10c.dip0.t-ipconnect.de [80.137.161.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4HgJvB3Z5Nz30Qr; Thu, 28 Oct 2021 23:42:46 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <d9a37e66-ea2a-f9d4-3b9b-25fb9c8578c4@alum.mit.edu>
Date: Thu, 28 Oct 2021 23:42:46 +0200
Cc: rfc-interest@rfc-editor.org
X-Mao-Original-Outgoing-Id: 657150165.9885401-f58ded3a543c4e0141d6b2eda15a963d
Message-Id: <F0912709-40F6-419D-8EC2-EA8EA24E3B9D@tzi.org>
References: <20211028162226.61EAC2F30A27@ary.qy> <b920ba48-62f1-9d8b-efd7-64b80edb9d9b@mozilla.com> <d9a37e66-ea2a-f9d4-3b9b-25fb9c8578c4@alum.mit.edu>
To: Paul Kyzivat <pkyzivat@alum.mit.edu>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Subject: Re: [rfc-i] sourcecode type
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://www.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <http://www.rfc-editor.org/pipermail/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://www.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Errors-To: rfc-interest-bounces@rfc-editor.org
Sender: rfc-interest <rfc-interest-bounces@rfc-editor.org>

This is becoming a bit ABNF-specific, but I’ve run into that problem as well.

Ideally, I’d like to be able to write a generic script that looks at JSON, ABNF, YANG, … in a draft and tells me what’s wrong.

A lot of insights that such a tool will need to consider are in [1]  — I don’t want to repeat them all here.

[1]: https://github.com/rfc-format/draft-iab-xml2rfc-v3-bis/issues/195

In particular, we ran into the “exposition only” vs. “normative” part in RFC 8990, and came up with a solution [2] that works for this RFC, but not in general.

[2]: https://github.com/rfc-format/draft-iab-xml2rfc-v3-bis/issues/195#issuecomment-850815497

> I've seen fragments of ABNF used in a variety of ways:
> 
> 1) Examples, perhaps just a single rule, typically with references to other rules not defined in the fragment. The definitions might be defined in other fragments, only described in text, or not defined at all.

You are missing:

1a) ABNF rule right-hand—sides (production “elements” in RFC 5234); exposition or normative.

See RFC 8288 for a ton of these.

This was pre-8650 (i.e., RFCXMLv2), but the XML source I saved from that time has type=“abnf2616” both for RHS only and full rules (2616 because it uses the extended ABNF from RFC 2616, which is similar to that from RFC 822, with #rulename for a comma-separate list).

> 2) A complete chunk of ABNF that has been broken into multiple fragments interspersed among text discussion of it, perhaps spread across multiple sections of a document.

That was the problem we solved in RFC 8990.
(The tool support for that is easy in CDDL, as CDDL allows having the same rule twice, so you just concatenate the extracted fragments with the normative part and check the result.)

> 3) A semi-complete chunk of ABNF with some undefined rules. Text or comments in the ABNF refer to other documents for definition of the missing rules.

ABNF-specific problem.  We should mitigate this a bit for ABNF, stay tuned…

> 4) A combination of (1) and (3), where the fragments are copies of portions of the full ABNF, accompanied with discussion.

Or may this was the problem we solved in 8990…
But I think we now know that, beyond sourcecode types, we need to distinguish exposition sourcecode from full sourcecode (and example from normative in the latter).  Add in deliberately broken examples...

> Required validation strategies vary for these cases. They typically require quite a bit of hands-on, which discourages doing it often (or ever). It is really easy to say "there was just a small change in this version - its obvious that it is ok".

Yeah.  I did this once, in RFC 7049, at the cost of two errata :-)
Right, let me add:

(5) sourcecode snippets that are integrated inline into the paragraphs of text, but still need to be validated.

> I would like to see some kind of framework for automated verification of sourcecode. The xml is just a piece of that, but an important piece.

This is clearly a larger development project, but a highly desirable one.
Getting sourcecode types right is going to be a small, but important element for that.
(Note that his is mostly going to be a tool that authors need to be comfortable using, but that will need to be applied at the RPC as well.)

Grüße, Carsten

_______________________________________________
rfc-interest mailing list
rfc-interest@rfc-editor.org
https://www.rfc-editor.org/mailman/listinfo/rfc-interest