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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Using Ada (or SPARK) in Ada-unaware environment Date: Thu, 19 Jan 2006 10:05:22 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1137661523 25956 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Red Hat/1.7.12-1.1.3.2.SL3 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:2527 Date: 2006-01-19T10:05:22+01:00 List-Id: 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: 1. Enjoy Ada's ability to interface with C libraries (pragma Import) and write everything in Ada. 2. Write separate programs in C (or C++) that will be responsible only for talking to the devices via their C access libraries. Write the main controller in Ada, as another separate program, and use some form of interprocess communication to have all those components talk. The advantage of the second option is that the controller part can be easily tested in isolation or in a fake environment. Are there some other options for this? What is the industry recommented practice? Regards, -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/