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
>