Subject: [Dime] comment on ABNFs in 3588bis

From: Jouni Korhonen <[email-masked]>
Date: Wed, 8 Oct 2008 21:29:27 +0300

Hi all,

The -12 revision of 3588bis still allows and actually gives an
example of using "* { AVP }", which in my opinion does not make
sense. Should we add a note under section 3.2 qual description
stating that "* { AVP }" is not possible based on the description
of a required AVP? I would add the following text to qual description:

   "If a required rule has a qualifier, then the value of min
    MUST be 1 if present."

If the above is acceptable, then we need to fix the example
following  the ABNF definitions:

    The following is a definition of a fictitious command code:

    Example-Request ::= < Diameter Header: 9999999, REQ, PXY >
                        { User-Name }
                      * { Origin-Host }
                    ^^^^
                      * [ AVP ]

Cheers,
	Jouni
_______________________________________________
DiME mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/dime

---

From: Jouni Korhonen <[email-masked]>
Date: Wed, 8 Oct 2008 21:37:18 +0300

A copy'n'paste typo. meant:

   "If a required rule has a qualifier, then the value of min MUST be  
1."

Jouni

---

From: <[email-masked]>
Date: Wed, 8 Oct 2008 21:03:35 +0200

Ok with that. The "min" must be equal to 1 for Required AVP.

By the way, about the given example, is it really possible to have multiple Origin-host AVP in the same request, according to the definition of the Origin-host AVP?

on the same topic, is it possible to have several occurrences of a fixed AVP? If not,

either another note should be added to state that: "If an fixed rule has a qualifier, then the value of min and max MUST be 1."

Or remove the [qual] before "<" avp-spec ">" to have: Fixed = [qual] "<" avp-spec ">"

Lionel

> -----Message d'origine-----
> De : [email-masked] [mailto:[email-masked]] De 
> la part de Jouni Korhonen
> Envoyé : mercredi 8 octobre 2008 20:37
> À : [email-masked]
> Objet : Re: [Dime] comment on ABNFs in 3588bis
> 
> MUST be 1."
> > The -12 revision of 3588bis still allows and actually gives 
> an example 
> > of using "* { AVP }", which in my opinion does not make 
> sense. Should 
> > we add a note under section 3.2 qual description stating 
> that "* { AVP 
> > }" is not possible based on the description of a required 
> AVP? I would 
> > add the following text to qual description:
> >

---

From: "Glen Zorn" <[email-masked]>
Date: Thu, 9 Oct 2008 13:01:38 +0700

On a related but more general note: is are the ABNF definitions really
useful?  From the traffic on this list, it seems that they cause more
trouble than anything else...

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> [email-masked]
> Sent: Thursday, October 09, 2008 2:04 AM
> To: [email-masked]; [email-masked]
> Subject: Re: [Dime] comment on ABNFs in 3588bis
> 
> By the way, about the given example, is it really possible to have
> multiple Origin-host AVP in the same request, according to the
> definition of the Origin-host AVP?
> 
> either another note should be added to state that: "If an fixed rule
> has a qualifier, then the value of min and max MUST be 1."
>

---

From: Mark Jones <[email-masked]>
Date: Thu, 9 Oct 2008 11:35:08 -0400

Hi Jouni,

I'd always assumed that a required AVP would have a minimum occurrence of one but I agree that it should be explicit in the ABNF description.

An alternative change to 3588bis that probably has less impact on existing specs would be:

   min              = 1*DIGIT
                      ; The minimum number of times the element may
                      ; be present.  The default value is zero for
                      ; fixed and optional rules. The default value
                      ; is one for required rules.

Then we don't have to change any *{ avp } in existing specs.

Regards
Mark

> From: [email-masked] [mailto:[email-masked]] On
> Behalf Of Jouni Korhonen
> Sent: October 8, 2008 11:37
> To: [email-masked]

---

From: <[email-masked]>
Date: Thu, 9 Oct 2008 17:58:07 +0200

Hi Mark, 

Works for me! However, I think we still need to state that min
value of 0 is not allowed at all for required rules:

    min              = 1*DIGIT
                       ; The minimum number of times the element may
                       ; be present.  The default value is zero for
                       ; fixed and optional rules. The default value
                       ; is one for required rules. The value of zero
                       ; is not allowed for required rules.

Cheers,
	Jouni

> 
> Hi Jouni,
> 
> I'd always assumed that a required AVP would have a minimum 
> occurrence of one but I agree that it should be explicit in 
> the ABNF description.
> 
> > From: [email-masked] [mailto:[email-masked]] 
> On Behalf 
> > Of Jouni Korhonen
> > > stating that "* { AVP }" is not possible based on the 
> description of 
> > > a required AVP? I would add the following text to qual
> > description:
> > >

---

From: Mark Jones <[email-masked]>
Date: Thu, 9 Oct 2008 11:59:19 -0400

Hi Lionel,

Comments inline...

> Behalf Of [email-masked]
> Sent: October 8, 2008 12:04
> By the way, about the given example, is it really possible to
> have multiple Origin-host AVP in the same request, according
> to the definition of the Origin-host AVP?
>

Well, it is a ficticious example :) . But I agree it looks weird so maybe we could replace Origin-Host with Host-IP-Address.

> either another note should be added to state that: "If an
> fixed rule has a qualifier, then the value of min and max MUST be 1."
>

I understand that the current ABNF intentionally allows optional fixed AVPs, i.e. the AVP is optional but if present then it MUST be in this position. I've never seen one but I suppose it could happen.

---

From: Mark Jones <[email-masked]>
Date: Thu, 9 Oct 2008 12:02:05 -0400

Oops! Yes, I agree that your clause is also required here.

Mark

> From: [email-masked]
> [mailto:[email-masked]]
> Sent: October 9, 2008 08:58
> To: Mark Jones; [email-masked]
> Subject: RE: [Dime] comment on ABNFs in 3588bis
>
> Hi Mark,
>

---

From: Biplab Sarkar <[email-masked]>
Date: Thu, 09 Oct 2008 21:51:10 +0530

Hi All,

I also thing for AVP's that "can't" be present in a message, we should
have "min=0" in the ABNF representation.

Thanks
Biplab

---

From: Victor Fajardo <[email-masked]>
Date: Thu, 09 Oct 2008 13:17:17 -0400

Hi Guys,

This change is duly noted.

-- victor

>>>>    "If a required rule has a qualifier, then the value of
>>>>         
>>> min MUST be
>>>       
>>>> 1."
>>>>
>>>> Jouni
>>>>
>>>>

---

From: "Hannes Tschofenig" <[email-masked]>
Date: Thu, 9 Oct 2008 20:37:39 +0300

Although the recently made proposal just clarify the usage of the ABNF I
wanted to mention it. 

The ABNF has limitations when it comes to express more complex conditions
(if you want to still keep readable and without defining a new Command Code
for every tiny variation). Ideally, dependencies like "Don't send AVP X if
AVP is present or has a specific value." should be avoided  

This isn't really a problem with simple applications. However, we have seen
some more complicated onces and there the ABNF itself isn't really so
expressive as it could be. 

Now, there is the question about what todo about this. Some folks within the
group in the past suggested to introduce more powerful mechanisms to
describe dependencies. Nobody came up with a specific proposal but some
individual comments go into the direction of addressing some specific
aspects, such as the one made by Biplab. 

All of them are fine, in some sense, if we consider the impact to the
extensibility rules. For example, the current extensibility rules assumes
that a command is described using ABNF. Many of the "progressing rules"
aren't really captured in the ABNF itself. As such, you can change the
description in a spec to create interoperability problems without touching
the ABNF. 

I personally don't have a strong opinion what the best way is to describe
the message content. I have, for example, written a few specs that contain
an XML schema and I have to tell that XML schemas are not a good way either
to describe what a message should contain although they provide more
flexibility. Since we were pretty unhappy about the limited extensibility of
XML schemas we switched to Relax NG schemas. That was more powerful but then
had other problems. Other folks suggested to use Schematron, which I have
never used. 
 
Since this issue came up a couple of times already I would like to hear
whether folks are happy with only using ABNF to describe the content of a
command? 

Here is my opinion: I would not too strict rules here and allow the protocol
designer and document editor to pick a suitable mechanism to describe how
the application looks like. For example, if someone wants to use pseudo code
to capture vagueness in the ABNF then let them write pseudo code. 

Ciao
Hannes

________________________________

	From: [email-masked] [mailto:[email-masked]] On Behalf
Of Biplab Sarkar
	Sent: 09 October, 2008 19:21
	To: Mark Jones
	Cc: [email-masked]
	Subject: Re: [Dime] comment on ABNFs in 3588bis

	Hi All,
	
	I also thing for AVP's that "can't" be present in a message, we
should have "min=0" in the ABNF representation.
	
	Thanks
	Biplab

		Hi Jouni,
		
		I'd always assumed that a required AVP would have a minimum
occurrence of one but I agree that it should be explicit in the ABNF
description.
		
		An alternative change to 3588bis that probably has less
impact on existing specs would be:
		
		   min              = 1*DIGIT
		                      ; The minimum number of times the
element may
		                      ; be present.  The default value is
zero for
		                      ; fixed and optional rules. The
default value
		                      ; is one for required rules.

		Regards
		Mark
		
		> From: [email-masked] [mailto:[email-masked]]
On
min MUST be
		> > stating that "* { AVP }" is not possible based on the
description
		> > of a required AVP? I would add the following text to
qual
		> >   "If a required rule has a qualifier, then the value of
min

---

From: Mark Jones <[email-masked]>
Date: Thu, 9 Oct 2008 13:38:44 -0400

Hi Biplab,

According to the current draft a forbidden AVP would be represented as:

        *0 [ Evil-AVP ]

And I understand that you are requesting that this be changed to:

        0*0 [ Evil-AVP ]

Is that correct? This change appears to be redundant given that the default value of min is zero.

Regards
Mark
________________________________
From: Biplab Sarkar [mailto:[email-masked]]
Sent: October 9, 2008 09:21
To: Mark Jones
Cc: [email-masked]; Jouni Korhonen
Subject: Re: [Dime] comment on ABNFs in 3588bis

Hi All,

I also thing for AVP's that "can't" be present in a message, we should have "min=0" in the ABNF representation.

Thanks
Biplab

Hi Jouni,

   min              = 1*DIGIT

Regards
Mark

> From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]] On
> Behalf Of Jouni Korhonen
> To: [email-masked]<mailto:[email-masked]>
> > [email-masked]<mailto:[email-masked]>
> [email-masked]<mailto:[email-masked]>
_______________________________________________
DiME mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/dime

---

From: Ralph Loader <[email-masked]>
Date: Sun, 12 Oct 2008 11:45:34 +1300

> trouble than anything else...

Replacing them with something more vague might well cause more problems
than it solves.

Having written code generators that process the ABNF, I'm grateful for
the effort that goes into getting the definitions right.

> > Ok with that. The "min" must be equal to 1 for Required AVP.

Incidently, some of the 3GPP specs use '*{foo}' and from the context
intended this to mean 1-or-more.

Ralph.