comp.lang.ada
 help / color / mirror / Atom feed
* A (hopefully) interesting question...
@ 2000-10-05  0:00 Sploo
  2000-10-05  0:00 ` Gautier
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sploo @ 2000-10-05  0:00 UTC (permalink / raw)


Hi all,

I often see people asks questions related to moving from C to Ada95, well
I'm asking for information about the opposite step.

I've been using Ada95 for a few years (and I also know C fairly well), but
I've just started a job where I'll be writing *real-time* code in C.
Obviously the simple things are present (semaphores etc.) but useful
constructs such as Protected Objects, Accepts and so forth are lacking.

As I'm comfortable designing real-time systems in Ada I'd like to use
similar design methods for our (as yet undecided) implementation of
real-time C.

Does anyone have any information (books, websites) regarding 'getting the
stuff you remember from Ada95 into C'!?

Thanks,

Sploo.

PS Anyone replying and saying 'why not just use Ada?' will be beaten with a
copy of the Reference Manual. Soundly.






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

* Re: A (hopefully) interesting question...
  2000-10-05  0:00 A (hopefully) interesting question Sploo
@ 2000-10-05  0:00 ` Gautier
  2000-10-06  0:00   ` Marin David Condic
  2000-10-05  0:00 ` Ted Dennison
  2000-10-06  6:52 ` Pierre Dissaux
  2 siblings, 1 reply; 9+ messages in thread
From: Gautier @ 2000-10-05  0:00 UTC (permalink / raw)


OK, but why not just use... Plaf - ouch!




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

* Re: A (hopefully) interesting question...
  2000-10-05  0:00 A (hopefully) interesting question Sploo
  2000-10-05  0:00 ` Gautier
@ 2000-10-05  0:00 ` Ted Dennison
  2000-10-06  0:00   ` Sploo
  2000-10-06  6:52 ` Pierre Dissaux
  2 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2000-10-05  0:00 UTC (permalink / raw)


In article <970752964.3710.0.nnrp-10.d4f021c1@news.demon.co.uk>,
  "Sploo" <sploo@lineone.net> wrote:
> As I'm comfortable designing real-time systems in Ada I'd like to use
> similar design methods for our (as yet undecided) implementation of
> real-time C.

In C such features don't exist. You'll have to rely on OS support.

Your real-time OS (You will be using a real-time OS right? They aren't
*that* stupid are they?)  should have lots of intertask/process
communications primitives of various levels of abstraction. You'll just
have to acquaint yourself with what process/tasking kenel your OS is
using, how it schedules, and what communications and synchronization
primitives are available.

No one could really write a book about this, because it would have to be
a completely different book for each RTOS. There are lots of them (and
more created every year), and they all do things differently. That's one
of the main reasons Ada is just flat out a better language for Real-Time
work: you don't have to relearn all the primitives and sheduling crapola
every time you go to a new platform. If you are careful, you can even
make a *portable* real-time app, something you can't realisticly do with
any other language.

Good luck. I give you about 2 weeks before you start seriously annyoing
everyone by repeating "in Ada this would have been *so* much easier"
every 10 minutes. :-)

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




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

* Re: A (hopefully) interesting question...
  2000-10-06  6:52 ` Pierre Dissaux
  2000-10-06  0:00   ` Sploo
@ 2000-10-06  0:00   ` Ole-Hjalmar Kristensen
  1 sibling, 0 replies; 9+ messages in thread
From: Ole-Hjalmar Kristensen @ 2000-10-06  0:00 UTC (permalink / raw)


Pierre Dissaux <pierre.dissaux@tni.fr> writes:

