comp.lang.ada
 help / color / mirror / Atom feed
From: bevan@cs.man.ac.uk (Stephen J Bevan)
Subject: Re: Types with physical dimension
Date: 05 Oct 1994 10:35:09 GMT
Date: 1994-10-05T10:35:09+00:00	[thread overview]
Message-ID: <BEVAN.94Oct5113509@lemur.cs.man.ac.uk> (raw)
In-Reply-To: rosen@enst.fr's message of 5 Oct 1994 09:38:05 +0100

In article <36tole$j5e@cyclope.enst.fr> rosen@enst.fr (Jean-Pierre Rosen) writes:
     ... I saw this idea in a paper long ago. As far as I recall, it was by
     N. Cohen. Norm, are you listening?

This sounds like the method discussed in [Hilfinger:acm:toplas:1988],
I don't remember if Hilfinger referenced/acknowledged Norman though.
For interested parties, I've also included some references to other
work on adding dimensions to programming languages :-


@article
{ Biedl:acm:sigplan:1977
, author=   "Albrecht Biedl"
, title=    "An Extension of Programming Languages for Clerical
Computation in Science and Engineering With Special Reference to
PASCAL"
, journal=  acm:sigplan
, volume=   12
, number=   4
, pages=    "31--33"
, month=    apr
, year=	    1977
, checked=  19940516
, keywords= "Pascal, dimensional types"
, sjb=      "Proposes an extension to Pascal that allows dimensional
information to be added to declarations."
}


@article
{ Karr:Lovemann:cacm:1978
, author=   "Michael Kaar and Lovemann, III, David B."
, title=    "Incorporation of units into programming languages"
, journal=  cacm
, volume=   21
, number=   5
, pages=    "385--391"
, month=    may
, year=     1978
, keywords= "dimensional types"
, reffrom=  Horning:pc:1978c
, reffrom=  Hilfinger:acm:toplas:1988
}


@article
{ House:bcscj:1983
, author=   "R. T. House"
, title=    "A proposal for an extended form of type checking of expressions"
, journal=  bcscj
, volume=   26
, number=   4
, pages=    "366--374"
, month=    nov
, year=	    1983
, cr=       "8610-0116 (uncomplementary)"
, cr=       "8704-0276 (rebuttal+response)"
, cr=       "8705-0377 by Luca Cardelli - complementary"
, keywords= "dimensional types"
, sjb=      "describes adding physical ``dimensions'' and ``units''
in a strongly typed language (Pascal in used)."
, reffrom=  Hilfinger:acm:toplas:1988
}


@article
{ Gehani:spe:1985
, author=   "N. H. Gehani"
, title=    "Ada's Derived Types and Units of Measure"
, journal=  spe
, volume=   15
, year=     1985
, pages=    "555--569"
, keywords= "Ada, dimensional types"
, reffrom=  Dreiheller:Moerschbacher:Mohr:acm:sigplan:1986
, reffrom=  Hilfinger:acm:toplas:1988
}


@article
{ Manner:acm:sigplan:1986
, author=   "R. M{\"a}nner"
, title=    "Strong Typing and Physical Units"
, journal=  acm:sigplan
, volume=   21
, number=   3
, pages=    "11--20"
, month=    mar
, year=	    1986
, keywords= "dimensional types"
, reffrom=  Dreiheller:Moerschbacher:Mohr:acm:sigplan:1986
}


@article
{ Dreiheller:Moerschbacher:Mohr:acm:sigplan:1986
, author=   "A. Dreiheller and M. Moerschbacher and B. Mohr"
, title=    "Programming Pascal with Physical Units"
, journal=  acm:sigplan
, volume=   21
, number=   12
, pages=    "114--123"
, month=    dec
, year=	    1986
, refs=     7
, checked=  19940617
, source=   "Dept. Library"
, keywords= "Pascal, dimensional types"
, abstract= "In~\cite{Manner:acm:sigplan:1986} (SIGPLAN Notices
3/1986) M\"anner proposes an extension of Pascal permitting the use of
physical units in programs.  We discuss his issues in this paper and
describe our own somewhat different approach.  Our language extension
PHYSCAL of Pascal not merely satisfies the requirements suggested
by~\cite{Manner:acm:sigplan:1986}, but also supports predfined units
(International Standard), thorough realisation of the concept of scale
factors, input/output facilities for number with units.  The new
concepts are motivated, and the language description is given formally
and by examples.  Finally we discuss some details of the realised
language implementation by a PHYSCAL-to-Pascal preprocessor in an UNIX
environment."
}


@article
{ Jones:ddj:pp:1987
, author=   "Do-While Jones"
, title=    "Dimensional Data Types"
, journal=  ddj:pp
, volume=   12
, number=   127
, pages=    "50--54"
, month=    may
, year=     1987
, refs=     3
, checked=  19940513
, keywords= "Ada, dimensional types"
, abstract= "Using dimensional units as data types can facilitate the
writing of clearer, more easily maintained code.  Do-While presents
example programs in Ada."
, xref=     Ludquist:ddj:pp:1987
}


@article
{ Hilfinger:acm:toplas:1988
, author=   "Paul N. Hilfinger"
, title=    "An Ada Package for Dimensional Analysis"
, journal=  acm:toplas
, volume=   10
, number=   2
, pages=    "189--203"
, month=    apr
, year=     1987
, refs=     8
, checked=  19940623
, source=   "Dept. Library"
, keywords= "dimensional analysis, language design, units, dimentional types"
, abstract= "This paper illustrates the use of Ada's abstraction
facilities -- notably, operator overloading and type parameterization
-- to define an oft-requested feature: a way to attribute units of
measure to variables and values.  The definition given allows the
programmer to specify units of measure for variables, constants, and
parameters; checks uses of these entities for dimensional consistency;
allows arithmetic between them, where legal; and provides scale
conversions between commensurate units.  It is not constrained to a
particular system of measurement (such as the metric or English
systems).  Although the definition is in standard Ada and requires
nothing special of the compiler, certain reasonable design choices in
the compiler, discussed here at some length, can make its
implementation particularly efficient."
, sjb=      "Proposes the use of a UNITS package which exports a QUANT
type which encodes the various dimensions and which can be checked at
runtime.  Logically each variable/constant becomes a record with 5
integers representing the dimensions and a single float representing
the scalar value.  It is noted that With a naive compiler, this is
very inefficient!"
}



  reply	other threads:[~1994-10-05 10:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-27 22:18 Types with physical dimension Paul Graham
1994-09-28 13:59 ` Robert Dewar
1994-09-30  2:06   ` R_Tim_Coslet
1994-10-03 17:31 ` Stephen A. Leake
1994-10-04 11:51   ` Robert I. Eachus
1994-10-04 19:45     ` Mark A Biggar
     [not found]       ` <CxBBx8.7L@irvine.com>
1994-10-13 22:15         ` gamache
1994-10-12  3:43     ` Matt Kennel
1994-10-04 14:56   ` Robert Dewar
1994-10-05 14:53     ` Bob Gilbert
1994-10-05  8:38   ` Jean-Pierre Rosen
1994-10-05 10:35     ` Stephen J Bevan [this message]
1994-10-05 13:17       ` Jean-Pierre Rosen
1994-10-05 15:48     ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1994-09-28 10:55 Simtel20 Transfer
1994-09-28 18:56 ` Mark A Biggar
1994-10-04  2:06 ` lmiller
     [not found] <GRAHAM.94Sep27181841@canopus.clsi.com>
1994-09-28 17:36 ` William Brennan
1994-09-28 21:41 ` Tucker Taft
1994-09-29  4:11   ` Robert Dewar
1994-09-29 11:19     ` Peter Hermann
1994-09-30 10:17       ` Dr John Stockton
1994-10-03  4:37       ` Robert Dewar
1994-09-29 13:37     ` Tucker Taft
1994-10-03  4:40       ` Robert Dewar
1994-09-28 19:28 Paul Pukite
replies disabled

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