comp.lang.ada
 help / color / mirror / Atom feed
* Re: Compiler in its own language (Was: Re: Play 20K expressions again, Sam)
@ 1992-09-10 14:10 MILLS,JOHN M.
  0 siblings, 0 replies; 4+ messages in thread
From: MILLS,JOHN M. @ 1992-09-10 14:10 UTC (permalink / raw)


In article <199209100637.AA13126@cnam.cnam.fr> bortz@CNAM.CNAM.FR writes:
>...
  [ lead-up discussion deleted ]

>IMHO, it is better to write the compiler in the language it compiles,
>whatever is this language. 
>It has several technical benefits:
(1) >- any improvment in the optimizer will optimize the compiler as well,
(2) >- this is the greatest test suite you can dream of: if it can compile
    >an Ada compiler, it will compile everything :-)
>and a commercial one:
(3) >- it states clearly that you trust the language you try to sell.

Without having come _close_ to writing a compiler or interpreter, I have
some very serious reservations about this reasoning.

Programming languages have various ranges of application, strengths and
weaknesses, and tradeoffs of power vs. mastery for effective use.  I
couldn't select only one language to do all types of programming and feel
I had always the best tool.  (Naturally, I think the USDoD's attempt to do
this with Ada forces some poor and expensive design decisions, some of which
were on my projects. .. Sorry, no details.)  C was originally developed to
write operating systems, and its relative simplicity, implementation on
processors from 8080s to Crays (and targeting for an even _broader_ range),
led to its use for a lot of programming, development of C++ and a wide range
of programming support tools, etc.

Just because one needs (for example) a better FORTRAN compiler doesn't imply
the compiler should be written in FORTRAN.  Some BASIC interpreters were
written in [compiled] BASIC, but they were generally not the good ones.

For all I know, Ada may _be_ the best language to write a compiler;  in that
case it should be considered for Pascal compilers, etc.  My plaint is with
the assumption that a single language has the qualities for any and all
applications.

I have seen OOP (in C++) used to provide special operations and data types
needed in DSP programming, allowing DSP code to be written in "near C."
Perhaps OOP will evolve some tool sets with [largely] common user and
programmer interfaces for _whatever_ language is best for the rest of the
program.  That would help both camps, and is probably happening with
windows bindings, as we type.

>I tried to list the languages used by some compilers. (If someone wants
>to complete/correct this list?)
>
>Compiler                 Language
>
>Verdix                   C + now partly in Ada
>Telesoft                 Ada
>Alsys                    Ada
>DEC                      Bliss + Ada (unknown proportions)
>Meridian                 ?
>Ada-Ed, first version    SETL
>Ada-Ed, second version   C
>Systeam                  ?
>GNU Ada                  C, but may be an Ada version (?)
>

Several surveys have compared these various compilers, and I don't
recall any correspondence between user satisfaction and compiler source
language.  Many users (including our team) report satisfaction with the
DEC product, in our case partly because of its close correspondence to
the XDAda for our MC680XX targets.  We also use the RTAda version of the
Telesoft product, and found our development process much more painful
using that package.  Depending on your benchmarks, an otherwise excellent
compiler may be unacceptable:  if you _need_ 100 microsec. interrupts and
the package only turns around in 250, you're stuck!

One size _doesn't_ fit all, even in the same programming language.

Regards --jmm--

-- 
John M. Mills, SRE; Georgia Tech/GTRI/TSDL, Atlanta, GA 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jm59
Internet: jm59@prism.gatech.edu
 "f U cn rd dis, U mst uz Unix!!!"  ...jaw

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

* Re: Compiler in its own language (Was: Re: Play 20K expressions again, Sam)
@ 1992-09-10 15:37 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!lambd
  0 siblings, 0 replies; 4+ messages in thread
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!lambd @ 1992-09-10 15:37 UTC (permalink / raw)


In <67946@hydra.gatech.EDU> jm59@prism.gatech.EDU (MILLS,JOHN M.) writes:

[ deletia- reasons why Ada compilers are best written in Ada ]

>Without having come _close_ to writing a compiler or interpreter, I have
>some very serious reservations about this reasoning.

Fire away! As a former compiler developer, I have some disagreements
with your comments, and I'm sure some of the others will jump in (no,
not you, Ted.)

>Programming languages have various ranges of application, strengths and
>weaknesses, and tradeoffs of power vs. mastery for effective use.  I
>couldn't select only one language to do all types of programming and feel
>I had always the best tool.  (Naturally, I think the USDoD's attempt to do
>this with Ada forces some poor and expensive design decisions, some of which
>were on my projects. .. Sorry, no details.)  C was originally developed to
>write operating systems, and its relative simplicity, implementation on
>processors from 8080s to Crays (and targeting for an even _broader_ range),
>led to its use for a lot of programming, development of C++ and a wide range
>of programming support tools, etc.

>For all I know, Ada may _be_ the best language to write a compiler;  in that
>case it should be considered for Pascal compilers, etc.  My plaint is with
>the assumption that a single language has the qualities for any and all
>applications.

It seems that you have rejected one extreme and adopted the other. I
didn't read Stephane's comments as indicating that Ada was the
language of choice for building _any_ compiler; rather, that writing
an _Ada_ compiler _in Ada_ was a good idea, for the reasons he
specified.

Your argument with that statement seems to turn on the point that C
(with its wide range of host & target machines and "relative
simplicity") is a better language because it's in wider use.

The reasons we liked Ada for ALS/N were the same reasons many other
projects chose Ada: better support for good software engineering
practice. The fact that our project happened to be a compiler also
enabled us to benefit from Stephane's list of benefits.. having a
better test suite than ACVC was certainly to our advantage :)

	[ deletia- list of compilers & their source langauges ]

>Several surveys have compared these various compilers, and I don't
>recall any correspondence between user satisfaction and compiler source
>language.  Many users (including our team) report satisfaction with the
>DEC product, in our case partly because of its close correspondence to
>the XDAda for our MC680XX targets.  We also use the RTAda version of the
>Telesoft product, and found our development process much more painful
>using that package.

As you point out, there are more pieces to a development system than
just the compiler. DEC Ada produces good code, runs fast, and fully
supports interfaces to DEC's other products. Not all other
implementations are as nice, and of course the features which are
important to one application may be unimportant to another.

As has been pointed out hundreds of times here (and elsewhere), you
can write bad code in any language. I won't claim that DEC Ada, or
ALS/N, or any other tool is better because it was written in Ada;
however, I will claim that writing portable, modular, maintainable
implementations of large tools _is_ easier in Ada.

Regards,
-Paul, GT ICS '90
-- 
Paul Robichaux, KD4JZG          | I shouldn't bitch / I shouldn't cry
robichau@lambda.msfc.nasa.gov   | I'd start a revolution but I don't have time.

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

* Re: Compiler in its own language (Was: Re: Play 20K expressions again, Sam)
@ 1992-09-16  7:58 Jacob Baekke-Groome
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Baekke-Groome @ 1992-09-16  7:58 UTC (permalink / raw)


bortz@CNAM.CNAM.FR writes:

>In article <9194@verdix.verdix.com>, brucej@verdix.com (Bruce Jones) writes:
>...
>> Well, our new optimizer is written in Ada.  It turns out that Ada is a
>> great language for writing large programs, the new code is very readable
>> and maintainable.

I can only say that we have had the same reasons for using Ada to write our
Ada compilers.

>- this is the greatest test suite you can dream of: if it can compile
>an Ada compiler, it will compile everything :-)

This is not completely true - our experience is that we do not use all 
facilities in Ada extensively - compilers are basicly sequential processes
so you do not need tasking and interrupt handler etc. 

>I tried to list the languages used by some compilers. (If someone wants
>to complete/correct this list?)

>Compiler                 Language

DDC-I                     Ada
>Verdix                   C + now partly in Ada
>Telesoft                 Ada
>Alsys                    Ada
>DEC                      Bliss + Ada (unknown proportions)
>Meridian                 ?
>Ada-Ed, first version    SETL
>Ada-Ed, second version   C
>Systeam                  ?
>GNU Ada                  C, but may be an Ada version (?)

>-------------

>Stephane Bortzmeyer           Conservatoire National des Arts et Metiers
	
/-----------------------------------------------------------------------\
|Jacob Baekke-Groome                      jab@ddci.dk                   |
|DDC International A/S                                                  |
|Gl. Lundtoftevej 1B                      tel +45 45 87 11 44 x 332     |
|2800 Lyngby                              fax +45 45 87 22 17           |
|DENMARK                                                                |
|To do it with Ada - is better that to C it ;-)                         |
\-----------------------------------------------------------------------/
	

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

* Re: Compiler in its own language (Was: Re: Play 20K expressions again, Sam)
@ 1992-09-16 18:26 Bob Kitzberger
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Kitzberger @ 1992-09-16 18:26 UTC (permalink / raw)


jab@ddci.dk (Jacob Baekke-Groome) writes:

>This is not completely true - our experience is that we do not use all 
>facilities in Ada extensively - compilers are basicly sequential processes
>so you do not need tasking and interrupt handler etc. 

Some compiler vendors write their runtime libraries (including tasking,
board support packages, etc.) in (mainly) Ada.  As such, interrupt handlers,
representation specs, etc. are put through the ringer.

	.Bob.
----------------
Bob Kitzberger          VisiCom Laboratories, Inc.
rlk@visicom.com         10052 Mesa Ridge Court, San Diego CA 92121 USA
                        +1 619 457 2111    FAX +1 619 457 0888

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

end of thread, other threads:[~1992-09-16 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-09-16 18:26 Compiler in its own language (Was: Re: Play 20K expressions again, Sam) Bob Kitzberger
  -- strict thread matches above, loose matches on Subject: below --
1992-09-16  7:58 Jacob Baekke-Groome
1992-09-10 15:37 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!lambd
1992-09-10 14:10 MILLS,JOHN M.

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