comp.lang.ada
 help / color / mirror / Atom feed
* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
  1996-06-28  0:00 ` Robert Dewar
  1996-06-28  0:00 ` Robert A Duff
@ 1996-06-28  0:00 ` Ray Blaak
  1996-06-28  0:00   ` Robert Dewar
  1996-07-01  0:00   ` Michael Feldman
  1996-06-29  0:00 ` Tucker Taft
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 26+ messages in thread
From: Ray Blaak @ 1996-06-28  0:00 UTC (permalink / raw)


erkodjk@aol.com (ErkoDJK) writes:

>Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
>targeted for the Macintosh computer (without requiring Unix, like
>GNAT/GCC).  

Are you sure that GNAT requires UNIX? After all, its been ported to VMS and
DOS. Change your project to that of porting GNAT, and most of your work is
done.

Cheers,
Ray Blaak
blaak@mda.ca





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

* Re: Building an Ada compiler
  1996-06-28  0:00 ` Robert A Duff
  1996-06-28  0:00   ` Robert Dewar
  1996-06-28  0:00   ` Raul Barral Tamayo
@ 1996-06-28  0:00   ` Ruediger Berlich
  1996-06-29  0:00     ` Robert A Duff
  1996-07-04  0:00     ` Jens Hansson
  2 siblings, 2 replies; 26+ messages in thread
From: Ruediger Berlich @ 1996-06-28  0:00 UTC (permalink / raw)


Hi,
if writing an Ada-Compiler is that much of a problem, then,
how difficult is it to write an Ada95-Interpreter ?
I think of something one can plug into the code as a call to 
the interpreter, where the interpeter knows anything about the 
variables and objects defined at the calling-point of the 
interpreter and is able to call all functions etc. that are accessible at
the calling point. So one could do 'on the fly'-development of programs
(e.g. provide a frame for the program which is linked with all necessary 
libraries and then write the code that is needed while the program is 
running.). O.k., maybe that is an illusion. But a nice one.
Bye and have a nice day, Ruediger
[berlich@pc66.mppmu.mpg.de]




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

* Re: Building an Ada compiler
  1996-06-28  0:00 ` Robert A Duff
  1996-06-28  0:00   ` Robert Dewar
@ 1996-06-28  0:00   ` Raul Barral Tamayo
  1996-06-28  0:00     ` Robert Dewar
  1996-06-30  0:00     ` Gary McKee
  1996-06-28  0:00   ` Ruediger Berlich
  2 siblings, 2 replies; 26+ messages in thread
From: Raul Barral Tamayo @ 1996-06-28  0:00 UTC (permalink / raw)



  Only a a couple of words :-), the idea behind GCC is a portable compiler
 with the only need to change the front-end to incorporate a new language
 and the back-end to add a new architecture so I think you could use the 
 GNAT front-end and you could make a Mac back-end, about this last I have
 only heard about a language to describe it something similar to lex/yacc.

 My 0.02$, raul.

In article <Dtppz2.4DM@world.std.com> bobduff@world.std.com (Robert A Duff) writes:
   In article <4r023h$jt2@newsbf02.news.aol.com>, ErkoDJK <erkodjk@aol.com> wrote:
   >Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
   >targeted for the Macintosh computer (without requiring Unix, like
   >GNAT/GCC).  To that end, I would like to ask the Ada and compiler experts
   >here (and anyone else who wishes to respond) for some information,
   >including, just how insane are we?




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

* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
@ 1996-06-28  0:00 ` Robert Dewar
  1996-06-28  0:00 ` Robert A Duff
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 26+ messages in thread
From: Robert Dewar @ 1996-06-28  0:00 UTC (permalink / raw)


David said

>Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
>targeted for the Macintosh computer (without requiring Unix, like
>GNAT/GCC).  To that end, I would like to ask the Ada and compiler experts
>here (and anyone else who wishes to respond) for some information,
>including, just how insane are we?

  If you are proposing to build a complete Ada 95 compiler, then if you
  have an appropriate group of experienced compiler experts, a typical
  estimate is in the range of 20-50 person years of work (much more than
  that has gone into the GNAT compiler if you include the whole compiler).
  Since below you say that none of you are compiler experts, likely you
  are not proposing such a project (or if you are, perhaps insane might
  be an appropriate adjective :-)

  What might make sense is to start with GNAT and modify it to run under
  E.T.O. rather than under Unix. The point is that you can't build a
  compiler that runs directly on System-7, certainly not if it is based
  on GNAT, and in general some kind of command line interface is really
  needed for a usable compiler.

  For the GNAT/Mac project we considered the alternatives. We required a
  command line processor that could co-exist with System-7, so that ruled
  out, for example, the new MkLinux port. Certainly MPW and its successor
  ETO is a possible choice, but we preferred Macten for the following
  reasons:

     Machten will be much easier to obtain. Tenon is planning a low cost
     CD ROM that will contain a vesion of Machten sufficient to fully
     support GNAT along with GNAT itself.

     Tenon is actively supporting the effort and working closely with us
     in providing support, such as threads support for the Ada tasking.

     More people are familiar with Unix as a basis for a command line
     environment than MPW or ETO.

     A far richer set of tools is available under the Unix environment
     than under MPW or ETO.

>Self-effacing humor aside, just how big a project is an Ada 95 compiler?
>Those of us planning to work on this project are all Ada software
>engineers with at least seven years of experience, but none of us are
>compiler experts.  I am a pessimist, and feel that the project size
>estimates my friends have come up with are low.  Historical data from
>other projects would be helpful.

>What sources are available to help such an endeavor (other then the AdaIC,
>and Apple)?

   I do not think either AdaIC or Apple will be much help, but the sources
   of the Macten GNAT port will be a very good starting point for such a
   project, and the first step should be to get hold of Machten, and get
   to the point where you can build the current Mac port from sources.
   We can provide a little help for such a project but not much, on the
   other hand, many people have succeeded in porting GNAT to all sorts
   of platforms without much help, and an ETO/Mac port does not seem a
   particularly difficult one, given that you have a good start (which
   for example takes care of most architectural problems).

>How much interest is there for an Ada 95 compiler for the Macintosh that
>does not require Unix (It will initially work under E.T.O., the MPW
>replacement)?  This seems to be a neglected market.  The GNAT-Mac project
>(which requires MachTen, a well-regarded Unix), and the outdated Meridian
>Ada compiler (now in Rational's hands), are the only Macintosh Ada
>compilers I am aware of.

   I note the "initially" here, so perhaps you have in mind producing a
   version that works completely within the System-7 framework. Such a
   system, using e.g. drag-and-drop for compiling, would not be usable
   for large projects, but would be fine for small educational use.
   However, that's a much bigger change.

   Bottom line is that if you rethink your project in terms of a port of
   GNAT, rather than building a new Ada 95 compiler from scratch, then it
   is quite practical, and certainly of interest, since it is good to see
   GNAT ported to as many different operating system environments as
   possible (after all there are nine different ports on the IBM PC, so
   we can certainly have more than one on the Mac).

   One of the nice things about free software, which really means
   freely-available software is precisely that you do not have to
   reinvent the wheel to start a project like this!

Robert Dewar

P.S. the we in the above is the GNAT MAC project, which is ACT, Tenon,
and the folks at McKee consulting working together, see our home page
for further details. 

P.P.S. The total magnitude of the GNAT MAC project is 2-3 person years
of work, partially funded by an AJPO ATIP grant, but of course you would
be able to borrow a lot of this work in your ETO project. On the other
hand this is 2-3 person years from people with a LOT of experience with
GNAT -- it all comes down to exactly what you aim for. The distance
from something that works reasonably to a polished product can be a 
very long one, and for the Machten product, we are definitely trying
for a polished product.





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

* Re: Building an Ada compiler
  1996-06-28  0:00 ` Robert A Duff
@ 1996-06-28  0:00   ` Robert Dewar
  1996-06-28  0:00   ` Raul Barral Tamayo
  1996-06-28  0:00   ` Ruediger Berlich
  2 siblings, 0 replies; 26+ messages in thread
From: Robert Dewar @ 1996-06-28  0:00 UTC (permalink / raw)


Bob asked:

"Anybody remember who said this (in regard to hand-made telescope
mirrors)?  It's easier to make a 3-inch mirror and a 5-inch mirror, than
to make a 5-inch mirror."

I know this as referencing 6" and 8", which makes a whole lot more sense,
since a 3" mirror is tough to make (because it's small and fiddly).
I don't know who first said that, but
speaking as someone who built an 8" mirror first, I would have to say
they are probably right :-)





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

* Re: Building an Ada compiler
  1996-06-28  0:00   ` Raul Barral Tamayo
@ 1996-06-28  0:00     ` Robert Dewar
  1996-06-30  0:00     ` Gary McKee
  1 sibling, 0 replies; 26+ messages in thread
From: Robert Dewar @ 1996-06-28  0:00 UTC (permalink / raw)


Raul said

"  Only a a couple of words :-), the idea behind GCC is a portable compiler
 with the only need to change the front-end to incorporate a new language
 and the back-end to add a new architecture so I think you could use the
 GNAT front-end and you could make a Mac back-end, about this last I have
 only heard about a language to describe it something similar to lex/yacc."

Well that's a bit confused, the language used for machine description
files has *nothing* whatsoever in common with lex and yacc (which have
precious little in common with one another for that matter). 

In any case, you don't need a new backend, you can use the existing PPC
and 68K backends. What you have to do is to modify the operating
environments, get tools like gdb, emacs, ld, make working etc.





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

* Re: Building an Ada compiler
  1996-06-28  0:00 ` Ray Blaak
@ 1996-06-28  0:00   ` Robert Dewar
  1996-07-01  0:00   ` Michael Feldman
  1 sibling, 0 replies; 26+ messages in thread
From: Robert Dewar @ 1996-06-28  0:00 UTC (permalink / raw)


Ray Black asked:

"Are you sure that GNAT requires UNIX? After all, its been ported to VMS and
DOS. Change your project to that of porting GNAT, and most of your work is
done."

Certainly GNAT does NOT require Unix. GNAT is currently available on 
DOS, WIn 3.1, Win95, WINNT, OS/2, and will soon be available on
OpenVMS/Alpha.






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

* Building an Ada compiler
@ 1996-06-28  0:00 ErkoDJK
  1996-06-28  0:00 ` Robert Dewar
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: ErkoDJK @ 1996-06-28  0:00 UTC (permalink / raw)


Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
targeted for the Macintosh computer (without requiring Unix, like
GNAT/GCC).  To that end, I would like to ask the Ada and compiler experts
here (and anyone else who wishes to respond) for some information,
including, just how insane are we?

Self-effacing humor aside, just how big a project is an Ada 95 compiler? 
Those of us planning to work on this project are all Ada software
engineers with at least seven years of experience, but none of us are
compiler experts.  I am a pessimist, and feel that the project size
estimates my friends have come up with are low.  Historical data from
other projects would be helpful.

What sources are available to help such an endeavor (other then the AdaIC,
and Apple)?

How much interest is there for an Ada 95 compiler for the Macintosh that
does not require Unix (It will initially work under E.T.O., the MPW
replacement)?  This seems to be a neglected market.  The GNAT-Mac project
(which requires MachTen, a well-regarded Unix), and the outdated Meridian
Ada compiler (now in Rational's hands), are the only Macintosh Ada
compilers I am aware of.

Thank you for your help,
David




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

* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
  1996-06-28  0:00 ` Robert Dewar
@ 1996-06-28  0:00 ` Robert A Duff
  1996-06-28  0:00   ` Robert Dewar
                     ` (2 more replies)
  1996-06-28  0:00 ` Ray Blaak
                   ` (3 subsequent siblings)
  5 siblings, 3 replies; 26+ messages in thread
From: Robert A Duff @ 1996-06-28  0:00 UTC (permalink / raw)


In article <4r023h$jt2@newsbf02.news.aol.com>, ErkoDJK <erkodjk@aol.com> wrote:
>Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
>targeted for the Macintosh computer (without requiring Unix, like
>GNAT/GCC).  To that end, I would like to ask the Ada and compiler experts
>here (and anyone else who wishes to respond) for some information,
>including, just how insane are we?

From scratch?  Somewhere between 10 and 100 person-years, is my guess.
It depends on the expertise of the engineers, and how fancy you want to
make it (e.g. optimizations, debugging capabilities, etc).  This comes
from my experience on Ada compiler projects, and talking to other Ada
compiler writers.

>Self-effacing humor aside, just how big a project is an Ada 95 compiler? 
>Those of us planning to work on this project are all Ada software
>engineers with at least seven years of experience, but none of us are
>compiler experts. ...

In that case, probably closer to the upper-end of the above range.

Also, are you Ada language lawyers?  For example, read the Ada Issues
produced by the ARG.  If your response is "Heh?  What are these people
babbling about?" then you have a lot to learn about the language itself.
For another example, can you come up with an example off the top of your
head showing why it is impossible for the parser to tell the difference
between a normal string_literal and an operator_symbol?  That's
something that a normal Ada programmer wouldn't care about, but that a
compiler writer cares deeply about, since it affects the high-level
design.  That's just one little example.  All of these things can be
learned, of course, but it takes time.

IMHO, if you've never built a compiler, and don't know Ada like the back
of your hand, it would be foolish to build an Ada compiler as your first
try.

Anybody remember who said this (in regard to hand-made telescope
mirrors)?  It's easier to make a 3-inch mirror and a 5-inch mirror, than
to make a 5-inch mirror.

- Bob

P.S. Sorry to be so gloomy...




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

* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
                   ` (2 preceding siblings ...)
  1996-06-28  0:00 ` Ray Blaak
@ 1996-06-29  0:00 ` Tucker Taft
  1996-06-29  0:00 ` Mark Eichin
  1996-07-01  0:00 ` Ken Garlington
  5 siblings, 0 replies; 26+ messages in thread
From: Tucker Taft @ 1996-06-29  0:00 UTC (permalink / raw)


ErkoDJK (erkodjk@aol.com) wrote:
: Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
: targeted for the Macintosh computer (without requiring Unix, like
: GNAT/GCC).   ...

You might be interested in the Mac version of AppletMagic(r),
and Ada 95 => Java byte-code compiler.  An alpha release of 
this is available at:

    http://www.inmet.com/javadir/download/

It runs on 68k Macs (and presumably PPC using emulation) without
needing "MachTen."

As far as your other question, building a compiler, or interpreter,
for any of the major object-oriented languages, is a big job.
Much more practical would be to do the work to rehost GNAT/GCC
to MacOS.  There is nothing inherently hard about this rehost,
though of course it does require a desire to "dig into" the GNAT/GCC
sources enough to find their host dependencies.  Both the Metrowerks
and the Symantec compilers on the Mac come with pretty complete
Unix emulation libraries, so it isn't too bad rehosting a Unix-oriented
program to the Mac with either of these development systems.

: Thank you for your help,
: David

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




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

* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
                   ` (3 preceding siblings ...)
  1996-06-29  0:00 ` Tucker Taft
@ 1996-06-29  0:00 ` Mark Eichin
       [not found]   ` <4r4c6m$bec@eri1.erinet.com>
  1996-07-01  0:00 ` Ken Garlington
  5 siblings, 1 reply; 26+ messages in thread
From: Mark Eichin @ 1996-06-29  0:00 UTC (permalink / raw)


Just because the GNAT mac ports currently require machten, doesn't
mean that a native-mac port is out of reach... there are already GCC
ports to Mac that run under MPW (or there were a few years ago, before
the boycott ended - so they should be easier to find now.)

If you've got at least one unix-gcc wizard and one mac-wizard,
(preferably in the same body :-) you can probably make a good estimate
of what it would take to get GNAT to use that gcc support (I don't
actually know if it is up-to-date in the current FSF release.) Then
the big challenge is the Ada Runtime; again, look at the example gnat
ones and figure out how/if yo can do that kind of thing under macos...




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

* Re: Building an Ada compiler
  1996-06-28  0:00   ` Ruediger Berlich
@ 1996-06-29  0:00     ` Robert A Duff
  1996-07-04  0:00     ` Jens Hansson
  1 sibling, 0 replies; 26+ messages in thread
From: Robert A Duff @ 1996-06-29  0:00 UTC (permalink / raw)


In article <4r0u04$21b0@sat.ipp-garching.mpg.de>,
Ruediger Berlich <berlich@pc66.mppmu.mpg.de> wrote:
>Hi,
>if writing an Ada-Compiler is that much of a problem, then,
>how difficult is it to write an Ada95-Interpreter ?

Beats me.  My guess is half the time to write a compiler, or somewhat
less.  Maybe even one tenth as hard.  But I have no expertise to back
that up.

To write an Ada interpreter, you still need to understand the language,
in a way that Ada programmers (thankfully) don't need to.

As various others have pointed out, maybe you should look into GNAT more
seriously -- yes, gcc is unix-based, but it's been ported to VMS and
DOS.  Porting gcc to an an environment it's not used to might be hard,
but nowhere near as hard as writing an Ada compiler from scratch.  Once
you port gcc, porting GNAT is not so hard.

- Bob




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

* Re: Building an Ada compiler
       [not found]   ` <4r4c6m$bec@eri1.erinet.com>
@ 1996-06-30  0:00     ` James E. Hopper
  1996-06-30  0:00       ` Tucker Taft
  1996-07-01  0:00       ` Laurent Gasser
  0 siblings, 2 replies; 26+ messages in thread
From: James E. Hopper @ 1996-06-30  0:00 UTC (permalink / raw)


In article <xe1ohm2tidg.fsf@maneki-neko.cygnus.com> Mark Eichin,
eichin@cygnus.com writes: >If you've got at least one unix-gcc wizard
and one mac-wizard, >(preferably in the same body :-) you can probably
make a good estimate >of what it would take to get GNAT to use that
gcc support (I don't >actually know if it is up-to-date in the current
FSF release.) Then >the big challenge is the Ada Runtime; again, look
at the example gnat >ones and figure out how/if yo can do that kind of
thing under macos...


I am a past master of the mac OS programming (i have made a fair
amount of money doing contract programming for the mac), and i have
spent the last couple of years working with unix, and having spent
about 10 years working in Ada, and As the person who did most of the
work on the MachTen port (with a LOT of help from the folks at
NYU/ACT) and others) i think i qualify to address this ;-)  I will say
that this is far less easy than Tucker makes it out.  Realize that if
it were this easy it would have been done long ago.  I happen to know
that one of the people at cygnus has been working on porting gcc to
MPW for a couple of years and he is still not happy enough with it to
release it.

An MPW version of GCC that is very old 2.3?? exists and a port of the
current version is underway as i say (powermac only).  Moving from an
MPW IDE to something like code warrior is much more work as building
gcc and Gnat is very dependent on GNU make which is fundamentally
incomparable with how projects work in code warrior.  i suppose one
could do as Stan has done at cygnus and write a translator to
translate between GNU make files and the code warrior project. i
suspect its a bigger effort than one would believe givin how much work
i know stan has put into his in his mpw translator and its still
requires (last time i talked to him) some hand work.

if the best you can do is MPW, one has to ask what is to be gained by
it. you wold still need to buy MPW which is every bit as much as unmac
line as MachTen. in fact MPW and machten are very similar IDE
environments. The cost of MPW is similar to what the cost of MachTen
will be come august/sept when the software development release for Ada
is available.  Machten still sits on the mac os, and i use mac tools
like bbedit and code warrior to do things like editing, and source
code control.  we can develop double clickable macos applications, as
well as unix CLI apps with macOS windowing support in place of
x/motif.  So how much more mac can you wish?? I do love the code
warrior environment to but i KNOW how much more work it will be to
move from what we have to this, and i don't want to wait another year
to have a useful compiler, do you?? We have spent a couple of thousand
man hours over the last year and a half to get the machten port
working, if you have that kind of time to throw at it i would be
delighted to see it done.

I know how to use machten to build a stand alone gcc that can work
with other IDE's like the GW AdaED environment or perhaps as a plug in
to metrowerks but this gnat would not be able to build itself without
much more work than i feel like throwing at it.  but unless someone
feels like funding this i am going to concentrate on making the
Machten compile and tools as good as they can be. i see issues like
moving it to another IDE as distractions of the fundamental issue of
providing a useful compiler.

I would also point out that a couple of Ada vendor who i have haunted
over the last few years to do a mac port of their commercial compilers
told me they are watching the machten port to see how many people use
it as a gauge of the interest in Ada in the mac world.

jim




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

* Re: Building an Ada compiler
  1996-06-30  0:00     ` James E. Hopper
@ 1996-06-30  0:00       ` Tucker Taft
  1996-06-30  0:00         ` James E. Hopper
  1996-06-30  0:00         ` Robert Dewar
  1996-07-01  0:00       ` Laurent Gasser
  1 sibling, 2 replies; 26+ messages in thread
From: Tucker Taft @ 1996-06-30  0:00 UTC (permalink / raw)



James E. Hopper (jhopper@erinet.com) wrote:
: ...
: I know how to use machten to build a stand alone gcc that can work
: with other IDE's like the GW AdaED environment or perhaps as a plug in
: to metrowerks but this gnat would not be able to build itself without
: much more work than i feel like throwing at it.  ...

I can believe it would be difficult to create a self-building GNAT/GCC
on MacOS, but that is presumably not the same thing as building
a GNAT that can compile normal "user" Ada programs directly on MacOS.

: ...but unless someone
: feels like funding this i am going to concentrate on making the
: Machten compile and tools as good as they can be. i see issues like
: moving it to another IDE as distractions of the fundamental issue of
: providing a useful compiler.

Not everyone agrees with you, but as you say, they will have to put
their money or their time where there mouth is.  Even using MPW
on the Mac is distasteful to many people.  There really is no need
for a command-line interface if you start from scratch with an IDE
like CodeWarrior.  However, it is different when you have an elaborate
system already built around make-like tools.  Moving that to a 
command-line-less environment can be painful.

: jim

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




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

* Re: Building an Ada compiler
  1996-06-30  0:00       ` Tucker Taft
@ 1996-06-30  0:00         ` James E. Hopper
  1996-06-30  0:00         ` Robert Dewar
  1 sibling, 0 replies; 26+ messages in thread
From: James E. Hopper @ 1996-06-30  0:00 UTC (permalink / raw)



In article <DttMro.Az0.0.-s@inmet.camb.inmet.com> Tucker Taft,
stt@henning.camb.inmet.com writes:
>Not everyone agrees with you, but as you say, they will have to put
>their money or their time where there mouth is.  Even using MPW
>on the Mac is distasteful to many people.  There really is no need
>for a command-line interface if you start from scratch with an IDE
>like CodeWarrior.  However, it is different when you have an elaborate
>system already built around make-like tools.  Moving that to a 
>command-line-less environment can be painful.
>

Thats why i have been working on making the gcc tools have mac
interefaces.
One of the things i like about tenons environment is i can put mac OS
interfaces and calls into unix tools.  i am working on a nice mac
style interface for gnat under machten that will eventually i hope
look much like the codewarrior IDE.  It won't be useful for building or
maintaining gcc/gnat, but it should be a nice environment for developing
ada code in if i get it right.   If someone wants a different environment
they are free to do their own versions of the IDE.  i would submit that
what people want is a better environment for gnat on mac, not a different
compiler.
To this end i will help anyone who wants to work on an IDE to fit the
existing
compiler into.  this is a WHOLE lot less work than building a new
compiler!

jim




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

* Re: Building an Ada compiler
  1996-06-28  0:00   ` Raul Barral Tamayo
  1996-06-28  0:00     ` Robert Dewar
@ 1996-06-30  0:00     ` Gary McKee
  1 sibling, 0 replies; 26+ messages in thread
From: Gary McKee @ 1996-06-30  0:00 UTC (permalink / raw)



In article <4mybl7kdal.fsf@pares.gsyc.inf.uc3m.es>,
raul@pares.gsyc.inf.uc3m.es (Raul Barral Tamayo) wrote:

 >   Only a a couple of words :-), the idea behind GCC is a portable
compiler
 >  with the only need to change the front-end to incorporate a new
language
 >  and the back-end to add a new architecture so I think you could use the

 >  GNAT front-end and you could make a Mac back-end, about this last I
have
 >  only heard about a language to describe it something similar to
lex/yacc.
 > 
 >  My 0.02$, raul.
 > 
 > In article <Dtppz2.4DM@world.std.com> bobduff@world.std.com (Robert A
Duff)
 > writes:
 >    In article <4r023h$jt2@newsbf02.news.aol.com>, ErkoDJK
<erkodjk@aol.com>
 > wrote:
 >    >Some friends and I have a crazy idea.  We want to build an Ada 95
compiler
 >    >targeted for the Macintosh computer (without requiring Unix, like
 >    >GNAT/GCC).  To that end, I would like to ask the Ada and compiler
experts
 >    >here (and anyone else who wishes to respond) for some information,
 >    >including, just how insane are we?
---------------------------------------------------------------
Our team is the one that is currently porting the GNAT compiler to MachTen
UNIX on the Macintosh and we examined the feasibility of targeting MPW
instead of MachTen. Our decision to use MachTen was largely predicated on
the cost-saving that we obtained by using the excellent capabilities that
MachTen provided (especially GCC).

IMHO, MPW is essentially a UNIX lookalike with less capability so a port of
GNAT should be possible. Here are some things to consider:

1) GNAT requires GCC (or equivalent);

2) GCC requires an existing C compiler to start the bootstrap of GCC;

3) The initial GNAT bootstrap is (traditionally) a "cross-compile" from
another system;

4) Our team may be willing, informally, to answer questions about our GNAT
port
   if you decide to go this route;

5) with Tenon's new pricing, MPW is no longer significantly less expensive.

Please do keep us informed if you decide to go this route, the more good
Ada compilers on the market, the better for us all!










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

* Re: Building an Ada compiler
  1996-06-30  0:00       ` Tucker Taft
  1996-06-30  0:00         ` James E. Hopper
@ 1996-06-30  0:00         ` Robert Dewar
  1996-07-05  0:00           ` David Emery
  1 sibling, 1 reply; 26+ messages in thread
From: Robert Dewar @ 1996-06-30  0:00 UTC (permalink / raw)



Tuck says

"Not everyone agrees with you, but as you say, they will have to put
their money or their time where there mouth is.  Even using MPW
on the Mac is distasteful to many people."

Actually I think for most people MPW (or its successor) are much MORE
distasteful than using MachTen, since at least the Unix command language
is familiar to a lot of programmers. Very few programmers (including
Mac System-7 users) are familiar with the MPW command language.

I don't see any real point in a GNAT for MPW effort, but a GNAT that
worked directly under System-7 with a visual IDE would be definitely
of interest, though that's a much bigger effort.

One thing that is important, and is true of both MPW and Machten, is that
it is important to be able to run under System-7, and co-exist with
System-7 applications. That's a nice feature of MachTen, which at least
for us makes it much more interesting than MkLinux.





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

* Re: Building an Ada compiler
  1996-06-30  0:00     ` James E. Hopper
  1996-06-30  0:00       ` Tucker Taft
@ 1996-07-01  0:00       ` Laurent Gasser
  1996-07-02  0:00         ` Arthur Evans Jr
  1 sibling, 1 reply; 26+ messages in thread
From: Laurent Gasser @ 1996-07-01  0:00 UTC (permalink / raw)



In article <4r4idi$egp@eri1.erinet.com>, James E. Hopper <jhopper@erinet.com> writes:  
> I know how to use machten to build a stand alone gcc that can work
> with other IDE's like the GW AdaED environment or perhaps as a plug in
> to metrowerks but this gnat would not be able to build itself without
> much more work than i feel like throwing at it.  but unless someone
> feels like funding this i am going to concentrate on making the
> Machten compile and tools as good as they can be. i see issues like
> moving it to another IDE as distractions of the fundamental issue of
> providing a useful compiler.
> 
> I would also point out that a couple of Ada vendor who i have haunted
> over the last few years to do a mac port of their commercial compilers
> told me they are watching the machten port to see how many people use
> it as a gauge of the interest in Ada in the mac world.
> 
> jim

I see the effort made by your team as the most important: having a working
Ada95 compiler generating executable on Mac.  Improving the usability can
be done by users later on.

I am trying to suggest to my co-workers how good it could be to work with
Ada.  And some have already listened to me :-)

On the note of IDE, maybe we could get rid of having a CLI by using the
scripting facilities (Apple Events) of MacOS.  So the compiler would be
a faceless background application receiving line commands and translating
the code in the background.  But once more, your work clearly has a higher
priority.  

Where and when could we know more about Tenon's GNAT product?
-- 
Laurent Gasser (lga@sma.ch)
Computers do not solve problems, they execute solutions.






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

* Re: Building an Ada compiler
  1996-06-28  0:00 Building an Ada compiler ErkoDJK
                   ` (4 preceding siblings ...)
  1996-06-29  0:00 ` Mark Eichin
@ 1996-07-01  0:00 ` Ken Garlington
  5 siblings, 0 replies; 26+ messages in thread
From: Ken Garlington @ 1996-07-01  0:00 UTC (permalink / raw)



ErkoDJK wrote:
> 
> Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
> targeted for the Macintosh computer (without requiring Unix, like
> GNAT/GCC).

Beware! As I now understand it, the Machten shell just does the things that
MPW does for Meridian - provides a command-line interface for issuing compiler
commands. The output of the compiler runs on MacOS. Machten isn't used like A/UX,
to completely replace MacOS as the operating environment.

So, if you're saying that you have a better alternative than Machten to do the
MPW task, knock your self out. Otherwise, as I understand it, there's no need
to go build another MPW-type shell.

-- 
LMTAS - "Our Brand Means Quality"




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

* Re: Building an Ada compiler
  1996-06-28  0:00 ` Ray Blaak
  1996-06-28  0:00   ` Robert Dewar
@ 1996-07-01  0:00   ` Michael Feldman
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Feldman @ 1996-07-01  0:00 UTC (permalink / raw)



In article <4r0t56$50v@map.mda.ca>, Ray Blaak <blaak@mda.ca> wrote:
>erkodjk@aol.com (ErkoDJK) writes:
>
>>Some friends and I have a crazy idea.  We want to build an Ada 95 compiler
>>targeted for the Macintosh computer (without requiring Unix, like
>>GNAT/GCC).  
>
>Are you sure that GNAT requires UNIX? After all, its been ported to VMS and
>DOS. Change your project to that of porting GNAT, and most of your work is
>done.

GNAT does not, per se, require Unix, but it does require an underlying
GNU infrastructure (loader, assembler, machine descriptions and all that). 
The currently in-process GNAT for Mac uses MachTen as its host environment,
in part because MachTen provides a standard Unix shell and the necessary
GNU infrastructure. We looked at alternatives to MachTen, especially MPW,
but the necessary GNU stuff simply was not available. Same for MkLinux.

This GNAT is _hosted_ on MachTen, but _targets_ stand-alone Mac applications
as well. We are testing toolbox ("SDK") bindings, and in so doing have
already produced a number of quite decent Mac programs, with more to come.

True, MachTen is a partly proprietary environment, but so are MPW, 
CodeWarrior, Symantec, etc. The only completely free-software development
environment for Mac right now is MkLinux, which currently is supported
on only a limited range of Mavs (that limitation will change with time)
and does not coexist with other "ordinary" Mac apps. The nice thing
about MachTen is that it runs as a Mac app, so you can keep Word or Excel
(or whatever) running in another window.

It is commonly estimated that producing a GNAT port, given that the GNU
backend (machine-description) support already exists, takes about a
person-year. Given the existence of MachTen with its GNU support for
68k and PowerMac, this project is turning out to be roughly in that
ballpark.

See http://gnat-mac.com/macada/ for details. You can download GNAT
3.05, which is in pretty good shape. You do need MachTen, of course.

You might want to consider doing a GNAT port to MkLinux, or to MPW, if the
GNU stuff is available yet for MPW. I do NOT recommend starting from
scratch, unless you have lots of resources. 

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman -  chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University -  Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax) 
http://www.seas.gwu.edu/faculty/mfeldman
------------------------------------------------------------------------
       Pork is all that money the government gives the other guys.
------------------------------------------------------------------------
Ada on the WWW: http://lglwww.epfl.ch/Ada/ or http://info.acm.org/sigada/
------------------------------------------------------------------------




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

* Re: Building an Ada compiler
  1996-07-01  0:00       ` Laurent Gasser
@ 1996-07-02  0:00         ` Arthur Evans Jr
  0 siblings, 0 replies; 26+ messages in thread
From: Arthur Evans Jr @ 1996-07-02  0:00 UTC (permalink / raw)



In article <4r8nulINNkd6@maz4.sma.ch>, lga@unconfigured.xvnews.domain wrote:

> Where and when could we know more about Tenon's GNAT product?

See the GNAT-Mac Project's home page
    http://gnat-mac.com/macada/

There's a link there to Tenon, as well as links to the rest of the
players on this project.

Art Evans

Arthur Evans Jr, PhD        Phone: 412-963-0839
Ada Consulting              FAX:   412-963-0927
461 Fairview Road
Pittsburgh PA  15238-1933
evans@evans.pgh.pa.us




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

* Re: Building an Ada compiler
  1996-06-28  0:00   ` Ruediger Berlich
  1996-06-29  0:00     ` Robert A Duff
@ 1996-07-04  0:00     ` Jens Hansson
  1 sibling, 0 replies; 26+ messages in thread
From: Jens Hansson @ 1996-07-04  0:00 UTC (permalink / raw)



In article <4r0u04$21b0@sat.ipp-garching.mpg.de>, berlich@pc66.mppmu.mpg.de 
says...
>
>Hi,
>if writing an Ada-Compiler is that much of a problem, then,
>how difficult is it to write an Ada95-Interpreter ?

I'd say it's even more difficult! Think about changing a declaration (i.e. a 
variable name or type) in a separate package header. Then all references in
all dependant modules of the program are invalid.

>I think of something one can plug into the code as a call to 
>the interpreter, where the interpeter knows anything about the 
>variables and objects defined at the calling-point of the 
>interpreter and is able to call all functions etc. that are accessible at
>the calling point. So one could do 'on the fly'-development of programs
>(e.g. provide a frame for the program which is linked with all necessary 
>libraries and then write the code that is needed while the program is 
>running.). O.k., maybe that is an illusion. But a nice one.
>Bye and have a nice day, Ruediger
>[berlich@pc66.mppmu.mpg.de]
>

The main difficulties of making an Ada compiler is the complexity of the 
language and efficient code generation. You cannot (legally :-)) simplify the 
language, but you can simplify the code generation by generating code for a
virtual machine (like Java) which has appropriate instructions and data types.
I believe C is inappropriate as an intermediate language because of Adas 
tasking -- You might be able to do it, but if your C compiler has stack 
checking it'll probably break.

I would recommend the following:

 * Get the Annotated RM, which contains RM plus lots of clarifications on how
   the language works.

 * Since you're not compiler writers, get a good book on compiler techniques
   like "Compilers -- Principles, Techniques and Tools" by Aho, Sethi and 
   Ullman.

 * Start out with a *tiny* subset of the language. Skip processes, exceptions, 
   user-defined types, procedure and operator overloading etc. I would start 
   with an Ada subset containing:

   - only integer variables
   - some program structure (like FOR loops) 
   - subroutines/functions with parameters and return values.

 * Then I could add other data types:

   - Floats, characters, booleans and enumerated types
   - Array types, strings and simple Record types
   - access types (skip the generics so far...). Memory management      
     (garbage collection) might produce a problem.
   - Tagged records, type extensions, ... (Ugh!).

   To make these data types more useful, you may want to implement:

   - Overloaded procedures and functions.
   - Overloaded operators.

When you've done this (assuming that you get everything to work in all 
combinations) I would say that you have 2/3 of the work remaining.

I'd recommend you to use compiler generator tools like YACC (or PCCTS or ..., 
check the comp.compilers group). These tools makes it a lot easier to change 
the grammar as the compiler develops. Some tools even come with a few sample 
grammars (I don't know if any of them comes with an Ada grammar though).

You're attempting to start a huge project. Good luck!

-- Jens





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

* Re: Building an Ada compiler
  1996-06-30  0:00         ` Robert Dewar
@ 1996-07-05  0:00           ` David Emery
  1996-07-06  0:00             ` Robert Dewar
  1996-07-07  0:00             ` Michael Feldman
  0 siblings, 2 replies; 26+ messages in thread
From: David Emery @ 1996-07-05  0:00 UTC (permalink / raw)



In article <dewar.836157364@schonberg>, dewar@cs.nyu.edu (Robert Dewar) wrote:

> Tuck says
> 
> "Not everyone agrees with you, but as you say, they will have to put
> their money or their time where there mouth is.  Even using MPW
> on the Mac is distasteful to many people."
> 
> Actually I think for most people MPW (or its successor) are much MORE
> distasteful than using MachTen, since at least the Unix command language
> is familiar to a lot of programmers. Very few programmers (including
> Mac System-7 users) are familiar with the MPW command language.
> 
> I don't see any real point in a GNAT for MPW effort, but a GNAT that
> worked directly under System-7 with a visual IDE would be definitely
> of interest, though that's a much bigger effort.
> 
> One thing that is important, and is true of both MPW and Machten, is that
> it is important to be able to run under System-7, and co-exist with
> System-7 applications. That's a nice feature of MachTen, which at least
> for us makes it much more interesting than MkLinux.

I completely agree with RBKD on this one.  MPW seemed to take the worst
of Unix.  If you know Unix, then MPW is horribly confusing.   THere's
lots of incompatabilities with Unix, that seem to be there just for the
dubious joy of doing things differently.  MPW lacked the consistency
that is the hallmark of VMS and DCL, and lacked the "universality" and
flexibility of Unix.  I tried it, and didn't like it.  (No jokes about
inhaling, please :-) 

MachTen, on the other hand, is a dream.  It's full Unix, but it's also a
very well-behaved Mac application.  And it's just too wierd to 'rsh/rcp' over
from my Sun to my Mac, to grab a file...

MachTen's ability to generate native Mac applications is a real plus, but
I can't say that I've tried this yet.  

Now, I wouldn't mind a full Ada95 Development Environment, as a native
Mac application.  But, as an experienced Unix -AND- Mac user, the only
problem I have with MachTen is that it's not free :-)   It's Tenon's 
business to decide how to sell their product, but I really believe that
MachTen would go much further if it were cheaper...

            dave




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

* Re: Building an Ada compiler
  1996-07-05  0:00           ` David Emery
@ 1996-07-06  0:00             ` Robert Dewar
  1996-07-07  0:00             ` Michael Feldman
  1 sibling, 0 replies; 26+ messages in thread
From: Robert Dewar @ 1996-07-06  0:00 UTC (permalink / raw)



Dave says

"Now, I wouldn't mind a full Ada95 Development Environment, as a native
Mac application.  But, as an experienced Unix -AND- Mac user, the only
problem I have with MachTen is that it's not free :-)   It's Tenon's
business to decide how to sell their product, but I really believe that
MachTen would go much further if it were cheaper...
"

Part of the plans here are to create some kind of "Machten Lite" product,
which will be sufficient for most users, and sufficient for running GNAT,
and package it up on a CD ROM, with the GNAT stuff, at a reasonable
price. Watch for further details as they develop.





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

* Re: Building an Ada compiler
  1996-07-05  0:00           ` David Emery
  1996-07-06  0:00             ` Robert Dewar
@ 1996-07-07  0:00             ` Michael Feldman
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Feldman @ 1996-07-07  0:00 UTC (permalink / raw)



In article <emery-0507962237090001@line290.nwm.mindlink.net>,
David Emery <emery@grebyn.com> wrote:

>I completely agree with RBKD on this one.  MPW seemed to take the worst
>of Unix.  If you know Unix, then MPW is horribly confusing.   THere's
>lots of incompatabilities with Unix, that seem to be there just for the
>dubious joy of doing things differently.  MPW lacked the consistency
>that is the hallmark of VMS and DCL, and lacked the "universality" and
>flexibility of Unix.  I tried it, and didn't like it.  (No jokes about
>inhaling, please :-) 

Plus it's also a commercial system, albeit (currently) a bit cheaper than
MachTen.

>MachTen's ability to generate native Mac applications is a real plus, but
>I can't say that I've tried this yet.  

We've had our first test of this in the last couple of days, producing
a couple of actual Mac apps, using the toolbox and all. These have been
tested on Macs (PPC only) with no sign of MachTen or GNAT installed.

Surf over to the GNAT-Mac web site to read about the whole setup.

http://gnat-mac.com/macada/

>Now, I wouldn't mind a full Ada95 Development Environment, as a native
>Mac application.  

Maybe someone, someday, will see such a thing as a product with a
commercial future. Meanwhile, MachTen is a full development environment,
capable of producing real Mac apps.

>But, as an experienced Unix -AND- Mac user, the only
>problem I have with MachTen is that it's not free :-)   It's Tenon's 
>business to decide how to sell their product, but I really believe that
>MachTen would go much further if it were cheaper...

I wouldn't rule out this happening.

Mike Feldman




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

* Re: Building an Ada compiler
@ 1996-07-16  0:00 ErkoDJK
  0 siblings, 0 replies; 26+ messages in thread
From: ErkoDJK @ 1996-07-16  0:00 UTC (permalink / raw)



After a short rest in a very nice padded room, I am feeling much better. 
I would like to thank everyone for their input.  We are rethinking what we
want to do, and will look into porting GNAT/GCC.

Thanks
david




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

end of thread, other threads:[~1996-07-16  0:00 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-28  0:00 Building an Ada compiler ErkoDJK
1996-06-28  0:00 ` Robert Dewar
1996-06-28  0:00 ` Robert A Duff
1996-06-28  0:00   ` Robert Dewar
1996-06-28  0:00   ` Raul Barral Tamayo
1996-06-28  0:00     ` Robert Dewar
1996-06-30  0:00     ` Gary McKee
1996-06-28  0:00   ` Ruediger Berlich
1996-06-29  0:00     ` Robert A Duff
1996-07-04  0:00     ` Jens Hansson
1996-06-28  0:00 ` Ray Blaak
1996-06-28  0:00   ` Robert Dewar
1996-07-01  0:00   ` Michael Feldman
1996-06-29  0:00 ` Tucker Taft
1996-06-29  0:00 ` Mark Eichin
     [not found]   ` <4r4c6m$bec@eri1.erinet.com>
1996-06-30  0:00     ` James E. Hopper
1996-06-30  0:00       ` Tucker Taft
1996-06-30  0:00         ` James E. Hopper
1996-06-30  0:00         ` Robert Dewar
1996-07-05  0:00           ` David Emery
1996-07-06  0:00             ` Robert Dewar
1996-07-07  0:00             ` Michael Feldman
1996-07-01  0:00       ` Laurent Gasser
1996-07-02  0:00         ` Arthur Evans Jr
1996-07-01  0:00 ` Ken Garlington
  -- strict thread matches above, loose matches on Subject: below --
1996-07-16  0:00 ErkoDJK

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