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

TOPIC: Various questions about timers

Various questions about timers 15 Aug 2008 07:26 #7410

I'm trying to understand the semantics of timers, and the changes
following the discussion in March. I'm afraid even after reading most
of it I'm thoroughly confused, so I hope you'll indulge me if the
questions I'm asking are stupid or have been answered before: your help
would be much appreciated.

First off, the 3.3.8 draft of the standard has reworded the text related
to "all timer" and "any timer" to not mention scope any more. Clause
23.1 says that a running-timers list and a timeout-list are maintained
at the component level. The mention of "scope" has been removed from
the wording describing the handling of those lists. However, clause
23.2 starts off by saying "[...] to the list of running timers (for the
given scope unit)." So what's the relationship between these lists and
scopes? Specifically, are, say, running timers removed from the
running-timers lists when they go out of scope?

Also, it seems that the operational semantics have also been changed,
but I don't understand the relationship between part 1 and part 4.
Specifically, the running-timers list and timeout-list don't show up in
the component state. The specification of the timeout operation still
(as in v3.2.1) iterates over the timers according to the dynamic scope
units, which appears to say at "any" and "all" *are* sensitive to the
dynamic scope. (In clause 9.52 in part 4 (v3.3.8 again), there are two
flow graphs for the stop operation that differ in this regard: I think
one of them is simply the old one.)

Moreover, I don't quite understand how snapshotting works with respect
to timers. If the program calls an altstep, and that altstep declares a
local timer instance, what are the semantics of the various operations
looking at the timer snapshot? The local timer didn't exist when the
snapshot was taken, so it didn't get included in the snapshot, right?
If that's true, what exactly can the altstep do with the local timer?
Same for function-local timers, I guess. (I'm sure I'm missing
something obvious here.)

--
Regards,
Mike
The administrator has disabled public write access.

Various questions about timers 03 Oct 2008 08:38 #7463

Now that 3.4.1 has come out, I've read and re-read the specs a few more
times. I'm still puzzled about the semantics about the "running-timers"
and "timeout-list" lists (and about the semantics of snapshotting
wrt. timers). If anybody could help me sort this out, it would be much
appreciated!

Michael Sperber <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:

> I'm trying to understand the semantics of timers, and the changes
> following the discussion in March. I'm afraid even after reading most
> of it I'm thoroughly confused, so I hope you'll indulge me if the
> questions I'm asking are stupid or have been answered before: your help
> would be much appreciated.
>
> First off, the 3.3.8 draft of the standard has reworded the text related
> to "all timer" and "any timer" to not mention scope any more. Clause
> 23.1 says that a running-timers list and a timeout-list are maintained
> at the component level. The mention of "scope" has been removed from
> the wording describing the handling of those lists. However, clause
> 23.2 starts off by saying "[...] to the list of running timers (for the
> given scope unit)." So what's the relationship between these lists and
> scopes? Specifically, are, say, running timers removed from the
> running-timers lists when they go out of scope?
>
> Also, it seems that the operational semantics have also been changed,
> but I don't understand the relationship between part 1 and part 4.
> Specifically, the running-timers list and timeout-list don't show up in
> the component state. The specification of the timeout operation still
> (as in v3.2.1) iterates over the timers according to the dynamic scope
> units, which appears to say at "any" and "all" *are* sensitive to the
> dynamic scope. (In clause 9.52 in part 4 (v3.3.8 again), there are two
> flow graphs for the stop operation that differ in this regard: I think
> one of them is simply the old one.)
>
> Moreover, I don't quite understand how snapshotting works with respect
> to timers. If the program calls an altstep, and that altstep declares a
> local timer instance, what are the semantics of the various operations
> looking at the timer snapshot? The local timer didn't exist when the
> snapshot was taken, so it didn't get included in the snapshot, right?
> If that's true, what exactly can the altstep do with the local timer?
> Same for function-local timers, I guess. (I'm sure I'm missing
> something obvious here.)
>
> --
> Regards,
> Mike
>
The administrator has disabled public write access.

Various questions about timers 03 Oct 2008 09:47 #7464

Hi Mike,

I think you should specify your problem in more detail to get an appropriate answer...

BR, Gyorgy

