comp.lang.ada
 help / color / mirror / Atom feed
* Ada compiler using a M2 compiler as back-end
@ 2012-02-08  3:29 Gautier write-only
  2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Gautier write-only @ 2012-02-08  3:29 UTC (permalink / raw)


Hi,
Just saw that a Modula-2 compiler (Stony Brook) has been recently
released as freeware:

  http://modula2.org/adwm2/

IIRC it is reputed to produce very compact and fast machine code.

A nice project would be to plug an Ada front-end to it and see the
result...
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada
NB: follow the above link for a valid e-mail address



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08  3:29 Ada compiler using a M2 compiler as back-end Gautier write-only
@ 2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
  2012-02-08 14:11   ` Simon Clubley
  2012-02-09  9:57   ` Rugxulo
  2012-02-09  2:35 ` Shark8
  2012-02-09  3:46 ` Randy Brukardt
  2 siblings, 2 replies; 14+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-08  5:05 UTC (permalink / raw)


Le Wed, 08 Feb 2012 04:29:23 +0100, Gautier write-only  
<gautier_niouzes@hotmail.com> a écrit:

> Hi,
> Just saw that a Modula-2 compiler (Stony Brook) has been recently
> released as freeware:
>
>   http://modula2.org/adwm2/
>

I wondered why Modula‑2 instead of Modula‑3. A quick search on the web  
suggest Modula‑3 was not widely adopted as an industry standard. Does that  
mean Modula‑2 is really widely adopted ?

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
@ 2012-02-08 14:11   ` Simon Clubley
  2012-02-08 15:05     ` Yannick Duchêne (Hibou57)
  2012-02-09 10:48     ` Gautier write-only
  2012-02-09  9:57   ` Rugxulo
  1 sibling, 2 replies; 14+ messages in thread
From: Simon Clubley @ 2012-02-08 14:11 UTC (permalink / raw)


On 2012-02-07, Yannick Duch�ne <yannick_duchene@yahoo.fr> wrote:
> Le Wed, 08 Feb 2012 04:29:23 +0100, Gautier write-only  
><gautier_niouzes@hotmail.com> a �crit:
>
>> Hi,
>> Just saw that a Modula-2 compiler (Stony Brook) has been recently
>> released as freeware:
>>
>>   http://modula2.org/adwm2/
>>

Thanks for the pointer. I note it does appear to be Windows only.

>
> I wondered why Modula?2 instead of Modula?3. A quick search on the web  
> suggest Modula?3 was not widely adopted as an industry standard. Does that  
> mean Modula?2 is really widely adopted ?
>

It's popular enough that there's now a GNU Modula-2 compiler at:

	http://www.nongnu.org/gm2/homepage.html

It also claims on that site that the compiler is capable of acting as a
cross compiler for some AVR and ARM devices.

(I like to keep a lookout for safety conscious languages which can be
built as cross compilers under Linux and whose code can run on bare metal
in a real time environment; and yes, Ada is currently the best candidate
for that role for me, but I am always interested in other options.)

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08 14:11   ` Simon Clubley
@ 2012-02-08 15:05     ` Yannick Duchêne (Hibou57)
  2012-02-09  9:02       ` Ludovic Brenta
  2012-02-09 10:48     ` Gautier write-only
  1 sibling, 1 reply; 14+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-08 15:05 UTC (permalink / raw)


Le Wed, 08 Feb 2012 15:11:19 +0100, Simon Clubley  
<clubley@remove_me.eisner.decus.org-earth.ufp> a écrit:
> 	http://www.nongnu.org/gm2/homepage.html
>
> It also claims on that site that the compiler is capable of acting as a
> cross compiler for some AVR and ARM devices.

In bookmarks now.

Also, to get back to the Ada topic, a comparison “Modula‑3 vs Ada”:
http://www.cs.wichita.edu/~rodney/languages/Modula-Ada-comparison.txt

May be outdated, no date and I did not check everything.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08  3:29 Ada compiler using a M2 compiler as back-end Gautier write-only
  2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
@ 2012-02-09  2:35 ` Shark8
  2012-02-09  3:46 ` Randy Brukardt
  2 siblings, 0 replies; 14+ messages in thread
From: Shark8 @ 2012-02-09  2:35 UTC (permalink / raw)


On Feb 7, 9:29 pm, Gautier write-only <gautier_niou...@hotmail.com>
wrote:
>
> A nice project would be to plug an Ada front-end to it and see the
> result...

Hm, I like that idea.



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08  3:29 Ada compiler using a M2 compiler as back-end Gautier write-only
  2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
  2012-02-09  2:35 ` Shark8
@ 2012-02-09  3:46 ` Randy Brukardt
  2 siblings, 0 replies; 14+ messages in thread
From: Randy Brukardt @ 2012-02-09  3:46 UTC (permalink / raw)


"Gautier write-only" <gautier_niouzes@hotmail.com> wrote in message 
news:abb720e9-fdc2-4a02-9318-982eec5fdf12@k6g2000vbz.googlegroups.com...
> Hi,
> Just saw that a Modula-2 compiler (Stony Brook) has been recently
> released as freeware:
>
>  http://modula2.org/adwm2/
>
> IIRC it is reputed to produce very compact and fast machine code.
>
> A nice project would be to plug an Ada front-end to it and see the
> result...

There once was a Stony Brook Ada compiler announced. I don't think it ever 
saw the light of day, though.

                           Randy.





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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08 15:05     ` Yannick Duchêne (Hibou57)
@ 2012-02-09  9:02       ` Ludovic Brenta
  2012-02-09 16:47         ` Yannick Duchêne (Hibou57)
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Brenta @ 2012-02-09  9:02 UTC (permalink / raw)


Yannick Duchêne wrote on comp.lang.ada:
> Also, to get back to the Ada topic, a comparison "Modula-3 vs Ada":http://www.cs.wichita.edu/~rodney/languages/Modula-Ada-comparison.txt
>
> May be outdated, no date and I did not check everything.

Actually this is a rendition of a post here on comp.lang.ada 16 years
ago:

http://groups.google.com/group/comp.lang.modula3/browse_thread/thread/f07b9c63c348974b/6c76347a49e42768?lnk=gst&q=Ada+versus+Modula3#6c76347a49e42768

The entire thread is interesting.

--
Ludovic Brenta.



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
  2012-02-08 14:11   ` Simon Clubley
@ 2012-02-09  9:57   ` Rugxulo
  2012-02-09 10:03     ` Rugxulo
  1 sibling, 1 reply; 14+ messages in thread
From: Rugxulo @ 2012-02-09  9:57 UTC (permalink / raw)


Hi,

On Feb 7, 11:05 pm, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Le Wed, 08 Feb 2012 04:29:23 +0100, Gautier write-only
> <gautier_niou...@hotmail.com> a écrit:
>
> > Just saw that a Modula-2 compiler (Stony Brook) has been recently
> > released as freeware:
>
> >  http://modula2.org/adwm2/
>
> I wondered why Modula-2 instead of Modula-3. A quick search on the web
> suggest Modula-3 was not widely adopted as an industry standard. Does that
> mean Modula-2 is really widely adopted ?

I'm far from authoritative, but ...

Wirth developed Modula-2 as a successor to Pascal, from 1980-6, then
switched to Oberon. Modula-3 (inspired by Modula-2+) was developed
independently by DEC SRC from 1988-91. When DEC died (1997?), so did
[SRC] Modula-3 (though a few derivatives still supported it, see PM3
or CM3). Once Ada95 and C++98 were standardized (ISO), there was less
need to use Modula-3 as they had the same basic features (objects,
generics, exceptions). Even Oberon-2 (1992) has objects, dynamic
arrays, garbage collection. But Oberon was never standardized, and
even ISO Modula-2 (1996) was quite big (vs. PIM3) and unpopular with
the vendors (ahem, VDM-SL), though it did add some things (standard
libs, complex, finally, exceptions; optional: OOP and/or generics).
Also keep in mind that GCC never "officially" integrated Pascal or
Modula-3 like it did with C++ and Ada, but SRC Modula-3 and ETH Oberon
were free anyways, so that gave them some free exposure. GCC's GM2
(stabilized a year ago) is trying to partially rectify this but is
currently only for old 4.1.2.

AFAIK, the only ISO Modula-2 compilers are p1, XDS, GM2 (all still
maintained, barely). I have not tried ADW (above), so I can't say
about it.



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-09  9:57   ` Rugxulo
@ 2012-02-09 10:03     ` Rugxulo
  2012-02-09 13:12       ` Simon Clubley
  0 siblings, 1 reply; 14+ messages in thread
From: Rugxulo @ 2012-02-09 10:03 UTC (permalink / raw)


Hi again,

On Feb 9, 3:57 am, Rugxulo <rugx...@gmail.com> wrote:
>
> Once Ada95 and C++98 were standardized (ISO), there was less
> need to use Modula-3 as they had the same basic features (objects,
> generics, exceptions). Even Oberon-2 (1992) has objects, dynamic
> arrays, garbage collection. But Oberon was never standardized, and
> even ISO Modula-2 (1996) was quite big (vs. PIM3)

Oops, forgot to mention the massive popularity of Delphi/FreePascal,
Java, C#, and Objective C. Yeah, I guess you already noticed that (hi
Gautier!). In other words, it's a very fractured world. Oh well,
variety is the spice of life!



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-08 14:11   ` Simon Clubley
  2012-02-08 15:05     ` Yannick Duchêne (Hibou57)
@ 2012-02-09 10:48     ` Gautier write-only
  1 sibling, 0 replies; 14+ messages in thread
From: Gautier write-only @ 2012-02-09 10:48 UTC (permalink / raw)


On 8 fév, 15:11, Simon Clubley <clubley@remove_me.eisner.decus.org-
Earth.UFP> wrote:

> >>  http://modula2.org/adwm2/
>
> Thanks for the pointer. I note it does appear to be Windows only.

As for the programming environment: seems so.
But it targets (according to the docs):

OSes:
· Windows
· Linux
· SunOS
· AIX
· Unix

CPUs:
· IA32
· AMD64, X86_64
· SPARC
· PPC

And that compiler factory is or was reputed for doing well in space
optimization (compilation and smart linking).
_________________________
Gautier's Ada programming
http://sf.net/users/gdemont



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-09 10:03     ` Rugxulo
@ 2012-02-09 13:12       ` Simon Clubley
  2012-02-09 19:39         ` Rugxulo
  0 siblings, 1 reply; 14+ messages in thread
From: Simon Clubley @ 2012-02-09 13:12 UTC (permalink / raw)


On 2012-02-09, Rugxulo <rugxulo@gmail.com> wrote:
> Hi again,
>
> On Feb 9, 3:57�am, Rugxulo <rugx...@gmail.com> wrote:
>>
>> Once Ada95 and C++98 were standardized (ISO), there was less
>> need to use Modula-3 as they had the same basic features (objects,
>> generics, exceptions). Even Oberon-2 (1992) has objects, dynamic
>> arrays, garbage collection. But Oberon was never standardized, and
>> even ISO Modula-2 (1996) was quite big (vs. PIM3)
>
> Oops, forgot to mention the massive popularity of Delphi/FreePascal,
> Java, C#, and Objective C. Yeah, I guess you already noticed that (hi
> Gautier!). In other words, it's a very fractured world. Oh well,
> variety is the spice of life!

One of the annoyances about the alternate Wirth type languages is
that they have some nice features which make writing safe code easier,
but they, unlike Ada, don't appear to be targetted for hard real time
bare metal environments.

Ada runs just fine on the Atmel AVR and, when used under RTEMS, can be
made to run on a ARM board if you are willing to write a BSP.

GNU Modula-2 looks like (maybe) a possible candidate if you only want a
basic set of language capabilities, but I find it's upper case keywords
to be really ugly.

Oberon has some talk about running on a NXP MCU, but I could not find
any mention of it's real time characteristics (it uses garbage collection),
it's footprint or porting effort involved or which of it's several
variants would be best for exploring further. I did find mention of a
port to the AVR, but that appears to have been a one-off effort.

Has anyone used any of the other Wirth type languages in a bare metal
environment and how did they compare to Ada ?

Thanks,

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-09  9:02       ` Ludovic Brenta
@ 2012-02-09 16:47         ` Yannick Duchêne (Hibou57)
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2012-02-09 16:47 UTC (permalink / raw)


Le Thu, 09 Feb 2012 10:02:43 +0100, Ludovic Brenta  
<ludovic@ludovic-brenta.org> a écrit:
> Actually this is a rendition of a post here on comp.lang.ada 16 years
> ago:
>
> http://groups.google.com/group/comp.lang.modula3/browse_thread/thread/f07b9c63c348974b/6c76347a49e42768?lnk=gst&q=Ada+versus+Modula3#6c76347a49e42768
>
> The entire thread is interesting.
Yes, interesting (still readin).

An interesting quote among other interesting replies.

> When reviewing design tradeoffs of any artifact, I think it is alwaysa  
> good question to ask "At what cost?". I think we should also askthis  
> question in review of Ada95 and Modula-3's designs. At what costsdo they  
> achieve their results?If a design is simple, we must ask, at what cost  
> have the designersachieved this? Does the design miss some important  
> uses to be expectedfrom the artifact? Does the design specify enough?If  
> a design incorporates many features, then we must ask again, atwhat cost  
> was this achieved? How many pages are the specifications?How compliant  
> are the implementations to the full specification?  Isthe design  
> overspecified?Looking at the design for Modula-3, I'd say that the  
> designers aimedat simplicity, safety, and completeness in *that order*.  
> From what Iknow about Ada, its design tends to follow the opposite order.

He finished with this, but when he say “simpler”, keep in mind what he  
said above about the cost and order of aspects.

> I thinkthe difference in the languages reflects this point more than  
> anythingelse: Modula-3 achieves Ada95's (or C++'s) power with a  
> definitionthat is about *an order of magnitude* simpler.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-09 13:12       ` Simon Clubley
@ 2012-02-09 19:39         ` Rugxulo
  2012-02-10 13:25           ` Simon Clubley
  0 siblings, 1 reply; 14+ messages in thread
From: Rugxulo @ 2012-02-09 19:39 UTC (permalink / raw)


Hi,

On Feb 9, 7:12 am, Simon Clubley <clubley@remove_me.eisner.decus.org-
Earth.UFP> wrote:
>
> One of the annoyances about the alternate Wirth type languages is
> that they have some nice features which make writing safe code easier,
> but they, unlike Ada, don't appear to be targetted for hard real time
> bare metal environments.

Modula-2 was used to write MeDos and all the apps for the Lilith
machine. Oberon was used for the Oberon (Ceres) system and ports.
Modula-3 was (unofficially) used for SPIN OS, esp. since it was
designed to optionally permit "UNSAFE" code and "UNTRACED" references
(temporarily disable garbage collection).

> Ada runs just fine on the Atmel AVR and, when used under RTEMS, can be
> made to run on a ARM board if you are willing to write a BSP.
>
> GNU Modula-2 looks like (maybe) a possible candidate if you only want a
> basic set of language capabilities, but I find it's upper case keywords
> to be really ugly.

I hear that a lot, but you shouldn't judge a language by its syntax. A
good text editor (e.g. Emacs) or simple script can alleviate simple
things like that.

GM2 handles quite a lot, IMO, but I guess your mileage may vary. No
language can do it all. Though I vaguely remember hearing about AVR
stuff ... (quick search) ... check here:

http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/gm2-avr.html

> Oberon has some talk about running on a NXP MCU, but I could not find
> any mention of it's real time characteristics (it uses garbage collection),
> it's footprint or porting effort involved or which of it's several
> variants would be best for exploring further. I did find mention of a
> port to the AVR, but that appears to have been a one-off effort.

You should check out CFBSoftware's website. Also he's one of the only
ones still posting in comp.lang.oberon. He does embedded stuff
primarily with the Oberon-07 dialect. For him it's apparently good
enough. For desktop stuff, I think he uses the Component Pascal [sic]
[Oberon] dialect with .NET runtime.

http://www.cfbsoftware.com/default.aspx
http://www.astrobe.com/default.htm

> Has anyone used any of the other Wirth type languages in a bare metal
> environment and how did they compare to Ada ?

Honestly, they're all nice languages (though I'm very inexperienced),
but I don't see how you plan to gain anything over Ada. This may sound
silly, but they're all probably good enough for most things. They've
all been around the block, so to speak.



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

* Re: Ada compiler using a M2 compiler as back-end
  2012-02-09 19:39         ` Rugxulo
@ 2012-02-10 13:25           ` Simon Clubley
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Clubley @ 2012-02-10 13:25 UTC (permalink / raw)


On 2012-02-09, Rugxulo <rugxulo@gmail.com> wrote:
>
> You should check out CFBSoftware's website. Also he's one of the only
> ones still posting in comp.lang.oberon. He does embedded stuff
> primarily with the Oberon-07 dialect. For him it's apparently good
> enough. For desktop stuff, I think he uses the Component Pascal [sic]
> [Oberon] dialect with .NET runtime.
>

Thanks for a pointer to a specific dialect.

>
> Honestly, they're all nice languages (though I'm very inexperienced),
> but I don't see how you plan to gain anything over Ada. This may sound
> silly, but they're all probably good enough for most things. They've
> all been around the block, so to speak.

Yes, I know, but every so often, I like to check out what other real time
capable safety based languages are available for embedded programming.

I haven't really found anything better than Ada, but I like to be aware
of what is out there in case there are better options I am missing.

I also like to have options in case, for example, the FSF GCC Ada tree
does not continue to be as maintained as it is now or if anything else
happens.

[Before I am criticised for that comment :-), there are a couple of
pre-emptive comments I would like to make. A decade ago, it was possible
to run a freely available GCC Ada build, supplied by ACT, on VMS. Those
kits are now available to customers only (as is perfectly legal under
the GPL).

As this is VMS, it's not a matter of just downloading the public FSF
kits and building them. I tried a few years ago; it didn't work but
I had no problems building them on a variety of Unix type environments,
both native and cross-compiled embedded.

There's also the fact the GtkAda license suddenly changed overnight
from GMGPL to GPL (which once again ACT are perfectly entitled to do).

Those experiences made me aware that it's better to be prepared in
case something else suddenly happens.]

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



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

end of thread, other threads:[~2012-02-10 13:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-08  3:29 Ada compiler using a M2 compiler as back-end Gautier write-only
2012-02-08  5:05 ` Yannick Duchêne (Hibou57)
2012-02-08 14:11   ` Simon Clubley
2012-02-08 15:05     ` Yannick Duchêne (Hibou57)
2012-02-09  9:02       ` Ludovic Brenta
2012-02-09 16:47         ` Yannick Duchêne (Hibou57)
2012-02-09 10:48     ` Gautier write-only
2012-02-09  9:57   ` Rugxulo
2012-02-09 10:03     ` Rugxulo
2012-02-09 13:12       ` Simon Clubley
2012-02-09 19:39         ` Rugxulo
2012-02-10 13:25           ` Simon Clubley
2012-02-09  2:35 ` Shark8
2012-02-09  3:46 ` Randy Brukardt

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