comp.lang.ada
 help / color / mirror / Atom feed
* Question on Ada Expressive Power
@ 2006-01-22  4:22 pnkflyd831
  2006-01-22  9:46 ` Jacob Sparre Andersen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: pnkflyd831 @ 2006-01-22  4:22 UTC (permalink / raw)


 Does anyone have any statistics on the Expressive Power of Ada in
terms of lines of Ada code to lines of Assembly code?  Additional data
would be useful as it affects the usefulness of the statistic, however
limited data is better than none so any contributions would be much
appreciated.  Target platform, compiler used, optimization settings,
would probably be relevant.  Also aspects of the language used: tagged
types, access types, tasks, protected objects, dynamic allocation,
exception handling ect...

I am working with a group to develop this information on a variety of
programming languages and think it would be an interesting statistic.
Depending on the success of our research, and your interest, I will
post results back to the forum.




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

* Re: Question on Ada Expressive Power
  2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
@ 2006-01-22  9:46 ` Jacob Sparre Andersen
  2006-01-22 15:20 ` Bobby D. Bryant
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Jacob Sparre Andersen @ 2006-01-22  9:46 UTC (permalink / raw)


pnkflyd831@gmail.com writes:

> Does anyone have any statistics on the Expressive Power of Ada in
> terms of lines of Ada code to lines of Assembly code?

The GNU/Ada (GNAT) compiler should be able to help you extract this
number given some source code.  IIRC the relevant command line option
is "-S".

You can download the source code for quite a few Ada programs and
libraries, so there's nothing which prevents you from doing the
measurements yourself.

> Additional data would be useful as it affects the usefulness of the
> statistic, however limited data is better than none so any
> contributions would be much appreciated.  Target platform, compiler
> used, optimization settings, would probably be relevant.

With GNU/Ada it would be relatively easy to get numbers for different
optimization settings.  If you design the experiment and announce it
here, you can probably get help with running it on platforms you
haven't got access to yourself.

> Also aspects of the language used: tagged types, access types,
> tasks, protected objects, dynamic allocation, exception handling
> ect...

I would suggest that you download a collection of Ada source files and
classify them according to the various aspects of the language you're
interested in.  The rough classification can probably be done using
some regular expressions (`grep` on POSIX systems).

Greetings,

Jacob
-- 
"Science is like sex: sometimes something useful comes out,
 but that is not the reason we are doing it"
                                          -- Richard Feynman



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

* Re: Question on Ada Expressive Power
  2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
  2006-01-22  9:46 ` Jacob Sparre Andersen
@ 2006-01-22 15:20 ` Bobby D. Bryant
  2006-01-23  3:08   ` adaworks
  2006-01-22 20:51 ` Jeffrey R. Carter
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bobby D. Bryant @ 2006-01-22 15:20 UTC (permalink / raw)


On Sun, 22 Jan 2006, pnkflyd831@gmail.com wrote:

>  Does anyone have any statistics on the Expressive Power of Ada in
> terms of lines of Ada code to lines of Assembly code?  Additional data
> would be useful as it affects the usefulness of the statistic, however
> limited data is better than none so any contributions would be much
> appreciated.  Target platform, compiler used, optimization settings,
> would probably be relevant.  Also aspects of the language used: tagged
> types, access types, tasks, protected objects, dynamic allocation,
> exception handling ect...
> 
> I am working with a group to develop this information on a variety of
> programming languages and think it would be an interesting statistic.
> Depending on the success of our research, and your interest, I will
> post results back to the forum.

Check first to see whether it's a linear relation.  Otherwise the
statistic might be meaningless.

Perhaps you can measure the ratio empirically by compiling some
programs and comparing the LOC of their source files to the size of
their object files.  You would have to avoid static linking and
in-lining, and you might want to avoid programs that specify a lot of
hard-coded data (depending on what you think you're trying to
measure).

You could also make the measurement for several languages with a fair
amount of consistency by using a multi-lingual compiler such as GCC.

However, I suspect the metric is going to tell you more about
programmers' habits than about the expressive power of a language per
se.

-- 
Bobby Bryant
Austin, Texas



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

* Re: Question on Ada Expressive Power
  2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
  2006-01-22  9:46 ` Jacob Sparre Andersen
  2006-01-22 15:20 ` Bobby D. Bryant
@ 2006-01-22 20:51 ` Jeffrey R. Carter
  2006-01-23  1:10 ` Gene
  2006-01-23 10:39 ` Jacob Sparre Andersen
  4 siblings, 0 replies; 10+ messages in thread
From: Jeffrey R. Carter @ 2006-01-22 20:51 UTC (permalink / raw)


pnkflyd831@gmail.com wrote:

>  Does anyone have any statistics on the Expressive Power of Ada in
> terms of lines of Ada code to lines of Assembly code?  Additional data
> would be useful as it affects the usefulness of the statistic, however
> limited data is better than none so any contributions would be much
> appreciated.  Target platform, compiler used, optimization settings,
> would probably be relevant.  Also aspects of the language used: tagged
> types, access types, tasks, protected objects, dynamic allocation,
> exception handling ect...

Capers Jones collected information on the average LOC per function point for a 
variety of languages. I don't know if that will help you. See

http://www.theadvisors.com/langcomparison.htm

Assembler (basic): 320, Ada: 49.

-- 
Jeff Carter
"It's symbolic of his struggle against reality."
Monty Python's Life of Brian
78



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

* Re: Question on Ada Expressive Power
  2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
                   ` (2 preceding siblings ...)
  2006-01-22 20:51 ` Jeffrey R. Carter
@ 2006-01-23  1:10 ` Gene
  2006-01-23 13:11   ` adaworks
  2006-01-23 10:39 ` Jacob Sparre Andersen
  4 siblings, 1 reply; 10+ messages in thread
From: Gene @ 2006-01-23  1:10 UTC (permalink / raw)


I wonder why this would be interesting in other than an artisitic or
academic way.  The most "expressively powerful" language ever by your
metric is probably APL.  It's legandary for its "write only" character
and no longer in common use because most programs need to be read.

Haiku is expressively powerful, but one doesn't use it for general
purpose communication...

An additional difficulty is that even if you settle on a single target
machine, compiler back end quality will affect the denominator by a
factor of 2 or more, not to mention differences in the roles of runtime
libraries.




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

* Re: Question on Ada Expressive Power
  2006-01-22 15:20 ` Bobby D. Bryant
@ 2006-01-23  3:08   ` adaworks
  2006-01-23  5:47     ` Larry Kilgallen
  0 siblings, 1 reply; 10+ messages in thread
From: adaworks @ 2006-01-23  3:08 UTC (permalink / raw)



"Bobby D. Bryant" <bdbryant@mail.utexas.edu> wrote in message
news:dr07sk$3ms$1@geraldo.cc.utexas.edu...
> On Sun, 22 Jan 2006, pnkflyd831@gmail.com wrote:
>
> Check first to see whether it's a linear relation.  Otherwise the
> statistic might be meaningless.
>
That is important advice. Remember that Ada programs almost
always have a run-time under them.  This could be construed as
ovehead for small programs, but essential for larger programs.

Most other languages do not have this feature.

Richard





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

* Re: Question on Ada Expressive Power
  2006-01-23  3:08   ` adaworks
@ 2006-01-23  5:47     ` Larry Kilgallen
  0 siblings, 0 replies; 10+ messages in thread
From: Larry Kilgallen @ 2006-01-23  5:47 UTC (permalink / raw)


In article <BMXAf.14741$Jd.12500@newssvr25.news.prodigy.net>, <adaworks@sbcglobal.net> writes:

> That is important advice. Remember that Ada programs almost
> always have a run-time under them.  This could be construed as
> ovehead for small programs, but essential for larger programs.
> 
> Most other languages do not have this feature.

Certainly on VMS a runtime library is almost always present for
programs written in PL/I, Pascal, Fortran, C, C++ and Basic,
as well as Ada.



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

* Re: Question on Ada Expressive Power
  2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
                   ` (3 preceding siblings ...)
  2006-01-23  1:10 ` Gene
@ 2006-01-23 10:39 ` Jacob Sparre Andersen
  4 siblings, 0 replies; 10+ messages in thread
From: Jacob Sparre Andersen @ 2006-01-23 10:39 UTC (permalink / raw)


pnkflyd831@gmail.com writes:

> Does anyone have any statistics on the Expressive Power of Ada in
> terms of lines of Ada code to lines of Assembly code?

This is of course one possible measure of expressive power, but I am
tempted to claim that it is a very incomplete measyre of expressive
power.  Isn't the ability to express that something doesn't have to be
done to get the result even more valuable, than the ability to express
that it has to be done, even if it really doesn't?  I am specifically
thinking of implicit and explicit range checks, but there may be other
similar cases.  Or is this really covered by the a simple
source-to-assembly line ratio?

Greetings,

Jacob
-- 
�Verbing weirds language.�                         -- Calvin



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

* Re: Question on Ada Expressive Power
  2006-01-23  1:10 ` Gene
@ 2006-01-23 13:11   ` adaworks
  2006-01-23 20:06     ` Jeffrey R. Carter
  0 siblings, 1 reply; 10+ messages in thread
From: adaworks @ 2006-01-23 13:11 UTC (permalink / raw)



"Gene" <gene.ressler@gmail.com> wrote in message
news:1137978607.032607.315500@g43g2000cwa.googlegroups.com...
>
>  Haiku is expressively powerful, but one doesn't use it for general
> purpose communication...
>
I wrote about this in an article for Crosstalk a few years ago.  Others
have discussed it, I think, but I don't have other references.

There is a difference between expressiveness and expressibility.  We can
typically express the solution to any programming problem in any programming
language.   Some languages are directly expressive of certain kinds of
problems.  Others can be splicktled into service for expressing those
same problems.

For a long time, COBOL was horrible at expressing mathematical
functions such as Square root, but we could laboriously write long
obscure routines of our own to do that function.   C++ has a handy
little compound assignment statement that is quite expressive, but we
can get the same effect, though with longer statements, using almost
any other language.  Perl is expressive of regular expressions, but we
have a regular expressions package in Ada that helps.

Expressiveness, in computer programming, is the ease with which a
given language allows us to map the problem space to the solution
space.  It has nothing to do with the number of lines of executable
code are created.   Expressibility means that, regardless of how
expressive a language might be, we can always find a way, albeit
a difficult way, to finally solve the problem.

As to the Haiku example, in software we are concerned with reducing
ambiguity through expressiveness.   In poetry (seem William Empson's
"Seven Types of Ambiguity") we place value on ambiguity.  In art, we
want to allow for variations of interpretation.   Such variations are not
so highly valued in engineering - including software engineering.

Richard Riehle





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

* Re: Question on Ada Expressive Power
  2006-01-23 13:11   ` adaworks
@ 2006-01-23 20:06     ` Jeffrey R. Carter
  0 siblings, 0 replies; 10+ messages in thread
From: Jeffrey R. Carter @ 2006-01-23 20:06 UTC (permalink / raw)


adaworks@sbcglobal.net wrote:
> 
> Expressiveness, in computer programming, is the ease with which a
> given language allows us to map the problem space to the solution
> space.

Or, for Ada, the ease of modeling the problem space using the language.

-- 
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty Python & the Holy Grail
06



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

end of thread, other threads:[~2006-01-23 20:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-22  4:22 Question on Ada Expressive Power pnkflyd831
2006-01-22  9:46 ` Jacob Sparre Andersen
2006-01-22 15:20 ` Bobby D. Bryant
2006-01-23  3:08   ` adaworks
2006-01-23  5:47     ` Larry Kilgallen
2006-01-22 20:51 ` Jeffrey R. Carter
2006-01-23  1:10 ` Gene
2006-01-23 13:11   ` adaworks
2006-01-23 20:06     ` Jeffrey R. Carter
2006-01-23 10:39 ` Jacob Sparre Andersen

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