Re: SDL-News: inheritance: types and instances


Subject: Re: SDL-News: inheritance: types and instances
From: Emil Secerov (secerov#uns.ns.ac.yu)
Date: Mon Aug 16 1999 - 11:09:25 GMT


The originator of this message is responsible for its content.
-----From "Emil Secerov" <secerov#uns.ns.ac.yu> to sdlnews -----

I understood you have four typed entities:

1. Process type P1L ( 1L stands for one light ) that has:
    1.1 input signal Code via gate gpin
    1.2 output signal On via gate gp1out to env.

2. Block type B1L that has:
    2.1 process instance (set) P1:P1L,
    2.2 input signal Code via gate gbin,
    2.3 output signal On via gate GB1OUT to L1,
    2.4 internal signalroutes that connect:
         gbin and gpin and
         gp1out and gb1out.

3. Process type P2L that inherits P1L, adding
    3.1 gate gp2out that conveys signal On to env,
inherited:
    3.A) gp1out is inherited from P1L.

4. Block type B2L that inherits B1L, adding
    4.1 process instance ( set ) P2:P2L
    4.2 gate gb2out that conveys signal On to L2,
    4.3 internal signalroutes that connect:
         <<P2>>gp1out and GB1OUT and
         <<P2>>gp2out and gb2out,
inherited:
    4.A) P1 is inhereted with B1, what means there are two processes in B2L,
P1 and P2. Both of them are connected to the gbin in order to receive Code
signal,
    4.B) GB1OUT is inherited with B1,
    4.C) signalroute <<P1>>gp1out to gb1out is also inhereted.

If my assumptions are correct 4.B is essential. You shouldn't introduce
another gate with name GB1OUT.

Generally speaking I am interested in why are you making double inheritance,
both for process and block.
Process type definition is allowed at system level. You can make B2L from
P2L without inheriting B1L.
Altought not sure, I think you have in any case to redefine process behavior
( P2 from P1 ) in order to make selection of L's.

Sorry if I made wrong assumptions about your system.

Emil

-----Original Message-----
From: Georg Heinrich <georg.heinrich#tzkom.de>
To: sdlnews#sdl-forum.org <sdlnews#sdl-forum.org>
Date: Friday, August 13, 1999 2:40 PM
Subject: SDL-news: inheritance: types and instances

>The originator of this message is responsible for its content.
>-----From Georg Heinrich <georg.heinrich#tzkom.de> to sdlnews -----
>
>Hello,
>
>I am currently learning SDL and came across this problem:
>
>In a system, you have several blocks that switch lights.
>
>in: Code
>out: combination of lights switched on
> ____________
> Code | |
> ----------| blk2Lights |
> |____________|
> | |
> | |
> L1 L2
>
>The blocks in the system have different numbers of lights to switch.
>So I decided to specialize them all from one block type switching only
>one light. This would be no problem if I specialize each of them from
>this base type. But to get the benefits from object-orientation, I
>decided to derive them hierarchically, that means, the block type with
>three lights is specialized from the one with two lights.
>The blocks contain one process that evaluates the Code and switches the
>lights. So in the base type I declare a virtual process type that swit-
>ches on light, in the specialized types I add gates for the additional
>lights to both the block type and to the redefined process type.
>Still no problem.
>As soon as I instantiate the blocks, a process is demanded. So I have to
>insert an instance of the process type in the block type and connect it
>to the gates of the block type.
>That's where the following problem occurs:
>The process instances are also inherited in the specialized block types.
>The first light is connected to the first process in the base type.
>In the block type with the two lights I can connect the instance of the
>redefined block type only to the additional light. If I connect it also
>to the first light I get the error message:
>"Existing gate. Use 'adding'." Or something similar.
>
>Is this a week point in my CASE tool, or does SDL not allow this?
>What kind of problem is this?
>Can it be stated that specialisation in SDL is restricted to a fix
>number
>of gates?
>
>TIA,
>
> G. Heinrich
>
>-----End text from Georg Heinrich <georg.heinrich#tzkom.de> to
sdlnews -----
>Join http://www.sdl-forum.org/Society/members.htm for extra SDL Forum
Society benefits
>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 "Emil Secerov" <secerov#uns.ns.ac.yu> to sdlnews -----
Join http://www.sdl-forum.org/Society/members.htm for extra SDL Forum Society benefits
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