> Sploo wrote:
> > 
> > Hi all,
> > 
> > I often see people asks questions related to moving from C to Ada95, well
> > I'm asking for information about the opposite step.
> > 
> > I've been using Ada95 for a few years (and I also know C fairly well), but
> > I've just started a job where I'll be writing *real-time* code in C.
> > Obviously the simple things are present (semaphores etc.) but useful
> > constructs such as Protected Objects, Accepts and so forth are lacking.
> > 
> > As I'm comfortable designing real-time systems in Ada I'd like to use
> > similar design methods for our (as yet undecided) implementation of
> > real-time C.
> > 
> > Does anyone have any information (books, websites) regarding 'getting the
> > stuff you remember from Ada95 into C'!?
> 
> The HOOD (Hierarchical Object Oriented Design) method could be a
> solution.
> 
> HOOD was initially developed to support Ada, but similar code generation
> rules have been defined to target real-time C applications as well, from
> the same high level design description. These C code generators must
> generally be customized to perfectly fit RTOS capabilities and project
> requirements (coding rules, ..), but this should not be a problem.
> 
> In a HOOD design, it is possible to identify passive or active modules
> and their interactions. Each module provides operations that can be
> "constrained" to specify a communication protocol (synchronous,
> asynchronous, IT, protected access, ...).
> 
> General information about the HOOD method may be found at:
> 	www.hood-method.org
> 
> Information about our HOOD tool (STOOD) with Ada and C-RealTime code
> generators:
> 	www.tni.fr/tni/offre/stood/index.eng.html
> 
> STOOD will be presented at next SigAda exhibition (TNI's booth)
> 
> Pierre Dissaux
> TNI
> 
> >
> > Thanks,
> > 
> > Sploo.
> > 
> > PS Anyone replying and saying 'why not just use Ada?' will be beaten with a
> > copy of the Reference Manual. Soundly.

Another approach would be to design the system in SDL. There are
systems which allow code generation in Ada, C or Chill from the same
SDL specification.

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen




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

* Re: A (hopefully) interesting question...
  2000-10-05  0:00 ` Ted Dennison
@ 2000-10-06  0:00   ` Sploo
  2000-10-06  0:00     ` Scott Ingram
  0 siblings, 1 reply; 9+ messages in thread
From: Sploo @ 2000-10-06  0:00 UTC (permalink / raw)


> Your real-time OS (You will be using a real-time OS right? They aren't
> *that* stupid are they?)  should have lots of intertask/process
> communications primitives of various levels of abstraction. You'll just
> have to acquaint yourself with what process/tasking kenel your OS is
> using, how it schedules, and what communications and synchronization
> primitives are available.

Yup. Some of the stuff I've been looking at supports features such as
Queues, Pipes, Semaphores, Signals and Events. Just seems a lot simpler in
Ada...

> Good luck. I give you about 2 weeks before you start seriously annyoing
> everyone by repeating "in Ada this would have been *so* much easier"
> every 10 minutes. :-)

Most probably. But then I'd get beaten with the Kernighan & Ritchie ANSI C
book :)







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

* Re: A (hopefully) interesting question...
  2000-10-06  6:52 ` Pierre Dissaux
@ 2000-10-06  0:00   ` Sploo
  2000-10-06  0:00   ` Ole-Hjalmar Kristensen
  1 sibling, 0 replies; 9+ messages in thread
From: Sploo @ 2000-10-06  0:00 UTC (permalink / raw)


> General information about the HOOD method may be found at:
> www.hood-method.org

I'll take a look a that. Cheers.

Sploo






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

* Re: A (hopefully) interesting question...
  2000-10-06  0:00   ` Sploo
@ 2000-10-06  0:00     ` Scott Ingram
  0 siblings, 0 replies; 9+ messages in thread
From: Scott Ingram @ 2000-10-06  0:00 UTC (permalink / raw)


Sploo wrote:
> 
> > Your real-time OS (You will be using a real-time OS right? They aren't
> > *that* stupid are they?)  should have lots of intertask/process
> > communications primitives of various levels of abstraction. You'll just
> > have to acquaint yourself with what process/tasking kenel your OS is
> > using, how it schedules, and what communications and synchronization
> > primitives are available.
> 
> Yup. Some of the stuff I've been looking at supports features such as
> Queues, Pipes, Semaphores, Signals and Events. Just seems a lot simpler in
> Ada...
> 
> > Good luck. I give you about 2 weeks before you start seriously annyoing
> > everyone by repeating "in Ada this would have been *so* much easier"
> > every 10 minutes. :-)
> 
> Most probably. But then I'd get beaten with the Kernighan & Ritchie ANSI C
> book :)

I've managed to get my repetitive frequency up to 45 minutes from 5, but
I still get beaten daily with the K&R book :-)
-- 
Scott Ingram
Vice-Chair, Baltimore SIGAda
Sonar Processing and Analysis Laboratory
Johns Hopkins University Applied Physics Laboratory




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

* Re: A (hopefully) interesting question...
  2000-10-05  0:00 ` Gautier
@ 2000-10-06  0:00   ` Marin David Condic
  0 siblings, 0 replies; 9+ messages in thread
From: Marin David Condic @ 2000-10-06  0:00 UTC (permalink / raw)


Gautier wrote:

> OK, but why not just use... Plaf - ouch!

Yup! I've been hit by the same stick myself. However, it is good to
remember that when you start talking about embedded computers, you may
be in a situation where there just isn't an Ada compiler targeted to the
board you have or you lack suitable tools to do it that way for the
particular product at hand. Practical choices have to be made sometimes
and sometimes C wins as a result.

MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






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

* Re: A (hopefully) interesting question...
  2000-10-05  0:00 A (hopefully) interesting question Sploo
  2000-10-05  0:00 ` Gautier
  2000-10-05  0:00 ` Ted Dennison
@ 2000-10-06  6:52 ` Pierre Dissaux
  2000-10-06  0:00   ` Sploo
  2000-10-06  0:00   ` Ole-Hjalmar Kristensen
  2 siblings, 2 replies; 9+ messages in thread
From: Pierre Dissaux @ 2000-10-06  6:52 UTC (permalink / raw)


Sploo wrote:
> 
> Hi all,
> 
> I often see people asks questions related to moving from C to Ada95, well
> I'm asking for information about the opposite step.
> 
> I've been using Ada95 for a few years (and I also know C fairly well), but
> I've just started a job where I'll be writing *real-time* code in C.
> Obviously the simple things are present (semaphores etc.) but useful
> constructs such as Protected Objects, Accepts and so forth are lacking.
> 
> As I'm comfortable designing real-time systems in Ada I'd like to use
> similar design methods for our (as yet undecided) implementation of
> real-time C.
> 
> Does anyone have any information (books, websites) regarding 'getting the
> stuff you remember from Ada95 into C'!?

The HOOD (Hierarchical Object Oriented Design) method could be a
solution.

HOOD was initially developed to support Ada, but similar code generation
rules have been defined to target real-time C applications as well, from
the same high level design description. These C code generators must
generally be customized to perfectly fit RTOS capabilities and project
requirements (coding rules, ..), but this should not be a problem.

In a HOOD design, it is possible to identify passive or active modules
and their interactions. Each module provides operations that can be
"constrained" to specify a communication protocol (synchronous,
asynchronous, IT, protected access, ...).

General information about the HOOD method may be found at:
	www.hood-method.org

Information about our HOOD tool (STOOD) with Ada and C-RealTime code
generators:
	www.tni.fr/tni/offre/stood/index.eng.html

STOOD will be presented at next SigAda exhibition (TNI's booth)

Pierre Dissaux
TNI

>
> Thanks,
> 
> Sploo.
> 
> PS Anyone replying and saying 'why not just use Ada?' will be beaten with a
> copy of the Reference Manual. Soundly.



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

end of thread, other threads:[~2000-10-06  6:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-05  0:00 A (hopefully) interesting question Sploo
2000-10-05  0:00 ` Gautier
2000-10-06  0:00   ` Marin David Condic
2000-10-05  0:00 ` Ted Dennison
2000-10-06  0:00   ` Sploo
2000-10-06  0:00     ` Scott Ingram
2000-10-06  6:52 ` Pierre Dissaux
2000-10-06  0:00   ` Sploo
2000-10-06  0:00   ` Ole-Hjalmar Kristensen

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