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

TOPIC:

A question on except in import statements 26 Nov 2002 09:47 #6273

Hi,

Could someone please clarify the meaning of the following
import statement, the semantics isn't that clear.

import from moduleA
{
group all except g1 except {type t1}
}

where moduleA includes group g1 which includes type t1.

Should t1 be imported or not?

Thanks,

David.
--
David King
Motorola Labs, UK
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in to join the conversation.

A question on except in import statements 26 Nov 2002 11:11 #6275

Hi,

To answer, first the example has to be corrected; there are two ways to do it:

import from moduleA
{
group all except g1;
type all except t1
}

In this case t1 is not imported as excluded from both items (by the way, it would be imported if contained let's me say in group g2).


import from moduleA
{
group all except g1;
type t1
}

t1 is imported on it's own even if other members of g1 are not imported.

Best Regards, György
Üdv, Gyuri

> 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: King David-BDK001 [This email address is being protected from spambots. You need JavaScript enabled to view it.]
>Sent: Tuesday, November 26, 2002 10:48 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: A question on except in import statements
>
>
>Hi,
>
>Could someone please clarify the meaning of the following
>import statement, the semantics isn't that clear.
>
>import from moduleA
> {
> group all except g1 except {type t1}
> }
>
>where moduleA includes group g1 which includes type t1.
>
>Should t1 be imported or not?
>
>Thanks,
>
>David.
>
>David King
>Motorola Labs, UK
>This email address is being protected from spambots. You need JavaScript enabled to view it.
>

Please Log in to join the conversation.

A question on except in import statements 27 Nov 2002 02:08 #6277

  • J
  • J's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Should t1 be imported, I think.

Original Message
From: "King David-BDK001" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
Sent: Tuesday, November 26, 2002 5:47 PM
Subject: A question on except in import statements


> Hi,
>
> Could someone please clarify the meaning of the following
> import statement, the semantics isn't that clear.
>
> import from moduleA
> {
> group all except g1 except {type t1}
> }
>
> where moduleA includes group g1 which includes type t1.
>
> Should t1 be imported or not?
>
> Thanks,
>
> David.
> --
> David King
> Motorola Labs, UK
> This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in to join the conversation.

A question on except in import statements 27 Nov 2002 03:36 #6278

Yes, I think so.
"except" should be considered as "needless", not "rejected".

Original Message
From: "j" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
Sent: Wednesday, November 27, 2002 10:08 AM
Subject: Re: A question on except in import statements


> Should t1 be imported, I think.
>
>
Original Message
> From: "King David-BDK001" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> Sent: Tuesday, November 26, 2002 5:47 PM
> Subject: A question on except in import statements
>
>
> > Hi,
> >
> > Could someone please clarify the meaning of the following
> > import statement, the semantics isn't that clear.
> >
> > import from moduleA
> > {
> > group all except g1 except {type t1}
> > }
> >
> > where moduleA includes group g1 which includes type t1.
> >
> > Should t1 be imported or not?
> >
> > Thanks,
> >
> > David.
> > --
> > David King
> > Motorola Labs, UK
> > This email address is being protected from spambots. You need JavaScript enabled to view it.
>

Please Log in to join the conversation.

A question on except in import statements 27 Nov 2002 07:50 #6279

Oh, excuse me, I'v made a mistake.

Now, I don't know if t1 should be imported.

It depends on the priority of the two except:

(group all except (g1 except {type t1}))
group all (except g1) (except {type t1})

I don't know which is correct.

Original Message
From: "Syntax" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
To: "Active_TTCN3 : MTS STF133 TTCN Version 3 - Active Members Only"
<This email address is being protected from spambots. You need JavaScript enabled to view it.>
Sent: Wednesday, November 27, 2002 11:36 AM
Subject: Re: A question on except in import statements


> Yes, I think so.
> "except" should be considered as "needless", not "rejected".
>
>
Original Message
> From: "j" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> Sent: Wednesday, November 27, 2002 10:08 AM
> Subject: Re: A question on except in import statements
>
>
> > Should t1 be imported, I think.
> >
> >
Original Message
> > From: "King David-BDK001" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> > To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
> > Sent: Tuesday, November 26, 2002 5:47 PM
> > Subject: A question on except in import statements
> >
> >
> > > Hi,
> > >
> > > Could someone please clarify the meaning of the following
> > > import statement, the semantics isn't that clear.
> > >
> > > import from moduleA
> > > {
> > > group all except g1 except {type t1}
> > > }
> > >
> > > where moduleA includes group g1 which includes type t1.
> > >
> > > Should t1 be imported or not?
> > >
> > > Thanks,
> > >
> > > David.
> > > --
> > > David King
> > > Motorola Labs, UK
> > > This email address is being protected from spambots. You need JavaScript enabled to view it.
> >
>

Please Log in to join the conversation.

A question on except in import statements 27 Nov 2002 11:32 #6280

Hi again,

I think that both answers (should or should not be imported) are incorrect. Again,

>> > > import from moduleA
>> > > {
>> > > group all except g1 except {type t1}
>> > > }

is semantically invalid. Though it is allowed by the bnf but THE BNF IS NOT THE LANGUAGE ITSELF! Additional rules are placed by operational semantics comments of the bnf AND the text of the standard.

It is allowed to exclude items when a group is imported ($7.5.6), this is the version when the ExceptsDef in the FullGroupIdentifier is used:
import from moduleA
{
group g1 except {type t1}
}

Also allowed to exclude groups when all groups are imported ($7.5.7), in this case the exception option of AllGroupsWithExcept is used. However, in this case only items of the same kind (in this case groups) can be excluded from the given import statement (item), hence the ExceptsDef in the FullGroupIdentifier shall not be used:
"The all keyword may be used to import all definitions of the same kind of a module. ...
If some declarations of a kind are wished to be excluded from the given import statement, their identifiers shall be listed following the except keyword."
So, this is the case for
import from moduleA
{
group all except g1
}

But I can not find any place in the standard (I mean the text part) allowing or describing "group all except g1 except {type t1}" and it does not make a sense to me (exclude something from a group that was previously excuded???).

Best Regards, Gy?gy

> dr Gy?gy R?HY
> 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: Syntax [This email address is being protected from spambots. You need JavaScript enabled to view it.]
>Sent: Wednesday, November 27, 2002 8:50 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Fw: A question on except in import statements
>
>
>Oh, excuse me, I'v made a mistake.
>
>Now, I don't know if t1 should be imported.
>
>It depends on the priority of the two except:
>
>(group all except (g1 except {type t1}))
>group all (except g1) (except {type t1})
>
>I don't know which is correct.
>
>
Original Message
>From: "Syntax" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>To: "Active_TTCN3 : MTS STF133 TTCN Version 3 - Active Members
>Only" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>Sent: Wednesday, November 27, 2002 11:36 AM
>Subject: Re: A question on except in import statements
>
>
>> Yes, I think so.
>> "except" should be considered as "needless", not "rejected".
>>
>>
Original Message
>> From: "j" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>> To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>> Sent: Wednesday, November 27, 2002 10:08 AM
>> Subject: Re: A question on except in import statements
>>
>>
>> > Should t1 be imported, I think.
>> >
>> >
Original Message
>> > From: "King David-BDK001" <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>> > To: <This email address is being protected from spambots. You need JavaScript enabled to view it.>
>> > Sent: Tuesday, November 26, 2002 5:47 PM
>> > Subject: A question on except in import statements
>> >
>> >
>> > > Hi,
>> > >
>> > > Could someone please clarify the meaning of the following
>> > > import statement, the semantics isn't that clear.
>> > >
>> > > import from moduleA
>> > > {
>> > > group all except g1 except {type t1}
>> > > }
>> > >
>> > > where moduleA includes group g1 which includes type t1.
>> > >
>> > > Should t1 be imported or not?
>> > >
>> > > Thanks,
>> > >
>> > > David.
>> > > --
>> > > David King
>> > > Motorola Labs, UK
>> > > This email address is being protected from spambots. You need JavaScript enabled to view it.
>> >
>>
>

Please Log in to join the conversation.

A question on except in import statements 27 Nov 2002 13:17 #6281

So, this implies a new question:

Why should something which never CAN make sense be allowed by the BNF?
Normally, a BNF only allows constructions which COULD make sense - i.e.
ignores those static restrictions which cannot be checked syntactically.

This doesn't make sense to me. (And obviously to other people)

So, either the standard is bogus or the BNF is, er, misleading.

Of course, an except/except expression _could_ make sense
(even if that maybe is not intended by the current standard, I KNOW):

A except B except C is normally (i.e. in natural language)
A minus (B minus C) which is
(A minus B) plus C.

Jacob

Please Log in to join the conversation.

  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin