Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Defining "common interval literal"



Vincent
Christian please note. This is SVN r446.

On 26 Mar 2015, at 16:02, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> On 2015-03-24 15:55:01 +0000, John Pryce wrote:
>> Would you point to where in the current text it looks ambiguous to you?
>> 
>> (Now SVN r442)
> 
> In this new text, §9.7.1 "Overview":
> 
> | An ***all-flavor*** literal is one that has the same value (modulo
> | the embedding map if it is an interval literal) in all flavors.
> 
> is ambiguous. What does "in all flavors" mean? All flavors defined
> in this standard (but this consists only of the set-based flavor)?
> All flavors supported by the implementation (but such literals would
> depend on the implementation)? According to the next sentences, I
> suppose that "in all flavors" means "in all potential flavors" or,
> said otherwise, "in all flavors allowed by this standard".

I see what you mean. But since 7.1 says "A flavor is an interval model that conforms to the core specification described below" isn't it correct as written? Yes, one could say "... in all potential flavors", but that doesn't read as good standardese to me.

Since the following text in 9.7 says what an all-flavor literal actually *is*, how about changing "has" to "shall have":
  "An all-flavor literal is one that shall have the same value
  (modulo the embedding map if it is an interval literal) in all
  flavors."

Maybe append "The all-flavor literals are defined in this subclause."

> | An all-flavor interval literal denotes a common interval, which
> | if decorated has the decoration com.
> 
> is in contradiction with the previous sentence if the only flavor
> is the set-based one, because only this one is currently defined
> in P1788. But it is OK with "in all potential flavors".

Hmm. Once "all-flavor" has been declared as a technical term, IMHO this ceases to be a contradiction.

> I don't like the "which if" very much. I would write:
> 
>  An all-flavor interval literal denotes a common interval;
>  if decorated, it has the decoration com.

OK

> | Given a flavor, a ***literal of the flavor*** is one that shall be
> | supported in each implementation of the flavor; thus such literals
> | include the all-flavor literals.
> 
> only makes sense with "in all potential flavors" above.

I don't agree and think it is fine as is. What do other people think?

> In §9.7.2 "Number literals", I would add somewhere that an all-flavor
> number literal denotes a real number. In particular, this would make
> clear that -0 = +0 in this context.

A good point. I struggled over getting sentences in the right order and it is still clumsy. And it omits the important point you mention.

Also I notice the text in 9.7.2 item c) allows a rational literal to have q signed, e.g. "1/+2", which is surely wrong and the grammar of Table 9.5 forbids. Also its wording is not consistent with that of items a), b).
I changed this too.

> In §9.7.4 "Bare interval literals":
> 
>  A string [ m ] with number literal m is equivalent to [ m , m ].
> 
> should be:
> 
>  A string [ m ] with all-flavor number literal m is equivalent to
>  [ m , m ].
> 
> and Table 9.4 should include an example of this form.

Yes to both.

> I also propose to rename the titles of §9.7.2 "Number literals",
> §9.7.4 "Bare interval literals", and §9.7.5 "Decorated interval
> literals" to add "All-flavors" in front each of them since these
> sections cover only all-flavor literals.

Yes again. (I did have this earlier but changed it when it seemed we might add requirements on how a flavor is allowed to extend the all-flavor grammar.)

Thanks for these points. PDF of the amended pages is attached.

John Pryce

Attachment: 20150331literals.pdf
Description: 20150331literals.pdf