comp.lang.ada
 help / color / mirror / Atom feed
From: "Ludovic Brenta" <ludovic@ludovic-brenta.org>
Subject: Re: procedural vs object oriented
Date: 27 Apr 2006 08:17:25 -0700
Date: 2006-04-27T08:17:25-07:00	[thread overview]
Message-ID: <1146151045.783087.16330@y43g2000cwc.googlegroups.com> (raw)
In-Reply-To: <4450D433.4010708@mailinator.com>

Alex R. Mosteo writes:
> Ludovic Brenta wrote:
>> But with compiler-provided dynamic dispatching, there *is* uncertainty
>> as to how dispatching works and what the targets are.
>
> This is something I'm not getting in this discussion. Provided that you
> know all derived classes, you know all possible dispatchings and you can
> validate all for correctness and time the worst one. How's this
> different than evaluating all branches in a case?
>
> It's true that you don't have the information at the calling point, but
> you have it elsewhere.

The issue is not whether or not you *can* validate dispatching calls;
of course you can. The issue is *how much it costs* to do so. (This
same argument is also why we use Ada instead of C or handwritten
assembly).

As you said, the list of all possible call targets is not present at
the call site, but spread across the entire program source.  You'd have
to gather the list of all possible targets for each dispatching call,
and review the dispatching machine code *at every call site*. Try to do
that on the software you're currently writing. The first step would be
for you to come up with a list of all dispatching (not static) calls in
your program. If you do just that, you will then start to realise how
much effort would be required for full-fledged certification.

Furthermore, during maintenance, more possible call targets can appear,
affecting previously tested and certified call sites, and requiring you
to redo the certification process each time you add a type to a
derivation class.

In general-purpose programming, you can use all the features of the
language that help you write your source code faster; in avionics, you
only use those that help you certify your machine code faster. It
matters more to reduce the cost of certification than the cost of
writing the software, because the former far outweighs the latter.

-- 
Ludovic Brenta.




  reply	other threads:[~2006-04-27 15:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26  8:16 procedural vs object oriented Ananth the Boss
2006-04-26  9:17 ` Jean-Pierre Rosen
2006-04-26 17:44   ` Jeffrey R. Carter
2006-04-26 12:52 ` Dmitry A. Kazakov
2006-04-27  1:33 ` bh
2006-04-27  5:22   ` Ludovic Brenta
2006-04-27  7:36     ` Dmitry A. Kazakov
2006-04-27 10:42       ` Ludovic Brenta
2006-04-27 11:07         ` Maciej Sobczak
2006-04-27 12:03           ` Ludovic Brenta
2006-04-27 17:19           ` Pascal Obry
2006-04-27 15:51             ` Georg Bauhaus
2006-04-27 12:45         ` Dmitry A. Kazakov
2006-04-27 13:20           ` Ludovic Brenta
2006-04-27 14:24             ` Alex R. Mosteo
2006-04-27 15:17               ` Ludovic Brenta [this message]
2006-04-27 16:11                 ` Alex R. Mosteo
2006-04-27 20:19                   ` Ludovic Brenta
2006-04-27 14:01           ` Jean-Pierre Rosen
2006-04-28  7:46             ` Dmitry A. Kazakov
2006-04-27 15:38     ` Peter Amey
2006-04-27 20:20       ` Ludovic Brenta
2006-04-27  6:55 ` Ananth the Boss
replies disabled

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