Fw: SDL-News: Request for more flexible initialisation of array!


Subject: Fw: SDL-News: Request for more flexible initialisation of array!
From: Yury Chernov (yury.chernov#ecitele.com)
Date: Mon Dec 01 1997 - 16:30:24 GMT


The originator of this message is responsible for its content.
-----From "Yury Chernov" <yury.chernov#ecitele.com> to sdlnews -----

Dear colleagues.
Andres paid our attention to the index types of arrays. And this is really
the root cause of the initialisation problem. Since indexes can be not
ordered and discrete I don't think there is a proper way to initialise array
during the compilation. Andres' solution being an elegant and generic one,
also can't be implemented at the compilation. So if the formal
initialisation doesn't save real time I don't think it worth using in
embedded and real time systems.

Yury Chernov
ECI Telecom Ltd.
Software Technologies
Tel: 972-3-9268307 Fax: 972-3-9266870

-----Original Message-----
From: Anders Olsen <anders#tdr.dk>
To: sdlnews#sdl-forum.org <sdlnews#sdl-forum.org>
Date: 1 декабря 1997 г. 17:47
Subject: Re: SDL-news: Request for more flexible initialisation of array!

>The originator of this message is responsible for its content.
>-----From anders#tdr.dk (Anders Olsen) to sdlnews -----
>
>Dear SDL colleagues
>There is another problem with arrays that makes it difficult to define
>a constructor in the general case. The problem is that the index type need
not be
>discrete or ordered. For example the integer arrays: Array(Real,Integer),
array(Charstring,Integer),
>Array(Powerset(Integer),Integer) all have non-discrete or non-ordered index
type.
>
>This is more a problem with the nature of the Array generator than with the
underlying
>SDL data model. The problem is that an SDL array resembles more a complete
(i.e. non-partial)
>mathematical mapping than an array as known from programming languages.
>
>But a shorthand notation could easily be introduced for the String
generator, e.g.
>
>(. 1,2,3 .) could be a shorthand for mkString(1) // mkstring(2) //
mkstring(3)
>
>and for Powerset, e.g.
>
>(. 1,2,3 .) could be a shorthand for Incl(Incl(Incl(empty,1),2),3)
>
>But for array, we need to know the index value as well, therefore a
Z.105-like construct
>must be used for the shorthand, e.g.
>
>a value of Array(Charstring,integer) could be
>
>{ 'a' 1,'ab' 2, default 3 } being equivalent to
Modify(Modify(Make(3),'a',1),'ab',2)
>
>In the current data model, all elements of an array are always well-defined
which is why the 'default' value is
>needed. However, this may be relaxed in the future data model.
>
>Regards Anders
>
>-----End text from anders#tdr.dk (Anders Olsen) 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
>

-----End text from "Yury Chernov" <yury.chernov#ecitele.com> 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