Subject: SDL-News: Algorithmics
From: Philippe Leblanc (leblanc#tlse.verilog.fr)
Date: Mon Mar 09 1998 - 16:13:48 GMT
The originator of this message is responsible for its content.
-----From Philippe Leblanc <leblanc#tlse.verilog.fr> to sdlnews -----
Dear SDL users,
As you should know, SG10-Q6 (in charge of SDL) is working
on the introduction of algorithmics in SDL.
The principles are to allow an SDL designer to specify
SDL actions and procedures in a textual way. A "for"
construct has been added to allow loops in transitions.
This proposal has already been presented by Thomas Weigert,
the coordinator for this item, on this mailing list.
After a quick survey of our customers base, we have identified
two issues. I discuss them here to have your feedbacks as
1) Syntax for the loop construct
The syntax currently proposed differs from the C syntax.
Our feedback from SDL users is this is confusing, and they
would prefer using the C syntax.
A detailed comment of one of our experts is joined at the
bottom of the message.
2) Graphical loops
Another feedback we had is: "I use SDL because SDL is a
graphic modeling technique, and includes a complete
action language to describe transitions. This is not the
case with UML statecharts. With your proposal, I will be
able to express loop constructs in a clean way -- so
without joins and labels -- but this will not be possible
in a graphic way, which is the major advantage of SDL
compared to UML. So it is not satisfactory."
What is your opinion about this concern?
We will appreciate to have your position regarding these
The annual Geneva meeting takes place end of March.
This will be great to have a lot of answers in order to
take the appropriate decisions wrt the introduction of
algorithmic forms in SDL.
-- Tel.: +33 (0)5 61 19 29 33 Switchboard: +33 (0)5 61 19 29 39 Fax: +33 (0)5 61 40 84 52 Email: leblanc#verilog.fr VERILOG S.A. BP 1310 F-31106 Toulouse Cedex - France http://www.verilogusa.com
Detailed comment about the for loop syntax ------------------------------------------
Compared to the "C for" we think that the <finalization statement> extension and the introduction of local dcls are good things. But then we think that having a list of triples <loop variable indication>, <limit expression> and <step expression> gives minor advantages, and major drawbacks.
The advantages we saw are: - the separation of the role of the variables used in the loop. - the simplification of the step expression. Example: FOR (dcl integer i:=0, i=max, i+1; sum:=0, , sum+Tab[i]) ...
The drawbacks we feel are: - the non usual use of commas and semicolon (for C programmers). Z100 already authorises lists of statements separated with commas in <task body> (Z100 &2.7.1). We could use this existing syntax to make the SDL for loop looking like the C++ for loop. - the implicit OR between the <limit expression>s. If you want to specify a AND between conditions on different loop variables for example, you have to pack the conditions in the <limit expression> of one of the triples, leaving all the other <limit expression>s empty. Exemple: FOR (dcl integer i:=0, (i=maxA) AND (j=maxB), i+1; dcl integer j:=0, , j+1) ... - the implicit assignation of the <loop variable indication> to the <step expression> makes difficult the write of loops where the step is not an assignation. Exemple: a C program may contain a for loop like: for (init_work(); still_work(); look_for_work())... There isn't any loop variables (the procedures init_work() resp. end_work() may initializes, resp. tests several variables), so you can't use <step expression> in the proposed "SDL for".
More generally we think that if the only loop construct is the "for" statement (no "while" statement), it should be the more general possible, ie. without any implicit operation. We think that the "C for" (or "C++ for" as it allows local declarations) reaches this claim. The two SDL examples above may be written in a C++ like syntax:
- FOR (dcl integer i:=0, sum:=0; i=max; sum:=sum+Tab[i], i:=i+1)...
- FOR (dcl integer i:=0, dcl integer j:=0; (i=maxA) AND (j=maxB); i:=i+1, j:=j+1)...
-----End text from Philippe Leblanc <leblanc#tlse.verilog.fr> to sdlnews ----- For help, email "majordomo#sdl-forum.org" with the body of your email as: help or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org
This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT