Re: [abnf-discuss] defining "compatible" extensions

Ned Freed <ned.freed@mrochek.com> Thu, 10 July 2014 03:21 UTC

X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Delivered-To: barryleiba.mailing.lists@gmail.com
Received: by 10.58.106.73 with SMTP id gs9csp87589veb; Wed, 9 Jul 2014 20:21:02 -0700 (PDT)
X-Received: by 10.66.146.199 with SMTP id te7mr19147380pab.106.1404962460532; Wed, 09 Jul 2014 20:21:00 -0700 (PDT)
Return-Path: <abnf-discuss-bounces@ietf.org>
Received: from mail.ietf.org (mail.ietf.org. [2001:1900:3001:11::2c]) by mx.google.com with ESMTPS id rh8si2050205pbc.176.2014.07.09.20.20.59 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jul 2014 20:21:00 -0700 (PDT)
Received-SPF: pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) client-ip=2001:1900:3001:11::2c;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of abnf-discuss-bounces@ietf.org designates 2001:1900:3001:11::2c as permitted sender) smtp.mail=abnf-discuss-bounces@ietf.org; dkim=pass header.i=@ietf.org
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 9204C1A02EB; Wed, 9 Jul 2014 20:20:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1404962459; bh=VeUOI3mMyR614u8st9n/NHAz0w6LcNiat8n+vK6elqs=; h=MIME-version:Message-id:Date:From:In-reply-to:References:To:Cc: Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Content-Type:Content-Transfer-Encoding:Sender; b=SuwdCtRfnZMNu5O6hm32zD6KJqhef27tEoEhhOnf+1gqpPp20U2Fy+G/IrgmFRpE2 0uq+1QMhvQNvpNTBSPs2HT8MvFK2QhB1DBVkgVcie+QO7CBqxlXpHcrkBQd/CDRssQ PDovdjGgml81wJTW9q/Mub9g65+zmudQRiaBFq0o=
X-Original-To: abnf-discuss@ietfa.amsl.com
Delivered-To: abnf-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4B0CD1A041D for <abnf-discuss@ietfa.amsl.com>; Wed, 9 Jul 2014 11:49:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.653
X-Spam-Level:
X-Spam-Status: No, score=-2.653 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 YjThY6g5tjZp for <abnf-discuss@ietfa.amsl.com>; Wed, 9 Jul 2014 11:49:37 -0700 (PDT)
Received: from mauve.mrochek.com (mauve.mrochek.com [66.159.242.17]) by ietfa.amsl.com (Postfix) with ESMTP id 46AB41A03D7 for <abnf-discuss@ietf.org>; Wed, 9 Jul 2014 11:49:35 -0700 (PDT)
Received: from dkim-sign.mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01P9XJXI59TS006W7D@mauve.mrochek.com> for abnf-discuss@ietf.org; Tue, 8 Jul 2014 10:28:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mrochek.com; s=mauve; t=1404840512; bh=gEXUoLLiEueetHaUq4uI/3bqIT+D9Ij5qGmVpflBCaE=; h=Cc:Date:From:Subject:In-reply-to:References:To; b=LCnlalGf/MQjiHtDzmK+kWzhADZgPHY2heCDnEflUyx3IlM4GYQxV2fPNoAevPIz/ pq0T8jfTbv4bMB2gmmC87FvcJVFcalTEjsU89s6D9PeLPwFgG9jRM5KKirqCVCGBWU kZvJ3McjwuZcB5CNW+lrur0ydJVjtLuCZl6ZiIIM=
MIME-version: 1.0
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01P9IDD5BPLS0049PU@mauve.mrochek.com>; Tue, 08 Jul 2014 10:28:29 -0700 (PDT)
Message-id: <01P9XJXGHZLS0049PU@mauve.mrochek.com>
Date: Tue, 08 Jul 2014 10:02:55 -0700
From: Ned Freed <ned.freed@mrochek.com>
In-reply-to: "Your message dated Mon, 07 Jul 2014 14:53:19 -0400" <CAC4RtVBnjxi5Q-0WMd2J9Hm8oct+agc8h2V=koSJnYNrpzZ_Ag@mail.gmail.com>
References: <53BAB55A.2090008@alum.mit.edu> <CAC4RtVBnjxi5Q-0WMd2J9Hm8oct+agc8h2V=koSJnYNrpzZ_Ag@mail.gmail.com>
To: Barry Leiba <barryleiba@computer.org>
Archived-At: http://mailarchive.ietf.org/arch/msg/abnf-discuss/mA3XwfvCcCrybuxim8XzzIeOfjw
X-Mailman-Approved-At: Wed, 09 Jul 2014 20:20:56 -0700
Cc: "abnf-discuss@ietf.org" <abnf-discuss@ietf.org>, Paul Kyzivat <pkyzivat@alum.mit.edu>
Subject: Re: [abnf-discuss] defining "compatible" extensions
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "General discussion about tools, activities and capabilities involving the ABNF meta-language" <abnf-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/abnf-discuss>, <mailto:abnf-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/abnf-discuss/>
List-Post: <mailto:abnf-discuss@ietf.org>
List-Help: <mailto:abnf-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/abnf-discuss>, <mailto:abnf-discuss-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: abnf-discuss-bounces@ietf.org
Sender: abnf-discuss <abnf-discuss-bounces@ietf.org>

> The main issue I have whenever this sort of thing come up is that ABNF
> is there to specify syntax, not semantics.  The ABNF in 4566 correctly
> says that the syntax of an att-name is that it's a token.  The
> specification itself -- the rest of it, beyond the ABNF -- is there to
> tell us what values to expect there, what to do with them, and how to
> define extensions.

I could not agree more. As things edge away from syntax and closer to
semantics, ABNF stops being the right tool for the job.

For heaven's sake, ABNF can't even handle things like complex ordering or "at
most two of" that really can be viewed as part of the syntax. And people expect
it to handle even higher level constructs that overlap existing syntax in
complex ways? Please.

Which is not to say these sort of things can't be handled cleanly. A good
example is RFC 5322 section 3.6.

But complex overlapped syntaxes? My response to that is, "Just say no!"

There was a bunch of this junk in RFC 1341 and RFC 1521, the early versions of
MIME. When I did the RFC 2045/2046 revision, I summarily deleted all of it. And
AFAIK it has not been missed. Indeed, if the number and type of questions I
received was any indication it has resulted in less confusion overall.

This doesn't mean you can't specify higher level constraints on top of existing
sytnax. You can, you just don't use ABNF to do it. A good example where this
was done are the various extensions to Sieve. Sieve has a simple stable
syntax specified in RFC 5228. Many extensions have been defined, most recently
draft-ietf-appsawg-sieve-duplicate-09, but a different format is used to
specify the syntactic constraints on extensions. The one in the most recent
draft is:

Usage: "duplicate" [":handle" <handle: string>]
                      [":header" <header-name: string> /
                          ":uniqueid" <value: string>]
                      [":seconds" <timeout: number>] [":last"]

There are also limited - very limited IMO - cases where overlapped syntaxes are
OK. Although it's fairly rare, this sometimes happens with media type
parameters. I don't have a problem with media type parameter syntax being
specifed in ABNF. But we're talking about adding constraints to a single token,
not a complex overlay.

And finally, there are cases where fully extensible syntaxes make sense, at
least in the context of previous design decisions. The obvious example of this
is IMAP, where extensions add commands and specify their syntax when they do.
This seems to be worked out OK. (Personally, I'm not entirely happy with the
approach taken in the base specification to syntax specification, but it's very
small beer compared to other issues in the IMAP space.)

> That many specs enumerate all the tokens that are valid at the time of
> their writing isn't really relevant to this, as I see it.  Personally,
> I think we should stop doing that *unless* we want to define something
> that intentionally has no extensibility.  To me, this makes sense:

>    florb-value = "true" / "false"

> ...while this does not:

>    florb-value = "true" / "false" / florb-ext
>    florb-ext = token

I agree; this gets close to the line if edging over it.

> The first is clearly saying that *syntactically*, there are only two
> things that can appear in a florb-value.  You can safely write a
> parser that looks for those and throws a syntax error if it sees
> anything else.

> What on Earth is the second saying, syntactically?  I'd better write
> my parser to parse it as a token.  I presume there's something else in
> the text that tells me what to do with "true" and "false"
> semantically, and that explains the extensibility.  What's the point
> of having that in the *syntax*?

> This sort of thing is also fine, as I see it:

>    florb-value = token ; must be a registered item, as
>                        ; defined in Section 3.2.1

> Here we're using a comment in the syntax to point the reader to the
> section that gives the semantics and explains the valid value.
> References are good.

> Twisting syntax specification around to try to make it go beyond
> syntax is not good.

> Clearly, opinions differ on this... but there's mine.

The "code" I've "run" in this space says pretty clearly that complex
overlapped syntaxes cause more problems than they solve. And I really
don't think adding intersection capabilities to ABNF is a solution.

				Ned

_______________________________________________
abnf-discuss mailing list
abnf-discuss@ietf.org
https://www.ietf.org/mailman/listinfo/abnf-discuss