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,28f9da0e028af98b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k17g2000pre.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Is the Ada compiler of Polyspace invalid? Date: Fri, 18 Feb 2011 08:50:07 -0800 (PST) Organization: http://groups.google.com Message-ID: <3054f38a-8dd6-47c3-8ce3-67bdd965129a@k17g2000pre.googlegroups.com> References: <0c1168ed-e09e-4555-a77e-40620dd80628@f15g2000yqf.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1298047807 21919 127.0.0.1 (18 Feb 2011 16:50:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 18 Feb 2011 16:50:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k17g2000pre.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18398 Date: 2011-02-18T08:50:07-08:00 List-Id: On Feb 18, 12:58=A0am, Julian Leyh wrote: > Hi, > > I have some Ada code, which I would like to try Polyspace on. > > It contains something like this (simplified): > > foo.ads: > procedure foo; > > foo.adb: > procedure foo is > ... > end foo; > > somewhere else: > with foo; > ... > foo; > ... > > The Polyspace compiler doesn't seem to like this.. I don't know anything about Polyspace. But a couple things come to mind: (a) In order to say "with foo;", foo has to be a library unit, and it has to be in the library. The language does not define what the "library" is or how units get entered into it. How this happens varies between compiler vendors. I believe that with GNAT, the mere presence of foo.ads would be enough to tell the compiler that the unit "foo" is in the library. With other compilers, though, you have to take other steps (such as running a command that compiles foo.ads). You'll have to check the documentation. (b) Even if "foo" is in the library, there may be another identifier named "foo" that is visible at the point where you call it, which can lead to the library unit being hidden or to the call being ambiguous. You'd need to tell us just what errors you're getting for the rest of us to help with this. -- Adam