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

TOPIC:

Mapping some TTCN-2 to TTCN-3 17 Sep 2002 15:21 #6211

Hi everyone,

I'm trying to convert the following two statements from TTCN-2 to TTCN-3
(V2.2.1). However,
certain constructs don't map directly to TTCN-3, but should in a simple
manner. Some
changes are proposed to the BNF.

Comments are more than welcome.

TTCN-2 TTCN-3

+TestStep1 ----> alt { [ ] TestStep1; [ ]
TestStep2 }
+TestStep2


However, if the statement following the first test step is a pseudo event
such as
a qualifier, a timer operation, or an assignment, it seems impossible from
the current
BNF to translate to TTCN-3. This is because of the required GuardOp in
production
522. That is:

TTCN-2 TTCN-3

+TestStep1 ----> alt { [ ] TestStep1; [ ]
GuardOp { x:=5; } }
( x := 5)

Does anyone know why the GuardOp is required? If there is no real need for
it,
I would recommend that production 522 be modified as follows:

522. GuardStatement ::= AltGuardChar (AltstepInstance | [ GuardOp ]
StatementBlock)

That is GuardOp is made optional. Does this break anything anywhere else?

TTCN-2 TTCN-3

+TestStep1 ----> alt { [ ] TestStep1; [ ] {
x:=5; } }
( x := 5)

or alternatively

Make GuardOp optional and replace StatementBlock with FunctionStatement.
This
would allow the extra brackets {} needed for StatementBlock

522. GuardStatement ::= AltGuardChar (AltstepInstance | [ GuardOp ]
FunctionStatement)

TTCN-2 TTCN-3

+TestStep1 ----> alt { [ ] TestStep1; [ ]
x:=5 ; }
( x := 5)

Of course one could contrive some solution to get around it, but this should
not be necessary.

164. FunctionStatement ::= ConfigurationStatements |
TimerStatements |
CommunicationStatements |
BasicStatements |
BehaviourStatements |
VerdictStatements |
SUTStatements

519. AltConstruct ::= AltKeyword BeginChar AltGuardList EndChar
520. AltKeyword ::= "alt"
521. AltGuardList ::= {GuardStatement [SemiColon]}+ [ElseStatement
[SemiColon]]
522. GuardStatement ::= AltGuardChar (AltstepInstance | GuardOp
StatementBlock)
523. ElseStatement ::= "["ElseKeyword "]" StatementBlock
524. AltGuardChar ::= "[" [BooleanExpression] "]"
525. GuardOp ::= TimeoutStatement |
ReceiveStatement |
TriggerStatement |
GetCallStatement |
CatchStatement |
CheckStatement |
GetReplyStatement |
DoneStatement
/* STATIC SEMANTICS - GuardOp used within the module control part. May only
contain the timeoutStatement */


Cheers,


Claude.


Claude Desroches
Technical Architect

Strategic Test Solutions Phone +44 (0) 1159 586 600
City Gate East Mobile +44 (0) 7966 482 165
Toll House Hill Fax +44 (0) 1159 586 633
Nottingham Email This email address is being protected from spambots. You need JavaScript enabled to view it.
NG1 5FS
This email address is being protected from spambots. You need JavaScript enabled to view it.
United Kingdom

Web www.strategictest.co.uk

TTCN - Imagination Technologies delivering tomorrow's test solutions today

This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. This communication represents the originator's personal view and
opinions, which do not necessarily reflect those of the Concept Group. If
you are not the intended recipient or the person responsible for delivering
the email to the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing,or
copying of this email is strictly prohibited. If you received this email in
error, please immediately notify This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 17 Sep 2002 17:00 #6212

Hi Claude,

I don't understand your problems:

> TTCN-2
>
> +TestStep1
> +TestStep2

is a sequence of two altstep calls (in TTCN-3 terminology) and maps
to the TTCN-3 sequence:

TestStep1();
TestStep2();

if you need/want to put this in alt statements:

alt {
[] TestStep1();
}
alt {
[] TestStep2();
}

Your second problem:

> TTCN-2
> +TestStep1
> ( x := 5)

is an altstep call followed by an assignment, i.e., a sequence of
two statements, that maps to the TTCN-3 code.

TestStep1();
x := 5;

of if put into an alt statement

alt {
[] TestStep1();
}
x := 5;

Best regards
Jens




--

======================================================================
Dr. Jens Grabowski
Institute for Telematics phone: +49 451 500 3723
University of Luebeck fax: +49 451 500 3722
Ratzeburger Allee 160 eMail: This email address is being protected from spambots. You need JavaScript enabled to view it.
D-23538 Luebeck or This email address is being protected from spambots. You need JavaScript enabled to view it.
(Germany) WWW: www.itm.mu-luebeck.de
======================================================================

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 18 Sep 2002 05:37 #6213

Hi everyone,

the example of Claude raises another problem:
TTCN-2

+TestStep1()
+TestStep1_1()
+TestStep2()
+TestStep2_1()

TestStep1 and TestStep2 should start with e.g. Receive-Statements. So
TestStep1 and TestStep2 are alternatives.
In TTCN-3 it should be described the following:

alt {
[] TestStep1()
{
alt {
[] TestStep1_1();
}
}
[] TestStep2()
{
alt {
[] TestStep2_1();
}
}
}

But this is not correct according the current BNF. I think the rule

GuardStatement ::= AltGuardChar (AltstepInstance | GuardOp
StatementBlock)

should be amend to the following:

GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
GuardOp StatementBlock)

So the call of an AltstepInstance can be followed by other statements
(optionally).
By the way another question: Is it necessary that the StatementBlock after
GuardOp is mandatory?

Any Opinions?

Best regards,
Martin

Jens Grabowski schrieb:

> Hi Claude,
>
> I don't understand your problems:
>
> > TTCN-2
> >
> > +TestStep1
> > +TestStep2
>
> is a sequence of two altstep calls (in TTCN-3 terminology) and maps
> to the TTCN-3 sequence:
>
> TestStep1();
> TestStep2();
>
> if you need/want to put this in alt statements:
>
> alt {
> [] TestStep1();
> }
> alt {
> [] TestStep2();
> }
>
> Your second problem:
>
> > TTCN-2
> > +TestStep1
> > ( x := 5)
>
> is an altstep call followed by an assignment, i.e., a sequence of
> two statements, that maps to the TTCN-3 code.
>
> TestStep1();
> x := 5;
>
> of if put into an alt statement
>
> alt {
> [] TestStep1();
> }
> x := 5;
>
> Best regards
> Jens
>
> --
>
> ======================================================================
> Dr. Jens Grabowski
> Institute for Telematics phone: +49 451 500 3723
> University of Luebeck fax: +49 451 500 3722
> Ratzeburger Allee 160 eMail: This email address is being protected from spambots. You need JavaScript enabled to view it.
> D-23538 Luebeck or This email address is being protected from spambots. You need JavaScript enabled to view it.
> (Germany) WWW: www.itm.mu-luebeck.de
> ======================================================================

--
Martin Hauch Danet GmbH
Project Leader Mobile Communications Technology
Gutenbergstrasse 10
phone: +49-6151-868 433 D-64331 Weiterstadt, Germany
fax: +49-6151-868 498
This email address is being protected from spambots. You need JavaScript enabled to view it. www.danet.de

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 18 Sep 2002 07:27 #6214

Hi,

I would rather correct the example, because TestStep1and TestStep1_1 and TestStep2 and TestStep2_1 are sequential behaviour.
The correct TTCN-3 for the TTCN-2 example is:

alt
{
[] TestStep1()
{
TestStep1_1()
}
[] TestStep2()
{
TestStep2_1()
}
}


BR, Gyorgy

> dr György RÉTHY
> Line Manager
> 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: 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.]On Behalf Of Martin Hauch
>Sent: Wednesday, September 18, 2002 7:38 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Re: Mapping some TTCN-2 to TTCN-3
>
>
>Hi everyone,
>
>the example of Claude raises another problem:
>TTCN-2
>
>+TestStep1()
> +TestStep1_1()
>+TestStep2()
> +TestStep2_1()
>
>TestStep1 and TestStep2 should start with e.g. Receive-Statements. So
>TestStep1 and TestStep2 are alternatives.
>In TTCN-3 it should be described the following:
>
>alt {
> [] TestStep1()
> {
> alt {
> [] TestStep1_1();
> }
> }
> [] TestStep2()
> {
> alt {
> [] TestStep2_1();
> }
> }
>}
>
>But this is not correct according the current BNF. I think the rule
>
>GuardStatement ::= AltGuardChar (AltstepInstance | GuardOp
>StatementBlock)
>
>should be amend to the following:
>
>GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
>GuardOp StatementBlock)
>
>So the call of an AltstepInstance can be followed by other statements
>(optionally).
>By the way another question: Is it necessary that the
>StatementBlock after
>GuardOp is mandatory?
>
>Any Opinions?
>
>Best regards,
>Martin
>
>Jens Grabowski schrieb:
>
>> Hi Claude,
>>
>> I don't understand your problems:
>>
>> > TTCN-2
>> >
>> > +TestStep1
>> > +TestStep2
>>
>> is a sequence of two altstep calls (in TTCN-3 terminology) and maps
>> to the TTCN-3 sequence:
>>
>> TestStep1();
>> TestStep2();
>>
>> if you need/want to put this in alt statements:
>>
>> alt {
>> [] TestStep1();
>> }
>> alt {
>> [] TestStep2();
>> }
>>
>> Your second problem:
>>
>> > TTCN-2
>> > +TestStep1
>> > ( x := 5)
>>
>> is an altstep call followed by an assignment, i.e., a sequence of
>> two statements, that maps to the TTCN-3 code.
>>
>> TestStep1();
>> x := 5;
>>
>> of if put into an alt statement
>>
>> alt {
>> [] TestStep1();
>> }
>> x := 5;
>>
>> Best regards
>> Jens
>>
>> --
>>
>>
>======================================================================
>> Dr. Jens Grabowski
>> Institute for Telematics phone: +49 451 500 3723
>> University of Luebeck fax: +49 451 500 3722
>> Ratzeburger Allee 160 eMail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>> D-23538 Luebeck or This email address is being protected from spambots. You need JavaScript enabled to view it.
>> (Germany) WWW:
www.itm.mu-luebeck.de
> ======================================================================

