From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a8d137db7a5f6c81 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: OO problem: Performing actions on messages (very long, sorry) Date: Mon, 10 Jan 2005 20:09:10 +0100 Organization: cbb software GmbH Message-ID: <134hnvhae7686.1szfdwww8y92r$.dlg@40tude.net> References: <1103723394.299024.314670@c13g2000cwb.googlegroups.com> <13465377.hrn0RlrJV7@linux1.krischik.com> <1103737351.196460.85450@f14g2000cwb.googlegroups.com> <1qdvdjid4u58v.1xz6j5ec6nfcy$.dlg@40tude.net> <1104755823.837077.74630@z14g2000cwz.googlegroups.com> <8oknh024yb43$.71qlyp6g8y2x$.dlg@40tude.net> <1104840326.160879.132400@c13g2000cwb.googlegroups.com> <1ogeykubpns90.2jnblmdu1wg2.dlg@40tude.net> <1104852099.054703.265080@f14g2000cwb.googlegroups.com> <1104926478.797780.7830@c13g2000cwb.googlegroups.com> <1odpvi9429wrb.r854wtzbr1qm$.dlg@40tude.net> <1104940745.420814.235130@f14g2000cwb.googlegroups.com> <1rall0nftkcsj$.1e5jj6uwwwezc.dlg@40tude.net> <1105346564.204857.53640@c13g2000cwb.googlegroups.com> <1gsktm8wimsc$.1o2yngarlww9s$.dlg@40tude.net> <1105374271.190657.191560@f14g2000cwb.googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net M/gbXFQGcc18jCCWlu/JlQ5XUfrbvsAAF0QTkPKIY6/rbVVFE= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:7615 Date: 2005-01-10T20:09:10+01:00 List-Id: On 10 Jan 2005 08:24:31 -0800, per wrote: >>>>How do you plan to maintain data consistency of a message if the user may >>>>arbitrarily override its fields? I would try to do it more OO. To think >> >>> Well, that's the user's problem. Or rather, that's the point, sort of. >>> See, this is a test equipment and shall enable modification of messages >>> in "any" way in order to test how the test object (a computer) reacts. >> >>The reaction could be "Access violation" (:-)) It is utterly untyped, or >>non-OO, I should say. So it looks not very promising to to solve it using >>OO. I still have an impression that you should return back to domain >>analysis and find better objects than mysterious actions and messages. At >>least there should be no place for the word "any". > > Hehe, you never give up, do you? ;) Almost (:-)) > OK, "any way" = any way the message can be modified in: > > If M1.A is an Integer, then the user shall be able to put any Integer > in M1.A (at a specified time in the message M1 that happen to exist at > that time). But "to put something into" cannot be considered as an operation of something more complex than just an untyped container. This is a weakness of your analysis. If message is more than a chunk of raw memory then "to put" is an implementation of something more meaningful than just copy from one memory location to another. Once you factor out that semantics you will probably be able to get rid of public components A, B, C etc. > A Message is a record and an Action is a way to manipulate the Message. > Not very mysterious to me. So replace it with: Message is a type Action is an operation on it. Scheduled item is a task calling operations of a message. >>> How would you create a schedule of actions before any messages exist? >>> (Schedule = Plan of what actions should be taken to what type of >>> messages and when, created *before* any message instances exist) >> >>So you schedule actions on something that even does not exist. It is a bit >>strange. Normally scheduling depends on some state of *existing* scheduled >>items. > > I disagree. All message *types* are known. But scheduling items are instances not types. Instances are unknown. > The message *instances* > flows through the system (having the time of their life so to speak;). > Some of them untouched, and some of them manipulated in a predefined > way. An action is that predefined way. And a bunch of actions > programmed to occur at certain times constitutes an action schedule. OK, why that bunch of actions cannot be just a piece of code in a task? Are you writing an interpreter? >>Probably this unconventional use of terms message and action is the >>source of the misunderstanding. Aren't messages used to invoke actions? >>Aren't scheduled actions invoked by messages from a scheduler? > > No, my messages and actions do not have that relationship. (I see no > absolute semantic in the terms Action and Message, that's why I've > tried to explain what they mean in this system.) > > Actions are invoked from a scheduler. The actions are performed on the > instances that happen to exist (at the time each action is activated > and if there is an action for that message type). > > Messages then go to different devices an mean whatever they are > supposed to these devices. The actions just do stuff with the messages > before they (the messages) are passed on. Shouldn't messages be formed rather in terms of device semantics? And why should they exist before being sent to the devices? Is it a kind of premature memory optimization? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de