comp.lang.ada
 help / color / mirror / Atom feed
* GNAT verses A# for soft-realtime system
@ 2007-04-07 22:38 Chip and Allie Orange
  2007-04-08  0:29 ` Jeffrey R. Carter
  2007-04-08  7:58 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 12+ messages in thread
From: Chip and Allie Orange @ 2007-04-07 22:38 UTC (permalink / raw)


Hi all,

I have a computer science degree from many years back, but have worked in 
system admin and database programming mostly since.

I now have an opportunity for a hobby project combining two of my interests 
that I've always wanted to explore: learning Ada and programming a robot.

I can purchase a Windows-based PC robot for $5k, and I'd like to learn to 
program it to do autonomous functions (including realtime image analysis).

I have a choice of GNAT or A# for my programming environment.

I don't know much about any of this, but especially about the limitations of 
A#.  I'm also concerned if over-all, the A#/.net environment would yield 
significantly slower code, as this is a low-power processor on a mini-itx 
MB, and so CPU cycles are likely to be at a premium.

At this point I could use some advice on which Ada to use.  There's some 
advantage in my using the .net environment in that some software I'd like to 
use is available as .net controls.  On the other hand, some open source 
software such as ImageMagic and FANN are available as standard Windows DLLs, 
and might be harder to work with from .net.  I'm not sure if the Ada 
standard implemented by A# is as up-to-date as that of GNAT (GNAT seems to 
have more support, even for the free version).

Thanks for any information/help.

    Chip Orange






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

* Re: GNAT verses A# for soft-realtime system
  2007-04-07 22:38 GNAT verses A# for soft-realtime system Chip and Allie Orange
@ 2007-04-08  0:29 ` Jeffrey R. Carter
  2007-04-08 15:11   ` Chip and Allie Orange
  2007-04-08  7:58 ` Dmitry A. Kazakov
  1 sibling, 1 reply; 12+ messages in thread
From: Jeffrey R. Carter @ 2007-04-08  0:29 UTC (permalink / raw)


Chip and Allie Orange wrote:
> 
> I can purchase a Windows-based PC robot for $5k, and I'd like to learn to 
> program it to do autonomous functions (including realtime image analysis).
> 
> I have a choice of GNAT or A# for my programming environment.

A# is a version of GNAT that targets .net.

If you're willing to pay $5k for your robot, you might be willing to pay 
10% or less of that for a supported compiler. AdaCore doesn't provide 
anything in that price range, but both Aonix and RR SW do.

Whether you go with a supported compiler, or with a free version of GNAT 
(including A#), you have a couple of decisions to make. One is which 
version of Ada you want to use. Only GNAT GPL implements most of the 
most recent version; A# and the commercial compilers implement Ada 95.

The other is the target platform you want to use. Apparently you have a 
Windows target but could also use .net on top of that. Using .net would 
constrain you to A#.

These are not decisions we can make for you. GNAT GPL has some errors in 
the new features, but if you're interested in learning the new version 
of Ada, that might be the way you want to go. If you'd rather have 
support and Ada 95 is acceptable, a commercial compiler would probably 
be your choice. If you'd like to use existing .net SW, A# would be the 
way to go.

-- 
Jeff Carter
"Gentlemen, you can't fight in here. This is the War Room!"
Dr. Strangelove
30



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

* Re: GNAT verses A# for soft-realtime system
  2007-04-07 22:38 GNAT verses A# for soft-realtime system Chip and Allie Orange
  2007-04-08  0:29 ` Jeffrey R. Carter
@ 2007-04-08  7:58 ` Dmitry A. Kazakov
  2007-04-08 13:46   ` Pascal Obry
                     ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Dmitry A. Kazakov @ 2007-04-08  7:58 UTC (permalink / raw)


On Sat, 7 Apr 2007 18:38:56 -0400, Chip and Allie Orange wrote:

> I have a computer science degree from many years back, but have worked in 
> system admin and database programming mostly since.
> 
> I now have an opportunity for a hobby project combining two of my interests 
> that I've always wanted to explore: learning Ada and programming a robot.

Greetings!

> I can purchase a Windows-based PC robot for $5k, and I'd like to learn to 
> program it to do autonomous functions (including realtime image analysis).

Great, I always wished to do something like that to play with my machine
learning project pending.

What does it mean "Windows-based PC"? Is it a sort of PC104 module running
Windows [CE] or a full-blown PC? How are sensors and actuators connected?
Does it have Ethernet controller [I wouldn't even try without one]? Does it
have a frame grabber for the camera[s]?

Usually the biggest problem is not to choose the compiler. For a hobby
there is no choice but [GPL] GNAT.

The problem is to get a fully functional Ada run-time for the board you are
using, plus the drivers for the sensors and actuators, plus TCP/IP stack
for communication with the outer world. For a Windows platform there should
be no trouble with this, except that drivers and APIs for sensors and
actuators. Often vendor's C libraries are extremely poor in quality.

> I have a choice of GNAT or A# for my programming environment.

I am sceptical about NET target. Theoretically using Ada should make you
independent on whether it be A# or not, but practically I doubt that A#
scales, especially for image processing. BTW, Ada is great for image
processing. I worked on industrial image processing projects in Ada and it
saved us a lot of time, because debugging is quite close to impossible when
you are working with images, and you know, Ada is about safety.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08  7:58 ` Dmitry A. Kazakov
@ 2007-04-08 13:46   ` Pascal Obry
  2007-04-09 16:08     ` Georg Bauhaus
  2007-04-08 15:55   ` Chip and Allie Orange
  2007-04-09 16:13   ` Georg Bauhaus
  2 siblings, 1 reply; 12+ messages in thread
From: Pascal Obry @ 2007-04-08 13:46 UTC (permalink / raw)
  To: mailbox

Dmitry A. Kazakov a �crit :
> I am sceptical about NET target. Theoretically using Ada should make you
> independent on whether it be A# or not, but practically I doubt that A#
> scales, especially for image processing. BTW, Ada is great for image

Don't know what you have in mind here, but remember on the .Net platform
*nothing* is interpreted. That is, only natively compiled code is run on
.Net, so performance wise there is no speed penalty (this is quite
different than the JVM, in this regard I think Microsoft did a better job).

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08  0:29 ` Jeffrey R. Carter
@ 2007-04-08 15:11   ` Chip and Allie Orange
  2007-04-08 18:04     ` Jeffrey R. Carter
  2007-04-09 11:46     ` Rob Veenker
  0 siblings, 2 replies; 12+ messages in thread
From: Chip and Allie Orange @ 2007-04-08 15:11 UTC (permalink / raw)



"Jeffrey R. Carter" <jrcarter@acm.org> wrote in message 
news:2IWRh.39480$_c5.25338@attbi_s22...
> Chip and Allie Orange wrote:
>>
>> I can purchase a Windows-based PC robot for $5k, and I'd like to learn to 
>> program it to do autonomous functions (including realtime image 
>> analysis).
>>
>> I have a choice of GNAT or A# for my programming environment.
>
> A# is a version of GNAT that targets .net.
>
> If you're willing to pay $5k for your robot, you might be willing to pay 
> 10% or less of that for a supported compiler. AdaCore doesn't provide 
> anything in that price range, but both Aonix and RR SW do.
>
> Whether you go with a supported compiler, or with a free version of GNAT 
> (including A#), you have a couple of decisions to make. One is which 
> version of Ada you want to use. Only GNAT GPL implements most of the most 
> recent version; A# and the commercial compilers implement Ada 95.
>
> The other is the target platform you want to use. Apparently you have a 
> Windows target but could also use .net on top of that. Using .net would 
> constrain you to A#.
>
> These are not decisions we can make for you. GNAT GPL has some errors in 
> the new features, but if you're interested in learning the new version of 
> Ada, that might be the way you want to go. If you'd rather have support 
> and Ada 95 is acceptable, a commercial compiler would probably be your 
> choice. If you'd like to use existing .net SW, A# would be the way to go.
>


Thanks Jeff.

I am constrained by an NDA from saying why .net offers me some advantages, 
but it does.

You've helped answer one of my questions, in that I now understand A# is 
Ada95, while GNAT/GPL is Ada2005.  I was interested in Ada2005, as long as 
I'm bothering to throw my time and money into this.

My question was also, does .net have something about it that makes it a poor 
environment for soft real-time systems?  Especially, does it produce code 
that's noticeably slow, or that garbage collects in some way that would make 
it less than desirable for real-time systems with very limited CPU 
resources?

Do the additional features of 2005 target real-time systems?

Finally, are the products from compiler vendors (Aionix and RR) that much 
better than GNAT/GPL?

Thanks again.

Chip






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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08  7:58 ` Dmitry A. Kazakov
  2007-04-08 13:46   ` Pascal Obry
@ 2007-04-08 15:55   ` Chip and Allie Orange
  2007-04-09 16:13   ` Georg Bauhaus
  2 siblings, 0 replies; 12+ messages in thread
From: Chip and Allie Orange @ 2007-04-08 15:55 UTC (permalink / raw)


Hi Dmitry,


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:cw3lptya4i66$.1osehyxuh7vi3.dlg@40tude.net...

...

>
> Great, I always wished to do something like that to play with my machine
> learning project pending.
>
> What does it mean "Windows-based PC"? Is it a sort of PC104 module running
> Windows [CE] or a full-blown PC? How are sensors and actuators connected?

It's a full-blown pc, running Windows, mounted in a frame with rechargeable 
batteries, two differential drive wheels, a host of empty drive bays for 
your own expansion, a webcam, and a smattering of IR ranging and bumper 
sensors.

Check out:

http://www.whiteboxrobotics.com/2006/PCBOTs/914PC_BOT.htm
and
http://www.914pcbots.com/wiki/doku.php
and
http://www.914pcbots.com/community/

It started life as mostly a mobile webcam platform.  In my discussions with 
the president of Frontline Robotics I've tried to convince him there's a 
large market of enthusiast programmers who'd like to tackle autonomous robot 
control programming if he would release the specs and/or the needed tools. 
I'm also trying to get him to offer a version with a dual core processor and 
more memory, as I suspect there will *never* be enough processing resources 
to suit those of us who want to tackle this.  Of course, there's  nothing 
but money and know-how stopping me from replacing the Epia MB with a more 
powerful mini-itx one.


> Does it have Ethernet controller [I wouldn't even try without one]?

Yes, WIFI and I think wired.


> Does it > have a frame grabber for the camera[s]?

I think so, that's supplied by Logitec, and is a question I'll need to 
research.

>
> Usually the biggest problem is not to choose the compiler. For a hobby
> there is no choice but [GPL] GNAT.
>
> The problem is to get a fully functional Ada run-time for the board you 
> are
> using, plus the drivers for the sensors and actuators, plus TCP/IP stack
> for communication with the outer world. For a Windows platform there 
> should
> be no trouble with this, except that drivers and APIs for sensors and
> actuators. Often vendor's C libraries are extremely poor in quality.



These are a board provided by PMD( http://www.pmdcorp.com/ ) , and according 
to another hobbyist, there's open source software which already tackles 
control of it; see:

http://www.914pcbots.com/wiki/doku.php?id=whiteboxos


I have reasons for wanting to use .net for development, unless the Ada 2005 
features that it lacks turn out to be important for what I want to do; could 
you make a guess on that?

Thanks.

Chip






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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08 15:11   ` Chip and Allie Orange
@ 2007-04-08 18:04     ` Jeffrey R. Carter
  2007-04-10 21:52       ` Robert A Duff
  2007-04-09 11:46     ` Rob Veenker
  1 sibling, 1 reply; 12+ messages in thread
From: Jeffrey R. Carter @ 2007-04-08 18:04 UTC (permalink / raw)


Chip and Allie Orange wrote:
> 
> My question was also, does .net have something about it that makes it a poor 
> environment for soft real-time systems?  Especially, does it produce code 
> that's noticeably slow, or that garbage collects in some way that would make 
> it less than desirable for real-time systems with very limited CPU 
> resources?

I have no experience with .net, so I cannot say. I understand that it 
includes garbage collection, so the usual caveats about using garbage 
collection in timing-critical SW would seem to apply.

> Do the additional features of 2005 target real-time systems?

Some do; some don't. In the former category, there are task-termination 
handlers, interfaces that must be implemented by tasks or protected 
objects, and timing events and handlers, among others.

> Finally, are the products from compiler vendors (Aionix and RR) that much 
> better than GNAT/GPL?

It depends on how you define "that much better". GNAT GPL is based on a 
mature Ada-95 compiler, but implements most of the new version. The 
commercial compilers are Ada-95 compilers. If you restrict yourself to 
unchanged Ada-95 features, then they're probably comparable. Otherwise, 
you're comparing apples to pears. GNAT GPL has a number of known errors 
in the new features; the commercial compilers don't have the new 
features. You have to work around the errors in GNAT GPL; you're 
unlikely to encounter that with a supported compiler.

-- 
Jeff Carter
"Go and boil your bottoms."
Monty Python & the Holy Grail
01



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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08 15:11   ` Chip and Allie Orange
  2007-04-08 18:04     ` Jeffrey R. Carter
@ 2007-04-09 11:46     ` Rob Veenker
  2007-04-09 17:44       ` Chip Orange
  1 sibling, 1 reply; 12+ messages in thread
From: Rob Veenker @ 2007-04-09 11:46 UTC (permalink / raw)


Chip and Allie Orange wrote:

> 
> "Jeffrey R. Carter" <jrcarter@acm.org> wrote in message
> news:2IWRh.39480$_c5.25338@attbi_s22...
>> Chip and Allie Orange wrote:
>>>
>>> I can purchase a Windows-based PC robot for $5k, and I'd like to learn
>>> to program it to do autonomous functions (including realtime image
>>> analysis).
>>>
>>> I have a choice of GNAT or A# for my programming environment.
>>
>> A# is a version of GNAT that targets .net.
>>
>> If you're willing to pay $5k for your robot, you might be willing to pay
>> 10% or less of that for a supported compiler. AdaCore doesn't provide
>> anything in that price range, but both Aonix and RR SW do.
>>
>> Whether you go with a supported compiler, or with a free version of GNAT
>> (including A#), you have a couple of decisions to make. One is which
>> version of Ada you want to use. Only GNAT GPL implements most of the most
>> recent version; A# and the commercial compilers implement Ada 95.
>>
>> The other is the target platform you want to use. Apparently you have a
>> Windows target but could also use .net on top of that. Using .net would
>> constrain you to A#.
>>
>> These are not decisions we can make for you. GNAT GPL has some errors in
>> the new features, but if you're interested in learning the new version of
>> Ada, that might be the way you want to go. If you'd rather have support
>> and Ada 95 is acceptable, a commercial compiler would probably be your
>> choice. If you'd like to use existing .net SW, A# would be the way to go.
>>
> 
> 
> Thanks Jeff.
> 
> I am constrained by an NDA from saying why .net offers me some advantages,
> but it does.
> 
> You've helped answer one of my questions, in that I now understand A# is
> Ada95, while GNAT/GPL is Ada2005.  I was interested in Ada2005, as long as
> I'm bothering to throw my time and money into this.
> 
> My question was also, does .net have something about it that makes it a
> poor
> environment for soft real-time systems?  Especially, does it produce code
> that's noticeably slow, or that garbage collects in some way that would
> make it less than desirable for real-time systems with very limited CPU
> resources?
> 
> Do the additional features of 2005 target real-time systems?
> 
> Finally, are the products from compiler vendors (Aionix and RR) that much
> better than GNAT/GPL?
> 
> Thanks again.
> 
> Chip

You may want to take a look at
http://www.adacore.com/wp-content/files/attachments/adacore_news_1106_web.pdf


regards,

Rob Veenker



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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08 13:46   ` Pascal Obry
@ 2007-04-09 16:08     ` Georg Bauhaus
  0 siblings, 0 replies; 12+ messages in thread
From: Georg Bauhaus @ 2007-04-09 16:08 UTC (permalink / raw)


On Sun, 2007-04-08 at 15:46 +0200, Pascal Obry wrote:
> Dmitry A. Kazakov a écrit :
> > I am sceptical about NET target. Theoretically using Ada should make you
> > independent on whether it be A# or not, but practically I doubt that A#
> > scales, especially for image processing. BTW, Ada is great for image
> 
> Don't know what you have in mind here, but remember on the .Net platform
> *nothing* is interpreted. That is, only natively compiled code is run on
> .Net, so performance wise there is no speed penalty

Of course, anything incurred by translating from MSIL to native
code may improve or degrade performance when compared to code
which is directly optimized from source to target architecture
taking advantage of more information available at the source level
(if any).

> (this is quite
> different than the JVM, in this regard I think Microsoft did a better job).

You can measure a JIT compiler's worth by running a JVM program in
a loop and watch the first 200 runs or so. Quite impressive.





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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08  7:58 ` Dmitry A. Kazakov
  2007-04-08 13:46   ` Pascal Obry
  2007-04-08 15:55   ` Chip and Allie Orange
@ 2007-04-09 16:13   ` Georg Bauhaus
  2 siblings, 0 replies; 12+ messages in thread
From: Georg Bauhaus @ 2007-04-09 16:13 UTC (permalink / raw)


On Sun, 2007-04-08 at 09:58 +0200, Dmitry A. Kazakov wrote:
> . For a hobby
> there is no choice but [GPL] GNAT.

The Aonix ObjectAda special edition isn't that bad either.
And it costs the same. It should still be available on the
net.





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

* Re: GNAT verses A# for soft-realtime system
  2007-04-09 11:46     ` Rob Veenker
@ 2007-04-09 17:44       ` Chip Orange
  0 siblings, 0 replies; 12+ messages in thread
From: Chip Orange @ 2007-04-09 17:44 UTC (permalink / raw)



"Rob Veenker" <veenker@xs4all.nl> wrote in message 
news:461a279f$0$79139$e4fe514c@news.xs4all.nl...
> Chip and Allie Orange wrote:
>
>>
>> "Jeffrey R. Carter" <jrcarter@acm.org> wrote in message
>> news:2IWRh.39480$_c5.25338@attbi_s22...
>>> Chip and Allie Orange wrote:
>>>>
>>>> I can purchase a Windows-based PC robot for $5k, and I'd like to learn
>>>> to program it to do autonomous functions (including realtime image
>>>> analysis).
>>>>
>>>> I have a choice of GNAT or A# for my programming environment.
>>>
>>> A# is a version of GNAT that targets .net.
>>>
>>> If you're willing to pay $5k for your robot, you might be willing to pay
>>> 10% or less of that for a supported compiler. AdaCore doesn't provide
>>> anything in that price range, but both Aonix and RR SW do.
>>>
>>> Whether you go with a supported compiler, or with a free version of GNAT
>>> (including A#), you have a couple of decisions to make. One is which
>>> version of Ada you want to use. Only GNAT GPL implements most of the 
>>> most
>>> recent version; A# and the commercial compilers implement Ada 95.
>>>
>>> The other is the target platform you want to use. Apparently you have a
>>> Windows target but could also use .net on top of that. Using .net would
>>> constrain you to A#.
>>>
>>> These are not decisions we can make for you. GNAT GPL has some errors in
>>> the new features, but if you're interested in learning the new version 
>>> of
>>> Ada, that might be the way you want to go. If you'd rather have support
>>> and Ada 95 is acceptable, a commercial compiler would probably be your
>>> choice. If you'd like to use existing .net SW, A# would be the way to 
>>> go.
>>>
>>
>>
>> Thanks Jeff.
>>
>> I am constrained by an NDA from saying why .net offers me some 
>> advantages,
>> but it does.
>>
>> You've helped answer one of my questions, in that I now understand A# is
>> Ada95, while GNAT/GPL is Ada2005.  I was interested in Ada2005, as long 
>> as
>> I'm bothering to throw my time and money into this.
>>
>> My question was also, does .net have something about it that makes it a
>> poor
>> environment for soft real-time systems?  Especially, does it produce code
>> that's noticeably slow, or that garbage collects in some way that would
>> make it less than desirable for real-time systems with very limited CPU
>> resources?
>>
>> Do the additional features of 2005 target real-time systems?
>>
>> Finally, are the products from compiler vendors (Aionix and RR) that much
>> better than GNAT/GPL?
>>
>> Thanks again.
>>
>> Chip
>
> You may want to take a look at
> http://www.adacore.com/wp-content/files/attachments/adacore_news_1106_web.pdf
>


Thank you Rob.  This obviously makes GNAT/Pro attractive to me, but as a 
hobbyist, is there a version that I could reasonably afford?  Or, will these 
features planned for GNAT/Pro also be available in GNAT/GPL?

I'm not quite clear on pricing, or if there are differences in the feature 
set of the two versions of GNAT?  I believe GNAT/Pro buys you support, but 
I'm not sure if it buys you a different compiler or not?

Thanks again,

Chip






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

* Re: GNAT verses A# for soft-realtime system
  2007-04-08 18:04     ` Jeffrey R. Carter
@ 2007-04-10 21:52       ` Robert A Duff
  0 siblings, 0 replies; 12+ messages in thread
From: Robert A Duff @ 2007-04-10 21:52 UTC (permalink / raw)


"Jeffrey R. Carter" <jrcarter@acm.org> writes:

> Chip and Allie Orange wrote:
>> Do the additional features of 2005 target real-time systems?
>
> Some do; some don't. In the former category, there are task-termination
> handlers, interfaces that must be implemented by tasks or protected
> objects, and timing events and handlers, among others.

I'd say that some Ada 2005 features are specifically for real-time
systems, and most of the rest are generally applicable (i.e. useful for
both real-time and not-real-time).

- Bob




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

end of thread, other threads:[~2007-04-10 21:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-07 22:38 GNAT verses A# for soft-realtime system Chip and Allie Orange
2007-04-08  0:29 ` Jeffrey R. Carter
2007-04-08 15:11   ` Chip and Allie Orange
2007-04-08 18:04     ` Jeffrey R. Carter
2007-04-10 21:52       ` Robert A Duff
2007-04-09 11:46     ` Rob Veenker
2007-04-09 17:44       ` Chip Orange
2007-04-08  7:58 ` Dmitry A. Kazakov
2007-04-08 13:46   ` Pascal Obry
2007-04-09 16:08     ` Georg Bauhaus
2007-04-08 15:55   ` Chip and Allie Orange
2007-04-09 16:13   ` Georg Bauhaus

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