--
Martin Hauch Danet GmbH
Project Leader Mobile Communications Technology
Gutenbergstrasse 10
phone: +49-6151-868 433 D-64331 Weiterstadt, Germany
fax: +49-6151-868 498
This email address is being protected from spambots. You need JavaScript enabled to view it. www.danet.de

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 18 Sep 2002 10:13 #6215

Hi,

I have forgotten to explicitly mention in my prevoius mail, that "TestStep1" and "TestStep2" have to be converted to altsteps, while TestStep1_1 and TestStep2_1 to functions (it is implicitly clear as functions are not allowed as guard operations). Otherwise the top-alternatives of TestStep1 and TestStep2 could not be evaluated in the same snapshot (as Martin told, they starts with a receive statements). Therefore the converted example changes to:

alt
{
[] AltStep1(); //TestStep1
[] AltStep2() //TestStep2
}

altstep AltStep1() runs on comp_xxx
{
[] p.receive (template_aaa) //first top alternative in TestStep1
{
// further statements of the first top alternative of TestStep1
Function1_1() //TestStep1_1
}
[] p.receive (template_bbb) //second top alternative in TestStep1
{
//further statements of the second top alternative of TestStep1
Function1_1() //TestStep1_1
}
etc.

altstep AltStep2 () runs on comp_xxx
{
[] p.receive (template_xxx) //first top alternative in TestStep2
{
// further statements of the first top alternative of TestStep2
Function2_1() //TestStep2_1
}
[] p.receive (template_yyy) //second top alternative in TestStep2
{
// further statements of the second top alternative of TestStep2
Function2_1() //TestStep2_1
}

etc.

Best Regards, György

> dr György RÉTHY
> Line Manager
> 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: 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.]On Behalf Of Gyorgy Rethy (ETH)
>Sent: Wednesday, September 18, 2002 9:28 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Re: Mapping some TTCN-2 to TTCN-3
>
>
>Hi,
>
>I would rather correct the example, because TestStep1and
>TestStep1_1 and TestStep2 and TestStep2_1 are sequential
>behaviour.
>The correct TTCN-3 for the TTCN-2 example is:
>
>alt
> {
> [] TestStep1()
> {
> TestStep1_1()
> }
> [] TestStep2()
> {
> TestStep2_1()
> }
> }
>
>
>BR, Gyorgy
>
>> dr György RÉTHY
>> Line Manager
>> 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: 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.]On Behalf Of Martin Hauch
>>Sent: Wednesday, September 18, 2002 7:38 AM
>>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>>Subject: Re: Mapping some TTCN-2 to TTCN-3
>>
>>
>>Hi everyone,
>>
>>the example of Claude raises another problem:
>>TTCN-2
>>
>>+TestStep1()
>> +TestStep1_1()
>>+TestStep2()
>> +TestStep2_1()
>>
>>TestStep1 and TestStep2 should start with e.g. Receive-Statements. So
>>TestStep1 and TestStep2 are alternatives.
>>In TTCN-3 it should be described the following:
>>
>>alt {
>> [] TestStep1()
>> {
>> alt {
>> [] TestStep1_1();
>> }
>> }
>> [] TestStep2()
>> {
>> alt {
>> [] TestStep2_1();
>> }
>> }
>>}
>>
>>But this is not correct according the current BNF. I think the rule
>>
>>GuardStatement ::= AltGuardChar (AltstepInstance | GuardOp
>>StatementBlock)
>>
>>should be amend to the following:
>>
>>GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
>>GuardOp StatementBlock)
>>
>>So the call of an AltstepInstance can be followed by other statements
>>(optionally).
>>By the way another question: Is it necessary that the
>>StatementBlock after
>>GuardOp is mandatory?
>>
>>Any Opinions?
>>
>>Best regards,
>>Martin
>>
>>Jens Grabowski schrieb:
>>
>>> Hi Claude,
>>>
>>> I don't understand your problems:
>>>
>>> > TTCN-2
>>> >
>>> > +TestStep1
>>> > +TestStep2
>>>
>>> is a sequence of two altstep calls (in TTCN-3 terminology) and maps
>>> to the TTCN-3 sequence:
>>>
>>> TestStep1();
>>> TestStep2();
>>>
>>> if you need/want to put this in alt statements:
>>>
>>> alt {
>>> [] TestStep1();
>>> }
>>> alt {
>>> [] TestStep2();
>>> }
>>>
>>> Your second problem:
>>>
>>> > TTCN-2
>>> > +TestStep1
>>> > ( x := 5)
>>>
>>> is an altstep call followed by an assignment, i.e., a sequence of
>>> two statements, that maps to the TTCN-3 code.
>>>
>>> TestStep1();
>>> x := 5;
>>>
>>> of if put into an alt statement
>>>
>>> alt {
>>> [] TestStep1();
>>> }
>>> x := 5;
>>>
>>> Best regards
>>> Jens
>>>
>>> --
>>>
>>>
>>======================================================================
>>> Dr. Jens Grabowski
>>> Institute for Telematics phone: +49 451 500 3723
>>> University of Luebeck fax: +49 451 500 3722
>>> Ratzeburger Allee 160 eMail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>>> D-23538 Luebeck or This email address is being protected from spambots. You need JavaScript enabled to view it.
>>> (Germany) WWW:
>www.itm.mu-luebeck.de
>>
>======================================================================
>
>--
>Martin Hauch Danet GmbH
>Project Leader Mobile Communications Technology
> Gutenbergstrasse 10
>phone: +49-6151-868 433 D-64331 Weiterstadt, Germany
>fax: +49-6151-868 498
>This email address is being protected from spambots. You need JavaScript enabled to view it. www.danet.de
>

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 18 Sep 2002 20:40 #6216