>
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 Michael Sperber
> Sent: 2008-október-3 10:38
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: Re: Various questions about timers
>
> Now that 3.4.1 has come out, I've read and re-read the specs
> a few more times. I'm still puzzled about the semantics
> about the "running-timers"
> and "timeout-list" lists (and about the semantics of
> snapshotting wrt. timers). If anybody could help me sort
> this out, it would be much appreciated!
>
> Michael Sperber <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:
>
> > I'm trying to understand the semantics of timers, and the changes
> > following the discussion in March. I'm afraid even after
> reading most
> > of it I'm thoroughly confused, so I hope you'll indulge me if the
> > questions I'm asking are stupid or have been answered before: your
> > help would be much appreciated.
> >
> > First off, the 3.3.8 draft of the standard has reworded the text
> > related to "all timer" and "any timer" to not mention scope
> any more.
> > Clause
> > 23.1 says that a running-timers list and a timeout-list are
> maintained
> > at the component level. The mention of "scope" has been
> removed from
> > the wording describing the handling of those lists. However, clause
> > 23.2 starts off by saying "[...] to the list of running timers (for
> > the given scope unit)." So what's the relationship between these
> > lists and scopes? Specifically, are, say, running timers
> removed from
> > the running-timers lists when they go out of scope?
> >
> > Also, it seems that the operational semantics have also
> been changed,
> > but I don't understand the relationship between part 1 and part 4.
> > Specifically, the running-timers list and timeout-list
> don't show up
> > in the component state. The specification of the timeout operation
> > still (as in v3.2.1) iterates over the timers according to
> the dynamic
> > scope units, which appears to say at "any" and "all" *are*
> sensitive
> > to the dynamic scope. (In clause 9.52 in part 4 (v3.3.8
> again), there
> > are two flow graphs for the stop operation that differ in
> this regard:
> > I think one of them is simply the old one.)
> >
> > Moreover, I don't quite understand how snapshotting works
> with respect
> > to timers. If the program calls an altstep, and that
> altstep declares
> > a local timer instance, what are the semantics of the various
> > operations looking at the timer snapshot? The local timer didn't
> > exist when the snapshot was taken, so it didn't get
> included in the snapshot, right?
> > If that's true, what exactly can the altstep do with the
> local timer?
> > Same for function-local timers, I guess. (I'm sure I'm missing
> > something obvious here.)
> >
> > --
> > Regards,
> > Mike
> >
>
The administrator has disabled public write access.

Various questions about timers 04 Oct 2008 12:42 #7465

György Réthy <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:

> I think you should specify your problem in more detail to get an appropriate answer...

What kind of detail is missing?

Regards,
Mike
The administrator has disabled public write access.

Various questions about timers 07 Oct 2008 15:12 #7466

Dear Michael,

first of all, for keeping track of the changes I recommend to look into
the Mantis "TTCN-3 Change Requests" sub-projects
(www.ttcn3.org/ChangeRequest.htm). The ETSI TTCN-3 maintenance
team is forced to work on a Change Request (CR) basis and all changes
are documented in these sub-projects, in most cases by copying the parts
to be changed into a Word File and by using change bars to document the
changes. One exception to this are the figures of the operational
semantics because figures and change bars do not work properly together
(or I am not able to handle it properly).

The number of the CR to which you seem to refer is 2151.

If you look into the documents with the change bars attached the CR2151
you will recognize that in the Core Language Document only Section 23
"Timer Operations" has changed and that the changes are related to the
semantics of ANY and ALL. All other parts of the document remain
unchanged (if changed than in relation to some other CR).

This means:
- The lifetime of a timer is still related to the scope unit in which it
is declared.

- For example, if a local timer is declared and started in a function
(or altstep) and the function (or altstep) ends, then the timer is
destoyed like any other local variable.

- I hope this explains why the timer lists in the operational semantics
are still handled similar to variables (i.e., a list of lists of timer
states and each list in the list of lists refers to a scope in a call
hierarchy).


Now to the changes:
- If a function A with local variables and timers calls another function
B, the local definitions of A are not visible in B (I assume here that
the local definitions are not passed into B as parameter).

- This means that the local variables and timers defined in A cannot be
accessed "directly" in B because they are not known (you cannot start a
timer which you do not know).

- The usage of ANY and ALL for timers was before the implementation of
CR 2151 also related to the actual scope in which ANY and ALL are used,
i.e., ANY/ALL timer/s in the actual scope unit.


- However, most TTCN-3 users and TTCN-3 tool vendors (please don't
comment "most" in possible follow-up mails) felt that timers are a
special species and that ANY/ALL for timer operations should not be
related to timers in the actual scope unit only, but also to timers in
scope units previously entered but not be left, e.g., in the example
above, if ANY/ALL is used in function B, it allows to check the status
timers declared in function B (of course, local scope) AND function A
(and possibly further timers in a deeper function call hierarchy).

- In the operational semantics this means that if ANY/ALL are used, we
have to iterate through all lists (existing scopes) in the list of lists
of timer bindings.

I hope this explains the changes in the core language document and how
this is reflected in the operational semantics.

Best regards
Jens

Michael Sperber schrieb:
> I'm trying to understand the semantics of timers, and the changes
> following the discussion in March. I'm afraid even after reading most
> of it I'm thoroughly confused, so I hope you'll indulge me if the
> questions I'm asking are stupid or have been answered before: your help
> would be much appreciated.
>
> First off, the 3.3.8 draft of the standard has reworded the text related
> to "all timer" and "any timer" to not mention scope any more. Clause
> 23.1 says that a running-timers list and a timeout-list are maintained
> at the component level. The mention of "scope" has been removed from
> the wording describing the handling of those lists. However, clause
> 23.2 starts off by saying "[...] to the list of running timers (for the
> given scope unit)." So what's the relationship between these lists and
> scopes? Specifically, are, say, running timers removed from the
> running-timers lists when they go out of scope?
>
> Also, it seems that the operational semantics have also been changed,
> but I don't understand the relationship between part 1 and part 4.
> Specifically, the running-timers list and timeout-list don't show up in
> the component state. The specification of the timeout operation still
> (as in v3.2.1) iterates over the timers according to the dynamic scope
> units, which appears to say at "any" and "all" *are* sensitive to the
> dynamic scope. (In clause 9.52 in part 4 (v3.3.8 again), there are two
> flow graphs for the stop operation that differ in this regard: I think
> one of them is simply the old one.)
>
> Moreover, I don't quite understand how snapshotting works with respect
> to timers. If the program calls an altstep, and that altstep declares a
> local timer instance, what are the semantics of the various operations
> looking at the timer snapshot? The local timer didn't exist when the
> snapshot was taken, so it didn't get included in the snapshot, right?
> If that's true, what exactly can the altstep do with the local timer?
> Same for function-local timers, I guess. (I'm sure I'm missing
> something obvious here.)
>

--
======================================================================
Prof. Dr. Jens Grabowski
Institute for Computer Science phone: +49 551 39 172022
University of Goettingen fax: +49 551 39 14415
Goldschmidtstraße 7
DE-37077 Goettingen This email address is being protected from spambots. You need JavaScript enabled to view it.
(Germany) www.swe.informatik.uni-goettingen.de
======================================================================
The administrator has disabled public write access.

Various questions about timers 09 Oct 2008 06:42 #7467

Jens Grabowski <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:

> If you look into the documents with the change bars attached the
> CR2151 you will recognize that in the Core Language Document only
> Section 23 "Timer Operations" has changed and that the changes are
> related to the semantics of ANY and ALL. All other parts of the
> document remain unchanged (if changed than in relation to some other
> CR).

Yes, that's what I was looking at, and I couldn't fit my head around the
wording. However, your explanation makes this aspect perfectly clear.
Thanks!

I'm still wondering about this one, however:

>> Moreover, I don't quite understand how snapshotting works with respect
>> to timers. If the program calls an altstep, and that altstep declares a
>> local timer instance, what are the semantics of the various operations
>> looking at the timer snapshot? The local timer didn't exist when the
>> snapshot was taken, so it didn't get included in the snapshot, right?
>> If that's true, what exactly can the altstep do with the local timer?
>> Same for function-local timers, I guess. (I'm sure I'm missing
>> something obvious here.)

Help with this would be much appreciated!

--
Regards,
Mike
The administrator has disabled public write access.

Various questions about timers 09 Oct 2008 08:19 #7468

Michael Sperber schrieb:
> Jens Grabowski <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:

>>> Moreover, I don't quite understand how snapshotting works with respect
>>> to timers. If the program calls an altstep, and that altstep declares a
>>> local timer instance, what are the semantics of the various operations
>>> looking at the timer snapshot? The local timer didn't exist when the
>>> snapshot was taken, so it didn't get included in the snapshot, right?
>>> If that's true, what exactly can the altstep do with the local timer?
>>> Same for function-local timers, I guess. (I'm sure I'm missing
>>> something obvious here.)
>
> Help with this would be much appreciated!
>

Dear Michael,

yes, the local timer of an altstep is not part of the snapshot that
causes entering the altstep.

However, there is no restriction on the structure of the altstep
branches or function bodies. They may contain further ALT constructs
that need to be time guarded.

I hope this is enough justification, because it is impossible (at least
for me) to foresee all possible usages of local timers in general. Btw.
it might be interesting to check how often local timers are used in
e.g., ETSI test suites.

Regards
Jens









--
======================================================================
Prof. Dr. Jens Grabowski
Institute for Computer Science phone: +49 551 39 172022
University of Goettingen fax: +49 551 39 14415
Goldschmidtstraße 7
DE-37077 Goettingen This email address is being protected from spambots. You need JavaScript enabled to view it.
(Germany) www.swe.informatik.uni-goettingen.de
======================================================================
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin