comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: Engineering types hierarchy
Date: 1999/09/08
Date: 1999-09-08T00:00:00+00:00	[thread overview]
Message-ID: <rtci5if71iv12@corp.supernews.com> (raw)
In-Reply-To: 7r50i7$e893@svlss.lmms.lmco.com

David Kristola <dkristol@see-my.sig> wrote in message
news:7r50i7$e893@svlss.lmms.lmco.com...
> Hello,
>
> I am trying to put together a robust and easily usable
> hierarchy of types packages to support a collection of
> engineering units (kilograms, meters, seconds, etc.)
> in scalar, vector, and matrix forms.
>
> So far, i have a list of the base types and combined
> types (meters per second and so on) that are going to
> be used on this project.
>
> There is an explosion of operators that i have to
> implement.  "/" for meters and second returning
> meters per seconds, and on, and on, and on.
> Of course, there is nothing special about these
> operators beyond the typing they do.

I have free code for dimensioned unit that avoids the combinatorial
explosion, supporting metric units or any other system of measurment.
The URL is http://www.classwide.com/products/freecode.htm, and then look
for "dimensioned units".  It might be useful as a starting point.

One thing to keep in mind is that the overhead of maintaining
dimensionality may not ultimately be acceptable.  In that case a design
allowing you to transparently substitute a different implementation of
the same interface after unit testing might be appropriate. (Such a
change after testing may not be acceptable practice; certainly not in
safety-critical software!)  This other implementation would not maintain
dimensionality and would therefore not have the overhead.  The point is
that the interface needs to be considered up front so that the
substitution works easily.  I make no representation that the code above
provides such an interface -- it might, I just haven't looked at it for
that purpose.

--
Pat Rogers                            Training and Consulting in:
http://www.classwide.com      Deadline Schedulability Analysis
progers@classwide.com       Software Fault Tolerance
(281)648-3165                        Real-Time/OO Languages







  parent reply	other threads:[~1999-09-08  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-08  0:00 Engineering types hierarchy David Kristola
1999-09-08  0:00 ` Marin David Condic
1999-09-09  0:00   ` David Kristola
1999-09-11  0:00     ` Richard D Riehle
1999-09-08  0:00 ` Robert Dewar
1999-09-09  0:00   ` David Kristola
1999-09-09  0:00     ` Robert Dewar
1999-09-10  0:00       ` David Kristola
1999-09-09  0:00     ` Robert Dewar
1999-09-08  0:00 ` Hyman Rosen
1999-09-08  0:00   ` Matthew Heaney
1999-09-08  0:00 ` Pat Rogers [this message]
1999-09-09  0:00   ` David Kristola
1999-09-08  0:00 ` Matthew Heaney
1999-09-09  0:00   ` David Kristola
1999-09-09  0:00 ` David Botton
1999-09-10  0:00   ` David Kristola
1999-09-10  0:00     ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
1999-09-09  0:00 Matthew Heaney
1999-09-09  0:00 ` Matthew Heaney
1999-09-09  0:00   ` Pat Rogers
1999-09-10  0:00   ` David Kristola
replies disabled

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