From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9b75d36fda92b3ba X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Peter Amey Newsgroups: comp.lang.ada Subject: Re: Using Ada (or SPARK) in Ada-unaware environment Date: Thu, 19 Jan 2006 10:21:35 +0000 Message-ID: <4397hgF1mckguU1@individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net NAYZC1zEc1yzurODwbPMkw6IaKA83GXFKNV4RXSOMYUAPxB5k= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:2530 Date: 2006-01-19T10:21:35+00:00 List-Id: Maciej Sobczak wrote: > Hi, > > Imagine a control system (to be developed) which needs to interact with > some devices. Those devices are supplied with C drivers and libraries. > > What is the recommended practice for developing this control system in > Ada (or SPARK)? I basically see two options for this: > [snip] I think I would probably go for a third option! Use Ada's ability to interface to other languages to write an Ada boundary layer that interfaces to the C device drivers and provides a better and more abstract interface upwards to the rest of the program. Then write the main control program using the new, Ada interfaces. This mixed approach retains the beenfits of your option 1 by maximising the amount of Ada. It also maintains the advantages of your option 2 because it is still possible to test in a synthetic environment by providing stubs for the Ada interface layer. Finally, it gives a degree of portability and maintainability because a chnage of low level device can be accommodated by rewriting the Ada boundary layer rather than the core application. regards Peter