SCOUG-Programming Mailing List Archives
Return to [ 07 |
August |
2003 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Lynn H. Maxson wrote:
>
> "...But I don't understand what you've said in the above
> paragraph."
>
> RPN allows you to write parenthesis-free expressions. It
> does so in a manner which minimizes register usage (load
> and store). Thus it produces an optimal code sequence.
Okay, I follow you now. I wrote a PL/I routine many years ago to
convert parenthesized mathematical expressions to RPN, and just a few
years ago I used a similar idea to write a Pascal routine which
evaluated parenthesized Boolean search expressions.
I don't recall ever seeing a proof that the code was optimal, though I
take for granted that it is.
> as one IBM engineer noted the entire stack architecture
> of the Burroughs machine required all of three 7090
> instructions, two of which were "load register" and
> "store register". The third eludes me.
Probably the actual operator, yes?
> Perhaps the best overall description exists in W. H.
> Burge's "Recursive Programming Techniques" in describing
> a SECD machine (Stack, Environment, Control, and Dump).
15-20 years ago I studied up on one manufacturer's RISC offering. (The
processor might have been called a 2700 or 2900.) It had 96 registers
so you wouldn't have to access memory very often.
Then there are the coprocessors that just crunch numbers.
> I might hold out for use of English as a specification
> language. Until then my general reaction is no, no, no
> ... and no. Blair talks about ambiguity. Ambiguity
> itself represents an extension to operator overload.
Aha! Then I _finally_ understand why our elected politicians accomplish
less than a GWBASIC program. After all, they talk an awful lot. In
English.
I still see a benefit in using English, however. Suppose I'm building a
computerized lawnmower and I want to specify the desired grass height:
DCL GrassHeight float
min("crunchy feel")
max( min("water ration","fertilizer burn") );
Betcha had to read that twice! In English it's so simple: Let the
grass grow until it feels crunchy in your bare feet, don't let it get so
long that I exceed the county-imposed water rationing, and don't let it
get so long that the required fertilizer results in burn spots.
- 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 [ 07 |
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.
|