Welcome, Guest
Username: Password:
  • Page:
  • 1

TOPIC:

for statement initialiser-> what is normative? 28 Nov 2002 15:15 #6287

Hi Gyorgy,

There should be an explicit statement in ES201 873-1 (or in all parts 1-5)
which states that in case of differences/conflict between the text and the BNF that
the BNF** or the text is normative.

The text declaring what is normative should appear at the beginning of each part
of the standard(s) (, not buried elsewhere in the various parts of the standard.

My preference is to make the BNF** normative.

Note that Annexes A,B,C,and D are Normative. Annex E is informative.

It might be an idea to add the definition of the word normative in the list of
terms to ensure that readers understand what the word implies.

** the bnf extended/complemented by the STATIC SEMANTICS and the
OPERATIONAL SEMANTICS

Cheers,

Claude.


Original Message
From: Gyorgy Rethy (ETH) [This email address is being protected from spambots. You need JavaScript enabled to view it.]
Sent: 28 November 2002 14:24
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: for statement initialiser


Hi,

When I'm saying "clear" this means the bnf and the text together. It has to be clearly understood, that the language is not the bnf alone; not everything is allowed that is possible by the bnf. The text may contain additional restrictions to that (though the intention is to add these restrictions also to the bnf as operational semantic rules).

Best Regards, György

> dr György RÉTHY
> Manager
> Test Services, Test House, Ericsson Hungary
> Address: H-1037 Budapest, Laborc street 1.
> Phone: + 36 (1) 437-7006
> Mobile: + 36 (30) 297-7862
> Fax: + 36 (1) 437-7767
> Mail-to: This email address is being protected from spambots. You need JavaScript enabled to view it.


>
Original Message
>From: Carl Cerecke [This email address is being protected from spambots. You need JavaScript enabled to view it.]
>Sent: Tuesday, November 26, 2002 9:13 PM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Re: for statement initialiser
>
>
>Gyorgy Rethy (ETH) wrote:
> > Hi,
> >
> > I'm a bit confused what this discussion is about? Originally there
> > was a question if the _for_ statement is clear in the standard or
> > not. I'm claiming that it is.
>
>The description of the for-statement in the EBNF does not match the
>description of the for-statement in Section 19.7
>
>Furthermore, there is a range of generalness of the for-statement among
>different languages. At the specific end, we have something like:
>"for i := 1 to 10 step 2", with a specific index variable, a specific
>start and end, and an optional specific step in the index. At the other
>extreme, there are languages like C, which allow arbitrary and optional
>expressions in the for-statement. That can lead to programs like this
>interesting 2-line specimen (ioccc.org/1995/makarios.c):
>main(n,i,a,m){while(i=++n)
>for(a=0;a<i?a=a*8+i%8,i/=8,m=a==i|a/8==i,1:(n-++m||printf("%o\n
",n))&&n%m;);}
>
>The TTCN-3 for-statement is inbetween these two extremes in its
>generality: It requires an initial assignment (optional declaration) of
>the index variable, a boolean expression which (presumably, but not
>necessarily) tests the index variable, and a single assignment (again,
>presumably, but not necessarily) to the index variable. This
>is, by far,
>how for-statements are usually used in C, and these restrictions do not
>impose too severe a limitation. There are a few cases where the
>limitations might be frustrating, but they don't tend to occur very
>often, in my opinion (unless you are trying to write
>obfuscated programs
>like the C program above).
>
>In short, I'm happy for the text of section 19.7 to remain the
>same, but
>I think the EBNF should be changed to reflect the restrictions in the
>initialiser part of the for-statment: one assignment or one initialised
>variable declaration.
>
>Cheers,
>Carl
>--
>
>Carl Cerecke - Software Designer
>Da Vinci Communications Ltd
>Christchurch - New Zealand
>
>TEL : +64 3 3838311
>FAX : +64 3 3838310
>e-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>www : www.davinci-communications.com
>
>

Please Log in to join the conversation.

  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin