comp.lang.ada
 help / color / mirror / Atom feed
* Engineering types hierarchy
@ 1999-09-08  0:00 David Kristola
  1999-09-08  0:00 ` Pat Rogers
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: David Kristola @ 1999-09-08  0:00 UTC (permalink / raw)


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.

With a few "use type" statements, coding up algorithms
has been a breeze, and unit problems show up when i
try to compile (kg*m^2 being the same as N*m*s^2 was
only a minor nuisance).

So far, the plan is to set up the hierarchy of child
packages as such:

Numeric_Types
Numeric_Types.Vectors
Numeric_Types.Matrices
Numeric_Types.Quaternions
Numeric_Types.Double
Numeric_Types.Double.Vectors
Numeric_Types.Double.Matrices
Numeric_Types.Double.Quaternions

Is there a better way?

(No, this is not a class project)

Thanks,
--djk, keeper of arcane lore & trivial fluff
Home: David95037 at aol dot com
Work: david dot j dot kristola at lmco dot com
Spam: goto.hades@welovespam.com





^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Engineering types hierarchy
@ 1999-09-09  0:00 Matthew Heaney
  1999-09-09  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 22+ messages in thread
From: Matthew Heaney @ 1999-09-09  0:00 UTC (permalink / raw)


In article <7r7dje$sdi5@svlss.lmms.lmco.com> , dkristol@see-my.sig (David 
Kristola) wrote:

> Does anyone have any pointers to web available sources
> or books that i might check out?

Units of Measure As A Data Attribute
Narain Gehani
Computer Languages, Vol 2, p. 93-111 (1977?)

Incorporation of Units into Programming Languages
Michael Karr and David B. Loveman III
CACM, May 1978, Vol 21, No. 5, p385-391

Ada's Derived Types and Units of Measure
N. H. Gehani
Software-Practice and Experience
Vol 15 (6), p555-569 (June 1985)


Bill Whitaker's Units stuff

The following text documents some of the considerations initially
governing the search for a more powerful units capability.

The problem is to provide an Ada 95 method of specifying SI units.
It has philosophical interest in that the units example was the
one used to illustrate the advantages of strong typing in the early
requirements discussions.  It was unfortunate that the resulting Ada
did not provide a convenient solution.  This was brought up to the
Intermetrics Ada 95 team, but was apparently not "object-oriented"
enough to receive consideration.

<http://users.erols.com/whitaker/iss_418.htm>


You should also search the PAL and the ASE.  Maybe Rick Conn can be of some
assistance here, to help you find examples of what you're looking for.

<http://wuarchive.wustl.edu/languages/ada/pal.html>
<ftp://ftp.cdrom.com/pub/ase/index.htm>
<http://xenadu.home.mindspring.com/>


If you find something good, please post the URL etc to this newsgroup.

Hope this helps some,
Matt




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~1999-09-11  0:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-08  0:00 Engineering types hierarchy David Kristola
1999-09-08  0:00 ` Pat Rogers
1999-09-09  0:00   ` David Kristola
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 ` Matthew Heaney
1999-09-09  0:00   ` 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-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

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