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

TOPIC: 2 questions

2 questions 16 Oct 2001 13:57 #5962

Hello All,
I have two questions. Firstly is this statement (taken from the tri-list email list) correct?

> 1) According to Snapshot semantics, snapshots are only taken inside an
> alt statement...

What about the following:

pco1!send(X); pco1!send(Y);...

is a snapshot taken after the first send?

My second question is, what is a snapshot taken of? Ignoring timeout lists, variables etc, is it the whole PCO queue or just the top element of the PCO queue? The standard (TTCN-2) seems to imply (???) the whole queue, but existing tutorials (Wiles/Kroon TTCN restaurant tutorial for example in section 6.1) seem to suggest just the top element of the PCO queues. With a FIFO queue semantics it should not matter (but it should be clear in the operational semantics of the standard anyway B5.4.1 and B5.26), but I am in a project considering possible real time enhancements to TTCN-3 and one proposal we are kicking around is the possibility to prioritise certain time constrained events. This would only make sense if the snapshots were of the whole PCO queues and then some form of queueing were done other than FIFO, i.e. time constrained events were placed in front of non-time critical events.

Thanks for any responses,

Rich

Dr Richard Sinnott
Ericsson EPK Karlskrona
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Mobile: +46-(0)70-690-6007
The administrator has disabled public write access.

2 questions 17 Oct 2001 10:12 #5964

Hi Richard,

since no one answered so far, I give a short answer:

> > 1) According to Snapshot semantics, snapshots are only
> taken inside an
> > alt statement...
>
> What about the following:
>
> pco1!send(X); pco1!send(Y);...
>
> is a snapshot taken after the first send?

No
(there is no need to force such an 'expensive' action
between two send operations)

>
> My second question is, what is a snapshot taken of? Ignoring
> timeout lists, variables etc, is it the whole PCO queue or
> just the top element of the PCO queue? The standard (TTCN-2)
> seems to imply (???) the whole queue, but existing tutorials
> (Wiles/Kroon TTCN restaurant tutorial for example in section
> 6.1) seem to suggest just the top element of the PCO queues.
> With a FIFO queue semantics it should not matter (but it
> should be clear in the operational semantics of the standard
> anyway B5.4.1 and B5.26), but I am in a project considering
> possible real time enhancements to TTCN-3 and one proposal we
> are kicking around is the possibility to prioritise certain
> time constrained events. This would only make sense if the
> snapshots were of the whole PCO queues and then some form of
> queueing were done other than FIFO, i.e. time constrained
> events were placed in front of non-time critical events.
>

A snapshot is considered to be a partial component state that
at least contains all information necessary to evaluate the
set of alternative in an alt statement (TTCN-3) or the set of
alternatives defined by the same level of indentation (TTCN-2).

Forcing implementations to collect information that is not needed,
e.g., the entire queue contents, makes no sense.

(However, as main writers of the operational semantics for TTCN-3
I must admit that the snapshot is not implemented correctly in
the semantics, but I hope that we can fix this soon.)

If you need to reorder the FIFO queues, you should do it before
taking a snapshot, or used different ports for different
priorities and order the receiving events according to these
priorities.

Hope that helps for the moment
Jens

> Thanks for any responses,
>
> Rich
>
> Dr Richard Sinnott
> Ericsson EPK Karlskrona
> Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Mobile: +46-(0)70-690-6007
>
The administrator has disabled public write access.

2 questions 17 Oct 2001 11:27 #5969

Just a short follow up!

Dr Richard Sinnott
Ericsson EPK Karlskrona
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Mobile: +46-(0)70-690-6007


> since no one answered so far, I give a short answer:
>
> > > 1) According to Snapshot semantics, snapshots are only
> > taken inside an
> > > alt statement...
> >
> > What about the following:
> >
> > pco1!send(X); pco1!send(Y);...
> >
> > is a snapshot taken after the first send?
>
> No
> (there is no need to force such an 'expensive' action
> between two send operations)

Correct me if I am wrong, but this is different to the TTCN-2 operational semantics approach where I believe a snapshot is taken after every matching event, e.g. after doing a send a new snapshot is taken. Put another way, whenever a new level of indentation is taken, a snapshot is taken. No?
The administrator has disabled public write access.

2 questions 17 Oct 2001 13:17 #5972

>
> > since no one answered so far, I give a short answer:
> >
> > > > 1) According to Snapshot semantics, snapshots are only
> > > taken inside an
> > > > alt statement...
> > >
> > > What about the following:
> > >
> > > pco1!send(X); pco1!send(Y);...
> > >
> > > is a snapshot taken after the first send?
> >
> > No
> > (there is no need to force such an 'expensive' action
> > between two send operations)
>
> Correct me if I am wrong, but this is different to the TTCN-2
> operational semantics approach where I believe a snapshot is
> taken after every matching event, e.g. after doing a send a
> new snapshot is taken. Put another way, whenever a new level
> of indentation is taken, a snapshot is taken. No?
>

Looking through the operational semantics Annex of TTCN-2 and
having a short chat with Anthony as one father of TTCN-2 (and
TTCN-3), you are right.

You are also right that the TAKE_SNAPSHOT function is written
in such a way that it is not clear if the whole contents of the
PCO queues are taken into consideration or only their top
contents.

However, you shouldn't read this too literally. It is an informal
semantics description that should mainly explain the principles
of the Notation. An optimized TTCN-2 implementation will of course
only take snapshots when necessary and only collect the information
relevant for the snapshot evaluation.

Hope this helps

Jens
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin