From: mockturtle <framefritti@gmail.com>
Subject: Re: On pragma Precondition etc.
Date: Fri, 25 Jul 2008 04:05:25 -0700 (PDT)
Date: 2008-07-25T04:05:25-07:00 [thread overview]
Message-ID: <f9112d8f-1c5a-4533-88ed-b4c22d108ac8@q5g2000prf.googlegroups.com> (raw)
In-Reply-To: Pine.LNX.4.64.0807251224010.10913@medsec1.medien.uni-weimar.de
stefan-lu...@see-the.signature ha scritto:
> On Fri, 25 Jul 2008, Georg Bauhaus wrote:
>
> > We would have something like
> >
> > function More(X, Y: Integer);
> > -- ...
> > pragma Precondition(More, X > 2 * Y);
> >
> >
> > function Less(X, Y: Integer);
> > -- ...
> > pragma Precondition(Less, X < 2 * Y);
> >
> > And now there is no doubt about the subprogram to which a
> > Pre-/Postcondition belongs. (A rule that a spec Pre-/Postcondition
> > pragma must come right after its subprogram will establish
> > consistency.)
>
> This seems to break with overloading of subprogram names. I seem to recall
> that
> "pragma Inline(Foo)"
> is asking to inlie *all* functions / procedures with the name "Foo". This
> may be OK for inlining, but you definitively don't want to use the same
> preconditions which happen to have the same way. Consider the following:
What about _allowing_ for the name of the procedure to appear in
the pragma? The true syntactic link would be given by the pragma
position
and the procedure name would act as a "double check" to be sure that
things were not messed up. Of course this does not save you if you
permute the pragma of overloaded functions...
---
next prev parent reply other threads:[~2008-07-25 11:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 8:01 On pragma Precondition etc Georg Bauhaus
2008-07-25 10:50 ` stefan-lucks
2008-07-25 11:05 ` mockturtle [this message]
2008-07-25 11:44 ` Alex R. Mosteo
2008-07-25 11:56 ` Georg Bauhaus
2008-07-28 8:02 ` Alex R. Mosteo
2008-07-29 11:18 ` Martin Krischik
2008-07-29 12:08 ` Dmitry A. Kazakov
2008-07-29 14:19 ` Georg Bauhaus
2008-07-29 14:49 ` Georg Bauhaus
2008-07-29 15:00 ` Dmitry A. Kazakov
2008-07-29 15:14 ` Georg Bauhaus
2008-07-29 15:55 ` Georg Bauhaus
2008-07-29 17:49 ` Dmitry A. Kazakov
2008-07-30 9:06 ` Georg Bauhaus
2008-07-30 13:47 ` Dmitry A. Kazakov
2008-07-30 17:45 ` Georg Bauhaus
2008-07-31 8:12 ` Dmitry A. Kazakov
2008-07-31 23:06 ` Georg Bauhaus
2008-08-01 8:40 ` Dmitry A. Kazakov
2008-07-30 9:22 ` Georg Bauhaus
2008-07-30 13:56 ` Dmitry A. Kazakov
2008-07-25 14:39 ` Robert A Duff
2008-07-25 16:50 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox