).
Designers and implementers should stop showering us with new descriptive
terms and just say what they're doing. If it's a description table, say
"description table". Dope vector, sheesh, note that I remembered what
it was but sure didn't remember what they called it (thus giving value
to the idea but a fat zero to the name).
> So why not accept the role of a dope vector into which you
> can encode all the rules governing the characteristics and
> behavior of a data variable and its inter-dependencies with
> other data variables?
Why not, indeed? The dope vector was a field-oriented description table
(i.e. go to the xth bit in the yth field and you could find out if the
number was signed or not) but could just as easily have been the
character string of the original type declaration (DCL). The latter is
a *lot* slower to execute since it must be parsed each time the value is
used but the concept is the same. Implementers might want to opt for a
dope vector which includes a pointer to "unusual" elements in the DCL,
for example the named elements of a vector ("dog", "cat", "bird",
"fish").
For an example, the classic code is
Pets[1] = "dog"
Pets[2] = "cat"
Pets[3] = "bird"
Pets[4] = "fish"
PetsCount = 4
and the execution code must look up any supplied input string to see if
there's a match between indexes 1 through 4.
But you should be allowed to say Pets["bird"] and various extensions
such as Zoo[Pets[^bird]] where the Zoo[] vector contains the number of
animals of each kind.
The above example is simple and silly, but when you start to get into
finance and want to keep track of GDP, PerCapitaGDP, DOW, AMEX, Nikkei,
JoblessReport, ConsumerPriceIndex, ProducerPrices and a zillion other
functions there are some good reasons to use named indexes.
> For any given functional code once optimized for speed and
> space why will that not transfer to the code generation
> phase of an HLL implementation? Obviously it can. If you
> do it often enough, eventually you will have exhausted the
> assembly language programmer into submission.
An assembly coder optimizes a particular algorithm. There are zillions
of algorithms. In order for an HLL compiler to optimize that code
you'll have to either a) teach it every single algorithm (i.e. write
everything in assembler anyway and then stick the results into the
compiler in case somebody wants to write the algorithm again some day)
or b) come up with some new compiler optimization techniques.
You haven't discussed implementable compiler optimization techniques.
> It gets a bit more difficult in terms of a complex
> righthand side expression as in
> a = sqrt(b) - arctan(c);
> Here you may want to execute either or both inline or as
> subroutines. Would having "inline" immediately following
> the function expression suffice:
> a = sqrt(b) inline - arctan(c);
Better to optimize the algorithm, Lynn. A mathematician may be able to
reduce the particular expansion sqrt()-arctan() to a simpler
calculation.
Here's a stupid example:
(sin x)^2 + (cos x)^2
The above is optimizable to something much simpler. Should the compiler
be taught to find such things?
> I guess I am too use to PL/I's emphasis on placing the
> programmer's priorities over that of the implementer's.
> It's the job of the implementer to do what the programmer
> wants, not to impose restrictions. It certainly makes
> implementing PL/I compilers a lot harder than the others,
> but it does make the programmer's life easier.
As I recall, the original Level F compiler used 47 passes.
> I don't want the HLL to do any more than it is told to do
> by the programmer except in the most efficient way. If
> the programmer has indicated a function reference, it
> should occur as a subroutine...unless the programmer
> indicates otherwise.
This should be included as part of the strategic direction for your
presentation.
> The goal remains to produce the most efficient code in
> terms of speed and space with the least "programmer"
> effort. I say "programmer" instead of "programming" to
> indicate that I expect the software to do more of the
> programming under the direction of the programmer.
I keep getting a discomforting perception -- that you are intermingling
code generation efficiency with HLL design.
May I suggest an alternative, perhaps more successful, way to approach
this R&D project? _Separately_ develop the desired compiler
optimization techniques and only look for HLL design philosophies in the
results. And, _separately_ develop your HLL design philosophy without
any regard to code optimization.
Then see if they overlap. This isn't a double-blind development yet but
your current direction isn't even single-blind; you've decided what
results you want and are selling the drug before the tests are in and
the FDA has issued an approval.
Cleave it into two beings. Code optimization. HLL development. Don't
make tradeoffs in either arena to try to justify "the other".
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 06 |
August |
2003 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.