comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Is the Ada compiler of Polyspace invalid?
Date: Fri, 18 Feb 2011 08:50:07 -0800 (PST)
Date: 2011-02-18T08:50:07-08:00	[thread overview]
Message-ID: <3054f38a-8dd6-47c3-8ce3-67bdd965129a@k17g2000pre.googlegroups.com> (raw)
In-Reply-To: 0c1168ed-e09e-4555-a77e-40620dd80628@f15g2000yqf.googlegroups.com

On Feb 18, 12:58 am, Julian Leyh <jul...@vgai.de> 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



      parent reply	other threads:[~2011-02-18 16:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18  8:58 Is the Ada compiler of Polyspace invalid? Julian Leyh
2011-02-18  9:40 ` Martin
2011-02-21  8:32   ` Julian Leyh
2011-02-21 15:54     ` Adam Beneschan
2011-02-18 16:27 ` Paul Colin Gloster
2011-02-18 16:42   ` Simon Wright
2011-02-18 18:04     ` Paul Colin Gloster
2011-02-18 16:43   ` Adam Beneschan
2011-02-18 17:08   ` Martin
2011-02-18 16:50 ` Adam Beneschan [this message]
replies disabled

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