In einer eMail vom 9/18/02 7:41:13 AM W. Europe Daylight Time schreibt
This email address is being protected from spambots. You need JavaScript enabled to view it.:

Hi Martin,


Actually, what you propose here:

> GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
> GuardOp StatementBlock)

is the same as I suggested (if you take into consideration the other
productions..l

AltGuardChar (AltstepInstance | [ GuardOp] StatementBlock)

Cheers,

Claude.

Please Log in to join the conversation.

Mapping some TTCN-2 to TTCN-3 19 Sep 2002 08:57 #6220

Hi,

I probably need some clarification why the two proposals are the same?

If I take
GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
GuardOp StatementBlock)

this would result for example:

alt
{
[] Altstep1();
[] Altstep2()
{
v_myValue := v_myValue + 1
}
[] p.receive (anyTemplate)
{
v_myValue := v_myValue + 2
}
}

While
GuardStatement ::= AltGuardChar (AltstepInstance | [ GuardOp] StatementBlock)

would result:
alt
{
[] Altstep1();
[]
{
v_myValue := v_myValue + 1
}
[] p.receive (anyTemplate)
{
v_myValue := v_myValue + 2
}
}

I do understand the first proposal and it makes sense to me as a new feature in the language. I do not understand the second one, especially what is the difference between the second alternative and an else branch of the alt?

Best Regards, György

dr György RÉTHY
Line Manager
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: 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.]On Behalf Of Claude Desroches
Sent: Wednesday, September 18, 2002 10:41 PM
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: Mapping some TTCN-2 to TTCN-3


In einer eMail vom 9/18/02 7:41:13 AM W. Europe Daylight Time schreibt This email address is being protected from spambots. You need JavaScript enabled to view it.:

Hi Martin,


Actually, what you propose here:



GuardStatement ::= AltGuardChar (AltstepInstance [ StatementBlock ] |
GuardOp StatementBlock)



is the same as I suggested (if you take into consideration the other productions..l

AltGuardChar (AltstepInstance | [ GuardOp] StatementBlock)

Cheers,

Claude.

Please Log in to join the conversation.

  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin