comp.lang.ada
 help / color / mirror / Atom feed
* Re: ada and robots
@ 1997-06-05  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  1997-06-09  0:00 ` Jerry Petrey
  0 siblings, 1 reply; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-05  0:00 UTC (permalink / raw)



Joe Gwinn <gwinn@RES.RAY.COM> writes:
>In practice, C was much more successful than Ada83 at riding metal.
>Experience with Ada83 shows that it is very bad at direct control of
>hardware, especially I/O hardware, and simply does not handle shared
>memory correctly.  Ada95 is claimed to be better, but I don't have any
>direct experience with it.  Actually, not many people do just yet.  I
>suspect that most people are using C (perhaps called from Ada) for direct
>control of I/O hardware and the like.
>
    Maybe with some of the early generation compilers, but we've been
    "riding the metal" for years here in Ada and never had any trouble
    getting direct control over the hardware. Oh sure, once in a while
    you've got to dip into assembler to get at some real hardware
    specific feature, but that's true of *any* language and at least
    Ada specifies a way you can get at machine instructions without
    leaving the compiler.

    Not sure what the problem is you refer to with shared memory, but
    lots of embedded applications never use any shared memory.
    (Between processors? DMA devices? Shared between tasks?) If you
    mean shared between tasks, then Ada95 certainly did improve things
    with protected types, but I as yet have no practical real-time
    experience using protected types to point to as proof that it
    works well. I don't know why it wouldn't. But then, as I recall
    from my C programming days, C had neither any concept of tasks nor
    of shared memory between tasks, which left you "rolling your own"
    if you were multi-threading & sharing memory. If you had to "roll
    your own" in C, why would Ada be fundamentally any worse?

>Most "Ada systems" I have seen built recently are actually mixed-language
>systems, being a mix of C, C++, and Ada, with the Ada being in the
>minority (maybe 25%), if one counts all the purchased COTS code in the
>system.  Typically, the operating system, middleware, and GUI stuff are
>all in C, and the application code is mostly in Ada (with C bindings, and
>no Ada runtime).
>
    This might be true of someone developing under Motif or WindowsNT
    where you have a huge body of code someone else wrote in C that
    you're utilizing. But as I recall, the original post was about
    embedded microcontrollers for robotics and here there is no OS
    except what you build for yourself. (also very little GUI :-) Most
    of the Ada work I've done for either embedded systems or apps
    running under an OS have been 99% Ada and 1% other stuff. I may
    not be "typical" but my experience is that people usually pick a
    language for their app and build from there. The exception being
    if you've inherited some body of software you're trying to glue
    together with other stuff.

>I would also comment that DoD's recent recinding of the Ada Mandate will
>likely cause the Ada compiler and tools market to shrink to perhaps as
>little as one tenth of its prior size, and that significant added
>investment in Ada compilers and tools is therefore unlikely, at least
>until the size of the remaining market becomes clear.  A significant
>shrink is widely expected because the many DoD customers who chose Ada
>because of the mandate will now immediately vanish, and DoD's big push
>towards COTS is in effect a push to C/C++.  The Ada market used to be at
>most one tenth the size of the C market, and things took forever to get to
>the Ada world.  Now, it will be one hundredth.  So, if something Ada is
>not in hand today, don't wait.  It could be a long time coming.
>
    Mandate? We don' have no Mandate! We don' need no steenkin'
    Mandate!!! :-)

    I think this is a sort of self fulfilling prophecy. If Ada is
    technically better, it ought to get fair consideration. (I believe
    it is.) The availability of high quality compilers at reasonable
    cost for a large number of platforms tends to limit any business
    or practical objections to its use. The only case I can see for
    using C in a given app (especially embedded!) is that you can't
    find an adequate Ada environment for the target.

    I believe that if we go out and "Just Do It!" instead of having
    C++ envy, Ada can end up widely successful. Remember that C
    basically sat on the shelf for *years* as a niche language while
    people built stuff out of Fortran, Cobol, assembler, etc. It was
    only recently in its history that it gained any widespread
    popularity.

    MDC

Marin David Condic, Senior Computer Engineer    ATT:        561.796.8997
Pratt & Whitney, GESP                           Fax:        561.796.4669
West Palm Beach, FL                             Internet:   CONDICMA@PWFL.COM
===============================================================================
    "Having an open mind is nothing. The object of opening the mind, as
    of opening the mouth, is to shut it again on something solid."

        --  G.K. Chesterton
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: Ada and robots
@ 1997-07-02  0:00 Huy Vo
  1997-07-04  0:00 ` Richard A. O'Keefe
  0 siblings, 1 reply; 132+ messages in thread
From: Huy Vo @ 1997-07-02  0:00 UTC (permalink / raw)



>Wes Groleau wrote:
>
>
>
> don't know a C compiler that doesn't have __LINE__. Do you?
> > >Yes, the LSI-11/02 and Turbo C++ 2.
> > I wouldn't worry much what a DEC compiler has to say.
>
> "Everybody's doing it...."  "DEC isn't"  "DEC doesn't count"
> Sounds like "What have the Romans ever done for us?" in _Life_of_Brian_
>

#include stdio.h

appears to be an acceptable form according  to Kernighan & Ritchie 2; I doubt
the standard will say otherwise. I stand corrected.




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: Ada and robots
@ 1997-07-01  0:00 Huy Vo
  1997-07-02  0:00 ` Wes Groleau
  0 siblings, 1 reply; 132+ messages in thread
From: Huy Vo @ 1997-07-01  0:00 UTC (permalink / raw)



aebrain@dynamite.com.au (Alan Brain) wrote
>
>Huy Vo wrote:
>
>> I don't know a C compiler that doesn't have __LINE__. Do you?
>
>DEC LSI-11/02 C for RTS-11SJ. The first time I did an embedded system in
>C, back in 1978.
>
>Turbo C++ 2.0 has problems with __LINE__ too, and I'll check with MVC++
>5 and CW 10, CW 12 to see if they give identical results.
>
>> Do you know of 2 compilers that will not agree on the value of __LINE__
>> in the  following program:
>
>> #include <stdio.h> /* since you insist on having this */
>>
>> main() {
>>         printf("the value of __LINE__ is independent of the compiler %d\n",
>>  __LINE__);
>>         return 0;
>> }
>
>Yes, the LSI-11/02 and Turbo C++ 2.
>


DEC has a compiler that accepts this line
include stdio.h      /* no brackets */
given the kind of liberty they allow the compiler to have,
I wouldn't worry much what a DEC compiler has to say.

I don't know where you digged out your copy of Turbo C;
mine (Turbo C 4.5.1 ) compiles __LINE__ without a blink; if your compiler had
 problem with __LINE__ then it's a bug, and not a portability issue.

The following compilers have  __LINE__:
Metaware Hi-C
Sun cc and Sun acc
gcc
AIX xlc
Microsoft 7.1
Mix Power C
That's 7 modern compilers againts your ancient DEC compiler.
I am sure the list is not exhaustive. If only 5 out of 10 Ada compilers
provided an mechanism equivalent to __LINE__, would you forget the portability
crap and use it, or are you  still saying "Gee, I can't use this functionality
because only half the compilers have it. I just have to hard code in the line
 number
to make my code portable." IMHO, if there is a worse thing than goto then it has
 to
be hard coded constants. You brought up the portability
issue, whereas I intended to use __LINE__ solely as a  method of debugging.




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: Ada and robots
@ 1997-06-30  0:00 Huy Vo
  1997-07-01  0:00 ` Alan Brain
  1997-07-02  0:00 ` Mattias Sj�sv�rd
  0 siblings, 2 replies; 132+ messages in thread
From: Huy Vo @ 1997-06-30  0:00 UTC (permalink / raw)



>In Ada-83,
>
>when STORAGE_ERROR =>
> PUT("Storage Error for Module: " & ModuleName & "  At line: ");
>  PUT(LineCount);
>   raise;
>
>   Naturally this means you must set variables ModuleName (a string) and
>   LineCount (a positive) in the code. You also need to have
>
>       with TEXT_IO; use TEXT_IO.
>
>       and
>
>        exception
>
>        somewheres. But as your C code didn't mention the #includes required
 for
>        the use of stderr, fprintf, and the non-portable definition of __LINE__
>        I think this is fair. Especially since the Ada is completely portable.
>
>        Oh yes, the "raise" statement doesn't just give a meaningless error
 code
>        (1), it tells the caller that this is a STORAGE_ERROR, and allows them
>        to use a different technique/algorithm that won't be so
>        memory-intensive.
>
Basically you have to hard code the line number in the code?
And everytime you add or delete something before that line, you change
that hard coded number again? __LINE__ is supposed preprocessed by
a program so the programmer doesn't have to count. As to portability,
I don't know a C compiler that doesn't have __LINE__. Do you?
Do you know of 2 compilers that will not agree on the value of __LINE__
in the  following program:


#include <stdio.h> /* since you insist on having this */

main() {
        printf("the value of __LINE__ is independent of the compiler %d\n",
 __LINE__);
        return 0;
}




^ permalink raw reply	[flat|nested] 132+ messages in thread
[parent not found: <867541382.23405@dejanews.com>]
* Re: Ada and robots
@ 1997-06-26  0:00 Huy Vo
  1997-06-27  0:00 ` Wes Groleau
                   ` (4 more replies)
  0 siblings, 5 replies; 132+ messages in thread
From: Huy Vo @ 1997-06-26  0:00 UTC (permalink / raw)



jsa@alexandria.organon.com (Jon S Anthony) wrote:

>In article <9706242128.AA09652@stealth.ctron.com> Huy Vo <vo@CTRON.COM> writes:
>
>> >a) No one is dumb enough to suggest Ada programs are by nature some
>> >how bug free.  So, you are just giving a silly strawman
>>
>> Cool; Ada is not as safe as I thought it was; so, when I board a Boeing
>> I should think twice.
>
>Whatever floats your boat.
>
>
>> As a C programmer, I know it better than anyone; so I have been
>> religiously checking every malloc()'s return and proceed
>> accordingly.  What do you do when you call new and new fails?
>
>Whatever is appropriate.
>
>> You rely on the runtime system telling you what line it fails?
>
>No.  All such stuff should be isolated with a non-lowlevel interface.
>Inside the implementation exception handler(s) take the appropriate
>action.  Outside, no one cares or needs to care.


Someone has to care, Jon. Because  if you dynamically  allocate memory
at 101 places in your 100K lines of code and only one of
the allocations failed, you really want to know which one failed.
As an application programmer what would you do? As a compiler writer
that has to provide a default handler for this type of situation
what would you do?

In C, it's as simple as

  if (!(cp =malloc(BIG_CHUNK)) {
    fprintf(stderr, "Buy some more ram, i died at line %d\n", __LINE__);
    exit(1);
   }

Show me your code.




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: Ada and robots
@ 1997-06-24  0:00 Huy Vo
  1997-06-25  0:00 ` Jon S Anthony
                   ` (4 more replies)
  0 siblings, 5 replies; 132+ messages in thread
From: Huy Vo @ 1997-06-24  0:00 UTC (permalink / raw)



jsa@alexandria.organon.com (Jon S Anthony) wrote:
>In article <199706201607.MAA01178@mermaid.ctron.com> Huy Vo <vo@CTRON.COM>
 writes:
>
>> >Um, this just means Ada _labels_ unchecked conversion as dangerous. In C
>> >it may be "simple", but it is NOT "safe". (Maybe you forgot a smiley?)
>> >
>> Safe or not safe, it looks like Ada programs can crash on the field like
>> a previous poster admitted. The worse thing is that it leaves no trace
>> as to what leads to the crash.  And other posters have to come up with
>> ugly 'C hacks'  to provide traceback of Ada programs. There goes the myth
>> that Ada programs need no debugging.
>
>a) No one is dumb enough to suggest Ada programs are by nature some
>how bug free.  So, you are just giving a silly strawman

Cool; Ada is not as safe as I thought it was; so, when I board a Boeing
I should think twice. By the way, aren't there components on a Boeing
that are based on 8 bit processors that can't take C let alone Ada.
So what is the justification of insisting on building supposedly
safe systems (the Boeing)  with a mix of safe components (Ada) and
unsafe ones (C and assembly)?

>
>b) Trace backs or not are _implementation_ dependent.  Plenty of C
>implementations have nothing to offer here either (put together with
>the fact that most have absolutely worthless compile time diagnostics
>and you have something that basically offers zero support).

As a C programmer, I know it better than anyone; so I have been
religiously checking every malloc()'s return and proceed accordingly.
What do you do when you call new and new fails? You rely on the runtime system
 telling
you what line it fails? Unlikely, since the runtime is not required to do this.
How many of you actually have a customized "out of memory" handler
that indicates what exactly the offending line?
Error checking is an attitude; it's not a feature of the language.

>
>c) In this particular case (fiddling with machine level
>representations) the most you can conclude from your "comment" is that
>neither has an advantage over the other, i.e., for this _particular_
>case, you claim that it's a wash.
>
>d) Even in HW interfacing there is a _lot_ more going on than the
>actual machine level fiddling.  This work invariably requires
>(implicitly or explicitly) higher level abstractions.
>
>e) No one is dumb enough to suggest C has high level abstraction
>capabilities such as found in Ada.

On the contrary, C constitutes the low level base for Ada programs,
the work horse, the "unsafe" layer (NT, UNIX, LINUX, etc...) without which
it's impossible to build "safe" applications. The lack of high level abstraction
doesn't hurt C a bit. C provides me with every component that made this post
possible: the editor, the operating system, the networking software/firmware.
I don't believe in C because everyone (well, almost) writes in C; I believe
in C because it works just fine for me.




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: Ada and robots
@ 1997-06-20  0:00 Huy Vo
  1997-06-23  0:00 ` Jon S Anthony
  0 siblings, 1 reply; 132+ messages in thread
From: Huy Vo @ 1997-06-20  0:00 UTC (permalink / raw)



>Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
>wrote
>Samuel Mize wrote:
>>
>> Note that I make some comments about the person Mr. Whiting quoted,
>> but none about Mr. Whiting.  Some quotations reformatted for length.
>>
>> Stephen Leake wrote:
>> >
>> > Matthew S. Whiting wrote:
>> >  ( second hand list of supposed Ada deficiencies )
>> ...
>> > > >*      Ada does not support discriminant unions (which are
>> ...
>> > This is precisely the Ada discriminant record:
>>
>> Ah, but you can't hand-code the discriminant values.  This makes it
>> harder to interface to existing C code, which of course makes C
>> fundamentally better.
>>
>Um, yes you can; that's what an enumeration representation clause is
>for; see RM13.4
>
>> Besides, you can't load the variable with one type and then read it
>> as another type.  In C it's simple and safe, while in Ada it requires
>> Unchecked_Conversion, which everyone knows is dangerous.
>
>Um, this just means Ada _labels_ unchecked conversion as dangerous. In C
>it may be "simple", but it is NOT "safe". (Maybe you forgot a smiley?)
>
Safe or not safe, it looks like Ada programs can crash on the field like
a previous poster admitted. The worse thing is that it leaves no trace
as to what leads to the crash.  And other posters have to come up with
ugly 'C hacks'  to provide traceback of Ada programs. There goes the myth
that Ada programs need no debugging.




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-19  0:00 Jon S Anthony
  1997-06-19  0:00 ` Brian Rogoff
  0 siblings, 1 reply; 132+ messages in thread
From: Jon S Anthony @ 1997-06-19  0:00 UTC (permalink / raw)



In article <Pine.SGI.3.95.970618125216.11737B-100000@shellx.best.com> Brian Rogoff <bpr@shellx.best.com> writes:

> PS: I bought that book when it came out, in 1991. I was trying to use it 
> with SGI's version of CFront 3.0. Templates, nested classes (which are not 
> as useful as Java's inner classes) and exceptions were unusable then, and 
> still so several years thereafter. 

It is rather amazing, isn't it.  BTW, I've completely given up on C++.
I think C still has its uses, but C++?  I don't think so.

/Jon

-- 
Jon Anthony
OMI, Belmont, MA 02178
617.484.3383
"Nightmares - Ha!  The way my life's been going lately,
 Who'd notice?"  -- Londo Mollari




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-16  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  1997-06-17  0:00 ` Joe Gwinn
  1997-06-21  0:00 ` Nick Roberts
  0 siblings, 2 replies; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-16  0:00 UTC (permalink / raw)



Joe Gwinn <gwinn@RES.RAY.COM> writes:
>
>As for Ada83 experience, I have (or know of) both old and new experience,
>and most Ada83 compilers were very difficult to use for direct hardware
>control.  I suppose one could have made them work, but why would you?  If
>it's that hard, it won't be reliable.  We often reverted to assembly code
>for the machine control bits, long before C was a true option.  (We did
>the same when the base language was Fortran or Pascal, for the same
>reasons.)
>
    Again, I would ask for some real nice specific example of "here's
    a block of C code which does XYZ which Ada can't do - or can't do
    easily". I ask because I *have* been programming in Ada(83) for a
    long time, right down to controlling very specific hardware and
    never once did I consider it any harder than in any other
    language. (Often easier, in many cases.) And BTW, *reliability* is
    probably *THE MOST IMPORTANT* concern in producing a control
    computer for a jet or rocket engine. My experience has told me
    that it is neither difficult, nor unreliable - depending, of
    course, on exactly how you go about it. (Anybody can make things
    difficult and unreliable in any language of choice by trying to do
    things the hard way or by bad design.)

>
>As for Ada83 and shared memory, the problem was that the Ada83 compilers
>all believed that only they changed memory, so it was OK to cache data
>items in CPU registers for long periods of time.  For the most part, there
>was no reliable (and portable) way to tell the compiler different, so we
>performed various dances to ensure that Ada83 never knew the whole truth.
>
    Ahhhhhh! *Now* I understand what the complaint about shared memory
    is all about. Ada83 provided "pragma SHARED" which would handle
    this, sort of. The semantics of this pragma were a little overly
    restrictive if all you wanted to do was force the compiler not to
    optimize the storage into a register. (So a solution did exist,
    but not necessarly the best possible solution.) Our compiler
    vendors typically supplied us with a "pragma VOLATILE" (which I
    think is now standard in Ada95) which told the compiler not to
    optimize the value in a register. It worked pretty much as
    expected and we've got no complaints.

    BTW: What exactly does C provide to keep this from happening? I
    don't recall it ever being something defined in "standard" C - and
    why should it be? "Standard" C never defined any sort of
    multi-tasking and so never needed any sort of mechanism to tell
    the compiler that a variable should not be retained in a register.
    Is there some sort of mechanism to do this? (I recall it had the
    ability to tell the compiler you would *like* to have a given
    variable allocated to a register - and maybe it did and maybe it
    didn't. But I don't recall any way of saying "don't allocate this
    to a register behind my back, please.")

    MDC

Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
    "You spend a billion here and a billion there. Sooner or later it
    adds up to real money."

        --  Everett Dirksen
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-16  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  0 siblings, 0 replies; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-16  0:00 UTC (permalink / raw)



>OBAda: I have some (small) sympathy with Joe Gwinn's position that some
>combinations of Ada83 compilers may have produced very different
>results. Imagine that you used a generic-sharing compiler orginally for a
>memory limited system, and then tried to port that code to a similar target
>that used expansion instead. Or tasking that mapped tasks to OS processes
>vs. run-time scheduling (and you want to do blocking IO in the tasks.)  One
>of the phrases I remember least fondly when trying to explain why some
>particular code was ill suited to a particular embedded
>compiler/runtime/target.
>        "But it runs just fine on our Vax using DEC Ada!"
>
    This may well be true, but I don't know how it could possibly be
    avoided. Whenever a language specifies a feature beyond a certain
    complexity, you're going to get a variety of different
    implementations which have inherent portability limits (especially
    in real-time where memory and/or time are limited resources.)

    For example: If Ada and C both specify some basic mathematical
    capability (C++ vs Integer'Succ(C)) you'd expect both statements
    to consume nearly the same amount of space/time on virtually any
    implementation (target hardware remaining the same). But the
    minute a language gives you something like "accept X do...", you
    can expect semantic behavior to be consistent, but space/time is
    going to be entirely dependent on what sort of tasking model
    underlies the support for the accept statement.

    I guess you could say that C solves the problem by never giving
    you anything very complex to use. So if you need the complex
    features, you've got to "roll your own" and in some cases this is
    going to be difficult to near impossible.

    I'd fault a compiler vendor for not selling semantically correct
    behavior, but I couldn't fault the vendor or the language just
    because a given feature may have multiple possible
    implementations, each with their own advantages and drawbacks.

    MDC

Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
    "You spend a billion here and a billion there. Sooner or later it
    adds up to real money."

        --  Everett Dirksen
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-12  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  0 siblings, 0 replies; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-12  0:00 UTC (permalink / raw)



Joe Gwinn <gwinn@RES.RAY.COM> writes:
>There is tons of such code available for free on the internet.  Just look
>for I/O drivers, such as for UNIX and VxWorks. VxWorks Board Support
>Packages are another example.
>
>Even C-coded I/O drivers and kernel initialization sequences resort to
>some assembly code.
>
>As for shared memory, look into the handling of driver comm pools, queues
>shared between tasks and also with ISRs.  And so on.
>
>For UNIX drivers, there are multiple books available on exactly how to
>write such drivers, all in C.  Most include (annotated) sample driver
>code.
>
>I would submit that there is ample evidence that C can be used for direct
>hardware control, and for shared memory.
>
>I would not claim that all who have tried such things have succeeded,
>regardless of language.  Many programmers couldn't write an I/O driver if
>their life depended on it.
>
    It seems that what your saying is that C has been used to develop
    code which exercises direct control of hardware and is able to
    implement shared memory data structures between threads. I don't
    think that anyone would doubt this.

    I think what I originally took exception to was the claim that Ada
    *can't* do these things. If I was trying to implement some
    extension to Unix, (a device driver, perhaps) I probably wouldn't
    spit into the wind by trying to do it in Ada (Given that the whole
    OS is written in C, all the support tools are C oriented and I
    wouldn't want to maintain one lonely little Ada module afloat in a
    Sea of C ;-) But that's a far cry from claiming that Ada is
    incapable of being used to write device drivers.

    I've written lots of code which implements interfaces to A/D
    converters, ISR's, discrete I/O, Mil-Std-1553 buses, UARTs,
    Manchester data links, etc, etc, etc. All in Ada(83). I've shared
    memory between tasks and between processors using Ada(83) (albeit,
    not using the "pragma SHARED" - but implementing what you'd have
    to do for yourself in C anyway - a semaphore or some hardware
    support for shared memory.). So it's a little hard to read "Ada
    can't be used down at the bare metal" when you know that you've
    been doing just that for years - and that it's not at all
    any more difficult than it would be in C.

    While I won't presume to speak for Dr. Dewar (I know he's pretty
    good at clarifying himself :-) I think its fair to say we'd both
    like to see an example of something you believe that C does in
    dealing with the bare machine that you feel would be difficult in
    Ada. I'll accept that there may be some things C does better than
    Ada, but I'd like to see an example.

    MDC

Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
    "You spend a billion here and a billion there. Sooner or later it
    adds up to real money."

        --  Everett Dirksen
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-09  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  0 siblings, 0 replies; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-09  0:00 UTC (permalink / raw)



dana@INDYWEB.NET writes:
>      A:  No, or at least not many.  It's hard to put an exact reason as
>to why but it is thought that these MCs are just "too small" in terms of
>address space etc to support a multitasking language/runtime.  Hello world
>generated by DDCI's sun cross 80386EX compiler is JUST under 16k with the
>non-tasking runtime.  I've seen similar performance from other Ada
>compilers.  The whole answer is much longer but has been discussed at
>length in this group.  Now, that being said, it is still worth a check of
>adahome to see what the vendors have.  I could be wrong.  It wouldn't be
>the first time:-)
>
    I've found a few microcontroller vendors out on the web which seem
    to have products that might fit the bill: Z-World
    (http://www.zworld.com/) who makes a Z180 based system, Micronix
    (http://www.agt.net/public/micronix/) with a 68HC11 based system
    and Claritech (http://www.claritech.demon.co.uk/) with a SH7032
    and a 68032 based system. All appear to have a C development
    environment available and all appear to be reasonably priced. It
    would seem to be cost effective to go this sort of route rather
    than trying to cobble together your own development system even if
    you could find an Ada compiler targeted to one of these chips.
    (Getting the generated code is only *part* of the problem. You've
    still got to get it loaded into the box, working with some
    reasonable monitor system, outputting symbols for a cross-platform
    debugger, etc, etc, etc. Do you *really* want to spend time doing
    that when you can buy the whole ball of wax for under $200?)

    Modern Ada compilers and modern microprocessors should not impose
    any inherent barriers because of space. We managed to get a whole
    rocket engine control system into 48k words on a Mil-Std-1750a
    microprocessor. Most of these microcontrollers will give you five
    times that space right off the shelf. Older compilers did indeed
    have a problem with space, largely due to tasking support. But I
    am informed by people who should know (as well as practical
    experience) that this is a problem of the past.

>2)    Q:  Is Ada used in robotics?  This is a question several occasional
>posters to this group could have answered.  But the answers weren't
>exactly what the original poster was looking for.  Robotics is a vary
>broad field ranging from little critters skittering about on the floor
>with 8 bit micro controllers to large kinematically redundant manipulator
>mechanisms with multiple 32 bit high performance processors.
>
    To the extent that engine controls apply lots of the same
    principles used in robotics (feedback loops, etc to control the
    motion of actuators) I can testify that Ada is indeed adequate in
    and of itself to do the job. And in that sense, it is used quite
    extensively in this sort of "robotics" application. The problem is
    not so much one of "is the language suitable?" or "is the language
    used in this domain?" as it is one of "is the language available
    for the target I have in mind?"

    You're on target with the notion that there is no single correct
    answer in language selection for all projects. I believe Ada has
    lots of technical merit over other choices, but technical merit
    isn't the only selection parameter.

    MDC

Marin David Condic, Senior Computer Engineer     ATT:        561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600  Fax:        561.796.4669
West Palm Beach, FL, 33410-9600                  Internet:   CONDICMA@PWFL.COM
===============================================================================
    "Having an open mind is nothing. The object of opening the mind, as
    of opening the mouth, is to shut it again on something solid."

        --  G.K. Chesterton
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* Re: ada and robots
@ 1997-06-05  0:00 Marin David Condic, 561.796.8997, M/S 731-93
  0 siblings, 0 replies; 132+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-93 @ 1997-06-05  0:00 UTC (permalink / raw)



Dale Stanbrough <dale@GOANNA.CS.RMIT.EDU.AU> writes:
>"small systems a student can afford"
>        The Meridian Ada compiler, which comes for free with a book, is rather
>        cheap, and targets any of the 8086 family (which are cheap, no?).
>        It is Ada83 however. So I think you agree with you.
>
    Before I start my tirade, let me preface by saying that I *like*
    Ada and prefer Ada to C. I 'reach', I'm 'of the body', Resistance
    was futile: I have been absorbed, I am part of The Borg, etc. But
    that doesn't mean there aren't some valid criticisms of Ada or
    times when C is more appropriate.

    I believe when the original poster was discussing this issue, it
    was about small, inexpensive microcontrollers for robotics. I've
    looked at a number of such computers (stuff that can be had for
    between $80 and $200, including development software {read: C
    compiler, loading & debugging tools}). An 8086 running some
    version of real-time MS-DOS (plus cobbling together your own
    cross-compilation environment) may be overkill, may not provide
    the analog & discrete I/O hardware support needed and would
    probably require non-trivial effort to get the Meridian Ada
    compiler, etc. set up to produce/load/debug code in the SBC.

    I imagine one could spend money/time retargeting GNAT to some SBC
    & get it up and running with the RTEMS real-time OS and cobble
    yourself together everything you need to load/debug images. Or you
    could buy the little microcontroller for $200 and get an
    integrated development environment using a C compiler. It doesn't
    take a rocket scientist to figure this one out. {But if it did, I
    just so happen to be one!}

    The embedded microcontroller market seems to have been conceeded
    to C for the time being and, especially for student projects,
    small development jobs and quick&dirty fixes, I'd recommend not
    spitting into the wind. (You certainly can't argue that life cycle
    costs are going to recoup me the $100k+ cost of building the
    port!) And this is *one* area where I'd desperately like to be
    proven wrong - if you want to show me a small (~3" x 5") SBC with
    analog & discrete connections, programmable from a serial port on
    a PC with an integrated development environment including an Ada95
    compiler for around $200, I'll gladly admit I'm wrong.

    As for the rest of the criticisms you addressed, I think you're
    right on target.

    MDC

Marin David Condic, Senior Computer Engineer    ATT:        561.796.8997
Pratt & Whitney, GESP                           Fax:        561.796.4669
West Palm Beach, FL                             Internet:   CONDICMA@PWFL.COM
===============================================================================
    "Having an open mind is nothing. The object of opening the mind, as
    of opening the mouth, is to shut it again on something solid."

        --  G.K. Chesterton
===============================================================================




^ permalink raw reply	[flat|nested] 132+ messages in thread
* ada and robots
@ 1997-05-28  0:00 John Bohn
  1997-05-29  0:00 ` Stephen Leake
                   ` (2 more replies)
  0 siblings, 3 replies; 132+ messages in thread
From: John Bohn @ 1997-05-28  0:00 UTC (permalink / raw)



I am an Ada student. I have heard that Ada was designed for embeded
systems, but I haven't heard much about micro controller ada
programming. 

Does anyone know about any examples of the usage of Ada for robots
and programming micro controllers?

Thank you very much
John Bohn




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

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

Thread overview: 132+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-05  0:00 ada and robots Marin David Condic, 561.796.8997, M/S 731-93
1997-06-09  0:00 ` Jerry Petrey
1997-06-10  0:00   ` Alan Brain
1997-06-10  0:00     ` Joe Gwinn
1997-06-11  0:00       ` Robert Dewar
1997-06-11  0:00         ` Samuel Mize
1997-06-13  0:00           ` Erik Magnuson
1997-06-17  0:00         ` Joe Gwinn
1997-06-18  0:00           ` Jon S Anthony
1997-06-19  0:00             ` Jonathan Guthrie
1997-06-20  0:00           ` Robert Dewar
1997-06-11  0:00       ` Alan Brain
1997-06-11  0:00         ` Joe Gwinn
1997-06-11  0:00         ` Spam Hater
  -- strict thread matches above, loose matches on Subject: below --
1997-07-02  0:00 Ada " Huy Vo
1997-07-04  0:00 ` Richard A. O'Keefe
1997-07-01  0:00 Huy Vo
1997-07-02  0:00 ` Wes Groleau
1997-06-30  0:00 Huy Vo
1997-07-01  0:00 ` Alan Brain
1997-07-11  0:00   ` Will Rose
1997-07-02  0:00 ` Mattias Sj�sv�rd
     [not found] <867541382.23405@dejanews.com>
1997-06-29  0:00 ` John Howard
1997-06-26  0:00 Huy Vo
1997-06-27  0:00 ` Wes Groleau
1997-06-27  0:00 ` nma123
1997-06-27  0:00 ` Richard A. O'Keefe
1997-06-27  0:00 ` Alan Brain
1997-06-27  0:00   ` Stephen Leake
1997-06-27  0:00   ` Wes Groleau
1997-06-27  0:00 ` Jon S Anthony
1997-06-24  0:00 Huy Vo
1997-06-25  0:00 ` Jon S Anthony
1997-06-25  0:00 ` Alan Brain
1997-06-25  0:00 ` Dale Stanbrough
1997-06-25  0:00 ` Wes Groleau
1997-06-26  0:00 ` Ken Garlington
1997-07-01  0:00   ` Tom Moran
1997-06-20  0:00 Huy Vo
1997-06-23  0:00 ` Jon S Anthony
1997-06-19  0:00 ada " Jon S Anthony
1997-06-19  0:00 ` Brian Rogoff
1997-06-20  0:00   ` Jon S Anthony
1997-06-22  0:00   ` John G. Volan
1997-06-25  0:00     ` Richard A. O'Keefe
1997-06-23  0:00   ` Robert Dewar
1997-06-24  0:00     ` Brian Rogoff
1997-06-16  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-17  0:00 ` Joe Gwinn
1997-06-18  0:00   ` Jon S Anthony
1997-06-18  0:00     ` Brian Rogoff
1997-06-20  0:00   ` Robert Dewar
1997-06-23  0:00     ` Richard Kenner
1997-06-23  0:00       ` Robert Dewar
1997-06-23  0:00     ` Geert Bosch
1997-07-02  0:00       ` Robert Dewar
1997-06-25  0:00   ` Jonathan Guthrie
1997-06-25  0:00   ` Will Rose
1997-06-21  0:00 ` Nick Roberts
1997-06-16  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-12  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-09  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-05  0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-05-28  0:00 John Bohn
1997-05-29  0:00 ` Stephen Leake
1997-05-29  0:00 ` Michael F Brenner
1997-05-30  0:00 ` John Cook
1997-05-30  0:00   ` Tom Moran
1997-06-01  0:00     ` Dale Stanbrough
1997-06-02  0:00       ` John G. Volan
     [not found]         ` <5mv984$7kn@news.emi.com>
1997-06-03  0:00           ` Martin A. Stembel
1997-06-03  0:00           ` Joe Gwinn
1997-06-04  0:00             ` Pat Rogers
1997-06-05  0:00               ` Joe Gwinn
1997-06-14  0:00                 ` Robert Dewar
1997-06-16  0:00                 ` Ken Garlington
1997-06-16  0:00                   ` Robert Dewar
1997-06-17  0:00                   ` Joe Gwinn
1997-06-28  0:00                     ` Mike Stark
1997-07-03  0:00                       ` Joe Gwinn
1997-06-04  0:00             ` John G. Volan
1997-06-05  0:00               ` Joe Gwinn
1997-06-14  0:00                 ` Robert Dewar
1997-06-17  0:00                   ` Joe Gwinn
1997-07-03  0:00                     ` Shmuel (Seymour J.) Metz
     [not found]               ` <9706052229.AA29554@jaguar.nmc.ed.ray.com>
1997-06-06  0:00                 ` John G. Volan
1997-06-07  0:00                   ` RC
1997-06-09  0:00                   ` Joe Gwinn
1997-06-05  0:00             ` Jon S Anthony
1997-06-05  0:00               ` Joe Gwinn
1997-06-14  0:00                 ` Robert Dewar
1997-06-10  0:00             ` Robert Dewar
1997-06-10  0:00               ` Joe Gwinn
1997-06-11  0:00                 ` Robert Dewar
1997-06-12  0:00                   ` George Haddad
1997-06-16  0:00                   ` Matthew S. Whiting
1997-06-17  0:00                     ` Samuel Mize
1997-06-18  0:00                       ` Steve O'Neill
1997-06-19  0:00                         ` Anonymous
1997-06-19  0:00                       ` Kenneth W. Sodemann
1997-06-20  0:00                       ` Stephen Leake
1997-06-20  0:00                         ` Robert Dewar
1997-06-17  0:00                     ` Jon S Anthony
1997-06-17  0:00                       ` Matthew S. Whiting
1997-06-18  0:00                         ` Samuel Mize
1997-06-18  0:00                           ` Matthew S. Whiting
1997-06-18  0:00                         ` Jon S Anthony
1997-06-22  0:00                           ` John G. Volan
1997-06-18  0:00                         ` Robert A Duff
1997-06-17  0:00                     ` Stephen Leake
1997-06-17  0:00                       ` Robert A Duff
1997-06-20  0:00                       ` jim granville
1997-06-21  0:00                         ` Robert Dewar
1997-06-29  0:00                         ` Matthew Heaney
1997-07-03  0:00                           ` Shmuel (Seymour J.) Metz
1997-07-13  0:00                             ` Robert Dewar
1997-06-17  0:00                     ` Robert A Duff
1997-06-18  0:00                       ` Ken Garlington
1997-07-17  0:00                         ` Shmuel (Seymour J.) Metz
1997-06-20  0:00                       ` Robert Dewar
1997-06-20  0:00                       ` Adam Beneschan
1997-06-17  0:00                     ` Robert Dewar
1997-06-04  0:00         ` RC
1997-06-04  0:00           ` John G. Volan
1997-06-04  0:00           ` Larry Kilgallen
1997-06-05  0:00           ` Jon S Anthony
1997-06-02  0:00     ` Nick Roberts
1997-06-04  0:00       ` Jan Galkowski
1997-06-05  0:00         ` Albert K. Lee
1997-06-06  0:00           ` dana
1997-06-07  0:00             ` John G. Volan
1997-06-10  0:00               ` dana

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