Subject: Re: SDL-News: Pure virtuality in SDL
From: yves Lejeune (lejeune#tlse.verilog.fr )
Date: Thu Dec 10 1998 - 09:44:51 GMT
The originator of this message is responsible for its content.
-----From lejeune#tlse.verilog.fr (yves Lejeune) to sdlnews -----
> Does the language provide a mechanism to declare a virtual object
> (structure type, transition, procedure, etc.) as PURILY virtual ?
> The aim is, just as in C++ for example, to FORCE the users of my
> specification to redefine the object.
> In addition, this would prevent users from instantiating a block-type
> which is not supposed to be instanciated.
> Fabrice Dubois.
You can not declare PURILY virtual objects, but there are several ways to FORCE
the users to redefine an object. It is not elegant, but it works :
- for a process type or a procedure, you can omit the start transition,
so that is will not be possible to make instances of them
(this is detected at compilation time). You will probably put a comment
about what is supposed to be the start state, and an initialisation procedure
to be called by the start transition of the subtype.
- for a transition you can use the "error" term to make it impossible
to execute the transition. This is less satisfying as the error will only
appear at execution time.
- for a block type it is less obvious. Mayby one can omit a signalroute
or omit a signal in a signalroute, which makes the instanciation
150, rue Nicolas Vauquelin - BP 1310
31106 Toulouse Cedex - France
Tel : +33 5 61 19 29 39
Fax : +33 5 61 40 84 52
e-mail : lejeune#verilog.fr
-----End text from lejeune#tlse.verilog.fr (yves Lejeune) to sdlnews -----
For help, email "majordomo#sdl-forum.org" with the body of your email as:
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