Compilers, architecture, efficiency, and HR 
Author Message
 Compilers, architecture, efficiency, and HR

Quote:


> >Satisfysing my requests would require nothing of the sort.  I see no
> >reason why I should have to hire a compiler writer for each augmentation.

> You're right, of course.

> Nor can I see a reason why we should endure endless tirades about how
> the all-singing all-dancing Herman Rubin Language Compiler will solve
> the world's problems, when you STILL haven't written ...

>   [wait for it]

>      the SPECIFICATION.

> Give us a spec, and we'll have something to discuss.  Why spend all
> this time yammering about a hypothetical compiler, when that same
> effort expended in spec-writing could produce a REAL IMPLEMENTATION?

I have several times responded to this type of posting in email, and
have not even received clarification of my questions.

1.  I am not quite sure what you mean by a specification.

2.  To the extent that I understand it, I do not think that one
even should be produced.

Now, I do not mean that it is all a mystery.  I will try to clarify the
problem and objectives.  I envision a user as having some things to be
done, which for purposes of discussion we shall call transformations.
There are many ways of producing these transformations by sequences of
operations.  The compiler cannot be expected to know how to do this; the
user must carefully instruct it by the program.  Now this means that the
program may present the compiler with alternatives to assess for speed,
memory requirements, etc.

For convenience, the arguments of these operations may be typed.  The
collection of types is at the user's disposal.  This allows overloaded
operations.  However, it may be convenient to have a few "standard" types.

Next, these operations may be further decomposed into sequences of other
operations, sequences of machine instructions, etc.  The user should have
control over this.  There may be a default set of operations, but the user
should have essentially free rein over operation symbols, etc.  Again, it
is possible that there will be situations in which altenate translation
sequences should be made available to the compiler.

I have not specified a language, but a frame on which to hang a language.
Unlike the present languages, this frame does not declare certain operations,
such as + - * / & | ~ ^ ** << >> as THE primitive operators, but allows free
extension of the notion of primitive operator.  If a user wishes to use [) as
an operator symbol, there is no bar to this.  If the user wishes to deliberately
override types, likewise.  If the user wishes to define an operation in a maner
using assembler instructions, transfer on overflow, etc., which cannot be
conveniently done with the present "portable" primitives, go ahead.

I have given examples of this.  To some extent, this was done by the AUGMENT
preprocessor to handle multiple precision arithmetic, but this was limited.
This essentially unrestricted translation phase can be combined with whatever
optimization techniques are to be further implemented.  Even here, allowing
the compiler to lay out alternatives to the user and get input can be desirable.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054



Tue, 19 Oct 1993 22:14:33 GMT  
 Compilers, architecture, efficiency, and HR

Quote:

> >I have not specified a language, but a frame on which to hang a language.
> >Unlike the present languages, this frame does not declare certain operations,
> >such as + - * / & | ~ ^ ** << >> as THE primitive operators, but allows free
> >extension of the notion of primitive operator.  If a user wishes to use [) as
> >an operator symbol, there is no bar to this.  If the user wishes to deliberately
> >override types, likewise.  If the user wishes to define an operation in a maner
> >using assembler instructions, transfer on overflow, etc., which cannot be
> >conveniently done with the present "portable" primitives, go ahead.
> Sounds vaguely (buzzword alert) object oriented to me.  Except that
> you not only don't want to pay the usual performance penalty of OO
> languages, you want a speed boost over plain C or whatever.  And you
> don't want to write any assembly (although another user might)?

I do not mind using machine operations, but I do not like to write the
vague and confusing, and different for different machines, assembler
symbolism.  On any machine, one of the things I would do is to include
my own notation for the machine operations, and the corresponding translation.

I have no problem whatever in thinking in terms of machine operations where
necessary, and I have no objection to using them.  But we no longer need to
write these operations in a form designed to be easy for the assembler to
parse.

Quote:
> (I'm assuming that this is a modified C.  If you like Ada better,
> replace `C' with `Ada' in the following text...)
> What if you could define new operations
>     example:

>      using either C or assembler  
>         later on you get to write stuff like this:


> Appropriate ifdefs would let you include in the source file several

> assembly languages.  


may be desirable to use primitives which even mess up coding, such as overflow.

Quote:
> You (H. Rubin) would like (I think) to be able to write several
> different but equivalent versions in portable C, and have the compiler
> automagically select the one it can produce the best code for.  This
> sounds like it could be hard.  Perhaps you could include some test
> examples, and the compiler could compile each version and benchmark
> it?
> Am I getting close?

One of the claims of the posters is that compilers can greatly outdo
humans.  They can only outdo humans if they can take into account what
the humans can consider.  This they cannot do without being told.

Now how does a compiler operate now?  It parses the code, translates into
its primitive operators, decides how to make things more efficient, which in
some cases requires consideration of alternatives (Simple example: on the
CDC6600, there were three "standard" methods of putting 0 in an X-register.
These used different functional units, and each functional unit could only
do one thing at a time, and the units were used for other purposes.  So the
compiler would decide which alternative to use.), and then optimize the
resulting hardware instruction code.

This means that the programmer must adequately instruct the compiler on the
possible ways to do things if the compiler is to do well.  Automagic selection
is certainly an important part of optimization.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054



Wed, 20 Oct 1993 06:03:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how can I use a signal defined in one Architecture to another Architecture

2. Architecture of GNAT compiler?

3. Ada compilers for Sun SPARC architecture?

4. Compiler Efficiencies Regarding Embedded Applications

5. Compilers and efficiency

6. Compilers and efficiency

7. IBM Compiler and Library for REXX on zSeries Release 4 increase efficiency and flexibility

8. Compiler efficiency

9. NY: Smalltalk contracts to 100/hr+++

 

 
Powered by phpBB® Forum Software