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

TOPIC: Repeated start on a test component

Repeated start on a test component 23 Jun 2003 12:34 #6495

Hello all,

There is an area in TTCN-3 that is not 100% clear to me from reading the standard:

After creating a parallel test component, the behaviour on this component is started by executing a start statement.

This code could look like:

var tc TestComponentType;
tc := TestComponentType.create;
tc.start(someFunction())

Up to this point anything is fine. Where I am not sure is whether it is allowed to start another function on the same test component after the first one finished: I.e. should the following code result in either a compile time or run time system error, or is this correct code:

var tc TestComponentType;
tc := TestComponentType.create;
tc.start(someFunction());

tc.done;
tc.start(anotherFunction());

My understanding is that this is not correct. One creates a test component and one starts one function on it, that's it. But when checking this in the standard, I actually did not find very much supporting my understanding: In part 1 of the standard, 2.2.1, it states 'Once a PTC has been created and connected behaviour has to be bound to this PTC and the execution of its behaviour has to be started.' But I cannot find anything else. In part 4, v 2.2.1, it is stated 'The start componenet operation starts a newly created component'. This sounds quite clear, but in the flow graph itself I again cannot find a check that no other function has already executed on this test component.

Again, my understanding is, that for one parallel test component there can be at most one start statement. In this way one avoids any problems of starting a function while another one is executing, what is the meaning of 'done' after another function has been started, should variables be reinitiatlized or not.

Any opinions on this? I would like to get a clear understanding.

One further piece of information: When looking up how this was handled in TTCN-2 (ISO/IEC 96436-3:1998), the create and start statements of TTCN-3 are handled by a single CREATE statement of TTCN-2. This statement gets as arguments a sequence of PTCs to be created and for each of these PTCs a reference to a behaviour tree. In 15.9.10.1 it is stated that 'The execution of a CREATE construct on a PTC which has already been created shall result in a Test Case error'. It is also not possible in TTCN-2 to 'restart' a test component.

Best regards

Thomas



| Thomas Deiß, Nokia Research Center Street address: |
| P.O. Box 101823 Meesmannstrasse 103 |
| D-44718 Bochum, GERMANY D-44807 Bochum, GERMANY |
| Phone: +49 234 984 2217 (int. 8272217) |
| Fax: +49 234 984 3491 (int. 8273491) |
| E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it. |
The administrator has disabled public write access.

Repeated start on a test component 23 Jun 2003 12:52 #6496

Hi Thomas,

a quick answer without having really the time to look it up in the standard.

As far as I remember there was a statement in the standard stating that
after termination of a component it can not be restarted.

Of course this does not really imply that you can not call start() on a
component *while* a component is executing a behavior.

I will try to spend some time to search the sentence I am referencing to.

I hope this helps.

Best regards,

Theo

Thomas Deiss wrote:
> Hello all,
>
> There is an area in TTCN-3 that is not 100% clear to me from reading the standard:
>
> After creating a parallel test component, the behaviour on this component is started by executing a start statement.
>
> This code could look like:
>
> var tc TestComponentType;
> tc := TestComponentType.create;
> tc.start(someFunction())
>
> Up to this point anything is fine. Where I am not sure is whether it is allowed to start another function on the same test component after the first one finished: I.e. should the following code result in either a compile time or run time system error, or is this correct code:
>
> var tc TestComponentType;
> tc := TestComponentType.create;
> tc.start(someFunction());
>
> tc.done;
> tc.start(anotherFunction());
>
> My understanding is that this is not correct. One creates a test component and one starts one function on it, that's it. But when checking this in the standard, I actually did not find very much supporting my understanding: In part 1 of the standard, 2.2.1, it states 'Once a PTC has been created and connected behaviour has to be bound to this PTC and the execution of its behaviour has to be started.' But I cannot find anything else. In part 4, v 2.2.1, it is stated 'The start componenet operation starts a newly created component'. This sounds quite clear, but in the flow graph itself I again cannot find a check that no other function has already executed on this test component.
>
> Again, my understanding is, that for one parallel test component there can be at most one start statement. In this way one avoids any problems of starting a function while another one is executing, what is the meaning of 'done' after another function has been started, should variables be reinitiatlized or not.
>
> Any opinions on this? I would like to get a clear understanding.
>
> One further piece of information: When looking up how this was handled in TTCN-2 (ISO/IEC 96436-3:1998), the create and start statements of TTCN-3 are handled by a single CREATE statement of TTCN-2. This statement gets as arguments a sequence of PTCs to be created and for each of these PTCs a reference to a behaviour tree. In 15.9.10.1 it is stated that 'The execution of a CREATE construct on a PTC which has already been created shall result in a Test Case error'. It is also not possible in TTCN-2 to 'restart' a test component.
>
> Best regards
>
> Thomas
>
>
>
>
> | Thomas Deiß, Nokia Research Center Street address: |
> | P.O. Box 101823 Meesmannstrasse 103 |
> | D-44718 Bochum, GERMANY D-44807 Bochum, GERMANY |
> | Phone: +49 234 984 2217 (int. 8272217) |
> | Fax: +49 234 984 3491 (int. 8273491) |
> | E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it. |
>
>
The administrator has disabled public write access.

Repeated start on a test component 23 Jun 2003 16:22 #6497

Hi,

When the PTC behaviour function (the first one started on the component instance) finishes or stopped, the PTC dies forever (and all of its ports are disconnected/dismapped) (see also part 4, $11.49.2 Flow graph segment <stop-component>) . Therefore, the second start would simply refer to an uncreated component reference and cause a run-time error.

After tc.done; the component reference can be re-used on creating a new component instance (of the same type) and connecting/mapping its ports again; but this one will not be the same PTC as before (e.g. values of all component variables are lost).

Best Regards, György

> dr György RÉTHY, MScEE, PhD
> System Product Manager
> I&V, Product Unit, Ericsson Hungary
> Address: Irinyi J. u. 4-20, Budapest, Hungary, H-1117
> Phone: + 36 (1) 437-7006
> Mobile: + 36 (30) 297-7862
> Fax: + 36 (1) 437-7767
> Mailto: This email address is being protected from spambots. You need JavaScript enabled to view it.


>
Original Message
>From: Thomas Deiss [This email address is being protected from spambots. You need JavaScript enabled to view it.]
>Sent: Monday, June 23, 2003 2:34 PM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Repeated start on a test component
>
>
>Hello all,
>
>There is an area in TTCN-3 that is not 100% clear to me from
>reading the standard:
>
>After creating a parallel test component, the behaviour on
>this component is started by executing a start statement.
>
>This code could look like:
>
>var tc TestComponentType;
>tc := TestComponentType.create;
>tc.start(someFunction())
>
>Up to this point anything is fine. Where I am not sure is
>whether it is allowed to start another function on the same
>test component after the first one finished: I.e. should the
>following code result in either a compile time or run time
>system error, or is this correct code:
>
>var tc TestComponentType;
>tc := TestComponentType.create;
>tc.start(someFunction());
>
>tc.done;
>tc.start(anotherFunction());
>
>My understanding is that this is not correct. One creates a
>test component and one starts one function on it, that's it.
>But when checking this in the standard, I actually did not
>find very much supporting my understanding: In part 1 of the
>standard, 2.2.1, it states 'Once a PTC has been created and
>connected behaviour has to be bound to this PTC and the
>execution of its behaviour has to be started.' But I cannot
>find anything else. In part 4, v 2.2.1, it is stated 'The
>start componenet operation starts a newly created component'.
>This sounds quite clear, but in the flow graph itself I again
>cannot find a check that no other function has already
>executed on this test component.
>
>Again, my understanding is, that for one parallel test
>component there can be at most one start statement. In this
>way one avoids any problems of starting a function while
>another one is executing, what is the meaning of 'done' after
>another function has been started, should variables be
>reinitiatlized or not.
>
>Any opinions on this? I would like to get a clear understanding.
>
>One further piece of information: When looking up how this was
>handled in TTCN-2 (ISO/IEC 96436-3:1998), the create and start
>statements of TTCN-3 are handled by a single CREATE statement
>of TTCN-2. This statement gets as arguments a sequence of PTCs
>to be created and for each of these PTCs a reference to a
>behaviour tree. In 15.9.10.1 it is stated that 'The execution
>of a CREATE construct on a PTC which has already been created
>shall result in a Test Case error'. It is also not possible in
>TTCN-2 to 'restart' a test component.
>
>Best regards
>
>Thomas
>
>
>
>
>| Thomas Deiß, Nokia Research Center Street address: |
>| P.O. Box 101823 Meesmannstrasse 103 |
>| D-44718 Bochum, GERMANY D-44807 Bochum, GERMANY |
>| Phone: +49 234 984 2217 (int. 8272217) |
>| Fax: +49 234 984 3491 (int. 8273491) |
>| E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it. |
>
>
The administrator has disabled public write access.

Repeated start on a test component 25 Jun 2003 08:42 #6503

Hi,

as Gyorgy pointed out correctly, the result of a stop component
operation causes that a component disappears from the test system.

However, the question is related to the start operation and I
believe there is a case that is neither described in Part 4
(operational semantics) nor in Part 1 (textual description & BNF)
and this is the case of applying the start operation to a running
component (i.e., after create and start operation).

Thomas already pointed to the place where to remove this
ambiguity in the operational semantics:

> >This sounds quite clear, but in the flow graph itself I again
> >cannot find a check that no other function has already
> >executed on this test component.

He is right that a check is missing, i.e. a check that the
referenced component has been created and has not yet been started.
Some clarifying textual description might also be helpful.

Best regards
Jens

"Gyorgy Rethy (ETH)" schrieb:
>
> Hi,
>
> When the PTC behaviour function (the first one started on the component
instance) finishes or stopped, the PTC dies forever (and all of its ports are
disconnected/dismapped) (see also part 4, $11.49.2 Flow graph segment <stop-
component>) . Therefore, the second start would simply refer to an uncreated
component reference and cause a run-time error.
>
> After tc.done; the component reference can be re-used on creating a new
component instance (of the same type) and connecting/mapping its ports again;
but this one will not be the same PTC as before (e.g. values of all component
variables are lost).
>
> Best Regards, György
>
> > dr György RÉTHY, MScEE, PhD
> > System Product Manager
> > I&V, Product Unit, Ericsson Hungary
> > Address: Irinyi J. u. 4-20, Budapest, Hungary, H-1117
> > Phone: + 36 (1) 437-7006
> > Mobile: + 36 (30) 297-7862
> > Fax: + 36 (1) 437-7767
> > Mailto: This email address is being protected from spambots. You need JavaScript enabled to view it.
>
> >
Original Message
> >From: Thomas Deiss [This email address is being protected from spambots. You need JavaScript enabled to view it.]
> >Sent: Monday, June 23, 2003 2:34 PM
> >To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> >Subject: Repeated start on a test component
> >
> >
> >Hello all,
> >
> >There is an area in TTCN-3 that is not 100% clear to me from
> >reading the standard:
> >
> >After creating a parallel test component, the behaviour on
> >this component is started by executing a start statement.
> >
> >This code could look like:
> >
> >var tc TestComponentType;
> >tc := TestComponentType.create;
> >tc.start(someFunction())
> >
> >Up to this point anything is fine. Where I am not sure is
> >whether it is allowed to start another function on the same
> >test component after the first one finished: I.e. should the
> >following code result in either a compile time or run time
> >system error, or is this correct code:
> >
> >var tc TestComponentType;
> >tc := TestComponentType.create;
> >tc.start(someFunction());
> >
> >tc.done;
> >tc.start(anotherFunction());
> >
> >My understanding is that this is not correct. One creates a
> >test component and one starts one function on it, that's it.
> >But when checking this in the standard, I actually did not
> >find very much supporting my understanding: In part 1 of the
> >standard, 2.2.1, it states 'Once a PTC has been created and
> >connected behaviour has to be bound to this PTC and the
> >execution of its behaviour has to be started.' But I cannot
> >find anything else. In part 4, v 2.2.1, it is stated 'The
> >start componenet operation starts a newly created component'.
> >This sounds quite clear, but in the flow graph itself I again
> >cannot find a check that no other function has already
> >executed on this test component.
> >
> >Again, my understanding is, that for one parallel test
> >component there can be at most one start statement. In this
> >way one avoids any problems of starting a function while
> >another one is executing, what is the meaning of 'done' after
> >another function has been started, should variables be
> >reinitiatlized or not.
> >
> >Any opinions on this? I would like to get a clear understanding.
> >
> >One further piece of information: When looking up how this was
> >handled in TTCN-2 (ISO/IEC 96436-3:1998), the create and start
> >statements of TTCN-3 are handled by a single CREATE statement
> >of TTCN-2. This statement gets as arguments a sequence of PTCs
> >to be created and for each of these PTCs a reference to a
> >behaviour tree. In 15.9.10.1 it is stated that 'The execution
> >of a CREATE construct on a PTC which has already been created
> >shall result in a Test Case error'. It is also not possible in
> >TTCN-2 to 'restart' a test component.
> >
> >Best regards
> >
> >Thomas
> >
> >
> >
> >
> >| Thomas Deiß, Nokia Research Center Street address: |
> >| P.O. Box 101823 Meesmannstrasse 103 |
> >| D-44718 Bochum, GERMANY D-44807 Bochum, GERMANY |
> >| Phone: +49 234 984 2217 (int. 8272217) |
> >| Fax: +49 234 984 3491 (int. 8273491) |
> >| E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it. |
> >
> >

--

======================================================================
Prof. Dr. Jens Grabowski
Institut für Informatik
Universität Göttingen E-mail:
Lotzestrasse 16-18 This email address is being protected from spambots. You need JavaScript enabled to view it.
D-37083 Göttingen, Deutschland
www.ifi.informatik.uni-goettingen.de/

until July I am mainly reachable at

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
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin