comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Writing an Operating System in Ada
Date: Mon, 18 Jan 2010 17:41:41 +0100
Date: 2010-01-18T17:41:41+01:00	[thread overview]
Message-ID: <esvs2s4t7trf.bc6xq97j2lgm.dlg@40tude.net> (raw)
In-Reply-To: 4b547c92$0$6565$9b4e6d93@newsspool4.arcor-online.net

On Mon, 18 Jan 2010 16:21:53 +0100, Georg Bauhaus wrote:

> Dmitry A. Kazakov schrieb:
>> On Mon, 18 Jan 2010 12:23:23 +0100, Georg Bauhaus wrote:
>> 
>>> (3) adding subs to T to accomodate specified processing needs
>>>     of another, later program? How?
>> 
>> By conversion of the object to another type:
>> 
>>    X : Integer;
>>    Y : Float := Float (X); -- Now we have sin, cos etc
> 
> This conversion of a (then) persistent Integer object
> to a Float object is possible because either type is known
> (and can be named).

You cannot have object of an unknown type.

> The meaning of conversion from Integer
> to Float is language defined, too.

Type-defined. Conversion of concrete types is a doubly-dispatching
primitive operation. Ada 83 didn't have dispatching operations and MD is
still 

> What a persistent O-O storage would have to offer is something
> in addition.
> 
> In Toulouse:
> 
>   X : Private_Type_A;
> begin
>   OO_Store.Put(X);
> end;

Put (OO_Store, "Some name", X);

I prefer this notation, because this operation also is doubly-dispatching.
 
> Then, where Identity is an identifier, or the object, or
> a handle, or a filename, or ...:
> 
> Pass(Identity(X), From => Toulouse, To => Hamburg);

Rather:

Put (OO_Store, Locate ("Hamburg") & "Some name", X);

you do not need to pass anything. Store it where it belongs to. The main
idea is that imperative I/O is normally not needed. "Pass" is disguised
I/O.

> In Hamburg:
> 
>   Y : Private_Type_B;
> begin
>   OO_Store.Get(Y [, <from the identity>]);
> 
> How is Hamburg enabled to learn what Toulouse.Private_Type_A
> is with the persistence layer functioning as the only source of
> information about the object?

In this case from some information outside:

   Y : Interested_In'Class := Get (OO_Store, "Some name");

> Which operations does it support?

Of the class. When you create Y in your program you know what you are going
to do with it. That is described by Interested_In. This is no different
from knowing its name "Some name". This is a-priori knowledge. For example,
a compiler expects an Ada source file.

> What kind of conversions are possible, what granularity of
> access to the object's innards might be needed to reify
> the interface of Hamburg.Private_Type_B?

There is a common ancestor for both types. What you probably had in mind
was a conversion is between types from independent hierarchies rooted on
different hosts. That normally should not be needed.

To me the problem rather is in passing the concrete type of Y, which the
program will never have to learn, but the run-time must. It will modify the
dispatching tables, take the implementations of overridden operations in
the form of some byte code (?) etc.

>> IMO the real challenge (apart from consistent
>> implementations of MI and MD) are dynamic types marshaled between the parts
>> of a distributed system. I didn't think much about that, so don't expect me
>> to answer how that should be solved. Probably others might have some
>> insights...
> 
> I guess this challenge is what some here had hoped to learn
> about. You sounded like you knew the solution :-)

I am sorry, then. There are hundreds of well paid people sitting in
universities studying and teaching OS'es and distributed systems. Why are
you asking me? Ask Andy Tannenbaum! (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2010-01-18 16:41 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12  1:13 Writing an Operating System in Ada Shark8
2010-01-12  3:30 ` Leslie
2010-01-12  7:06   ` Shark8
2010-01-12  8:36     ` Ludovic Brenta
2010-01-12 15:14       ` jonathan
2010-01-12 16:21   ` Colin Paul Gloster
2010-01-12 16:36     ` Shark8
2010-01-12 17:03       ` Colin Paul Gloster
2010-01-12 19:07     ` Tero Koskinen
2010-01-12  9:41 ` Dmitry A. Kazakov
2010-01-12 17:37   ` Shark8
2010-01-12 19:56     ` Dmitry A. Kazakov
2010-01-12 21:21       ` Shark8
2010-01-12 22:39         ` nobody
2010-01-12 22:50           ` Shark8
2010-01-15 22:45             ` nobody
2010-01-19 21:09               ` Shark8
2010-01-12 21:52       ` Maciej Sobczak
2010-01-12 23:26         ` Shark8
2010-01-13  9:17         ` Dmitry A. Kazakov
2010-01-13 20:20           ` Shark8
2010-01-13 20:55             ` Dmitry A. Kazakov
2010-01-13 22:50               ` Shark8
2010-01-14  8:55                 ` Dmitry A. Kazakov
2010-01-14 18:01                   ` Shark8
2010-01-14 19:04                     ` tmoran
2010-01-19 19:07                       ` Shark8
2010-01-14 19:53                     ` Dmitry A. Kazakov
2010-01-14 21:07                       ` Shark8
2010-01-14 21:50                         ` Dmitry A. Kazakov
2010-01-15  1:24                           ` Randy Brukardt
2010-01-15  8:59                             ` Dmitry A. Kazakov
2010-01-19 18:58                   ` Shark8
2010-01-19 19:43                     ` Dmitry A. Kazakov
2010-01-14  9:40           ` Maciej Sobczak
2010-01-14 10:28             ` Dmitry A. Kazakov
2010-01-14 18:57               ` tmoran
2010-01-14 19:19                 ` Dmitry A. Kazakov
2010-01-14 20:33                   ` Georg Bauhaus
2010-01-14 21:09                     ` Dmitry A. Kazakov
2010-01-14 21:50               ` Maciej Sobczak
2010-01-15  8:37                 ` Dmitry A. Kazakov
2010-01-15 21:05                   ` Maciej Sobczak
2010-01-15 21:48                     ` Dmitry A. Kazakov
2010-01-16 21:18                       ` Maciej Sobczak
2010-01-16 22:15                         ` Dmitry A. Kazakov
2010-01-18 11:23                           ` Georg Bauhaus
2010-01-18 13:50                             ` Dmitry A. Kazakov
2010-01-18 15:21                               ` Georg Bauhaus
2010-01-18 16:41                                 ` Dmitry A. Kazakov [this message]
2010-01-18 17:17                                   ` Georg Bauhaus
2010-01-18 18:08                                     ` Dmitry A. Kazakov
2010-01-19 17:41         ` Writing an Operating System in Ada - now off topic? Leslie
2010-01-13  9:09       ` Writing an Operating System in Ada Georg Bauhaus
2010-01-13  9:27         ` Dmitry A. Kazakov
2010-01-13  3:38     ` Leslie
2010-01-13 12:10       ` Martin
2010-01-13 18:55       ` Ad Buijsen
2010-01-14  9:12       ` Jean-Pierre Rosen
2010-01-14 10:45         ` Dmitry A. Kazakov
2010-01-14 11:31           ` Jean-Pierre Rosen
2010-01-14 13:47             ` Dmitry A. Kazakov
2010-01-14 18:57         ` tmoran
2010-01-13  4:49   ` Hibou57 (Yannick Duchêne)
2010-01-13 17:29 ` Lucretia
2010-01-13 20:37   ` Shark8
2010-01-16  0:13     ` Lucretia
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox