From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: 'constant functions' and access constant params (was Re: Array of Variant Records Question...)
Date: 1999/09/25
Date: 1999-09-25T00:00:00+00:00 [thread overview]
Message-ID: <37ec53ba@news1.prserv.net> (raw)
In-Reply-To: wcchfkk2ocx.fsf@world.std.com
In article <wcchfkk2ocx.fsf@world.std.com> , Robert A Duff
<bobduff@world.std.com> wrote:
> "Matthew Heaney" <matthew_heaney@acm.org> writes:
>
>> 2) For private types, I say the "stability of X" is a meaningless statement.
>> A supplier's only obligation is to satisfy the postcondition, which has
>> nothing to say about internal state changes.
>
> Please define exactly what you mean by "internal" state change.
External = public state = partial view of type
Internal = private state = full view of type
For example, in Ada.Text_IO, the type is declared as
type File_Type is limited private;
There is no external state. The only thing I know (publicly) about File_Type
is what operations are available for it.
You could loosely refer to selector functions like Name or Is_Open as "external
state," but I'm not doing that here. In a postcondition, I would state what
values those functions should return, but that's not quite what I mean by
external state (it's more like external "behavior").
> How can one tell the difference between internal and external
> state changes?
For a private type, there is no such thing as "external state," so this
question goes away.
Actually, that's a bit of a lie, since I could declare a tagged type this way:
type T_Public is
abstract tagged limited record
I : Integer;
end record;
type T is
new T_Public with private;
Here, objects of type T have some state that's external, namely component I.
But then it's easy to say what happens to the external state (I) in the
postcondition.
--
It is impossible to feel great confidence in a negative theory which has always
rested its main support on the weak points of its opponent.
Joseph Needham, "A Mechanistic Criticism of Vitalism"
next prev parent reply other threads:[~1999-09-25 0:00 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-08 0:00 Array of Variant Records Question Bruce Detter
1999-09-08 0:00 ` Matthew Heaney
1999-09-08 0:00 ` Mike Silva
1999-09-08 0:00 ` Matthew Heaney
1999-09-09 0:00 ` Robert Dewar
1999-09-09 0:00 ` Matthew Heaney
1999-09-09 0:00 ` Matthew Heaney
1999-09-09 0:00 ` Robert Dewar
1999-09-09 0:00 ` Mark Lundquist
1999-09-09 0:00 ` Robert Dewar
1999-09-09 0:00 ` Matthew Heaney
1999-09-10 0:00 ` Mark Lundquist
1999-09-10 0:00 ` Matthew Heaney
1999-09-11 0:00 ` Robert Dewar
1999-09-10 0:00 ` Robert Dewar
1999-09-10 0:00 ` Mark Lundquist
1999-09-10 0:00 ` Matthew Heaney
1999-09-11 0:00 ` Jean-Pierre Rosen
1999-09-14 0:00 ` "cast away const" (was Re: Array of Variant Records Question...) Mark Lundquist
[not found] ` <wccd7viiv59.fsf@world.std.com>
1999-09-22 0:00 ` Array of Variant Records Question Robert I. Eachus
[not found] ` <7rrmqd$l89@drn.newsguy.com>
[not found] ` <wcciu59n2uf.fsf@world.std.com>
1999-09-22 0:00 ` Robert I. Eachus
1999-09-23 0:00 ` Robert Dewar
1999-09-23 0:00 ` Robert I. Eachus
1999-09-11 0:00 ` Richard D Riehle
1999-09-13 0:00 ` Hyman Rosen
1999-09-14 0:00 ` Mark Lundquist
[not found] ` <7roohh$s6r@dfw-ixnews7.ix.netcom.com>
[not found] ` <37e01168@news1.prserv.net>
[not found] ` <7rp86o$c6h@dfw-ixnews3.ix.netcom.com>
[not found] ` <37E18CC6.C8D431B@rational.com>
[not found] ` <7rs8bn$s6@dfw-ixnews4.ix.netcom.com>
[not found] ` <wccemfxn15s.fsf@world.std.com>
1999-09-22 0:00 ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Richard D Riehle
[not found] ` <37e2e58c@news1.prserv.net>
1999-09-22 0:00 ` Richard D Riehle
1999-09-22 0:00 ` Matthew Heaney
1999-09-22 0:00 ` Richard D Riehle
1999-09-22 0:00 ` Matthew Heaney
1999-09-23 0:00 ` Vincent Marciante
1999-09-23 0:00 ` Matthew Heaney
1999-09-24 0:00 ` Robert A Duff
1999-09-25 0:00 ` Matthew Heaney [this message]
1999-09-27 0:00 ` Richard D Riehle
1999-09-27 0:00 ` David Kristola
1999-09-27 0:00 ` Richard D Riehle
1999-09-22 0:00 ` Matthew Heaney
1999-09-23 0:00 ` Robert Dewar
1999-09-27 0:00 ` Richard D Riehle
1999-09-28 0:00 ` Robert Dewar
1999-09-28 0:00 ` "Competence" (was: 'constant functions' and access constant params) Ted Dennison
1999-09-28 0:00 ` Robert Dewar
1999-09-28 0:00 ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Robert Dewar
1999-09-28 0:00 ` Richard D Riehle
1999-09-29 0:00 ` Robert Dewar
1999-09-29 0:00 ` Robert A Duff
1999-09-22 0:00 ` Mark Lundquist
1999-09-22 0:00 ` Mark Lundquist
1999-09-09 0:00 ` Array of Variant Records Question Brian Rogoff
1999-09-13 0:00 ` Matthew Heaney
1999-09-13 0:00 ` Robert A Duff
1999-09-13 0:00 ` Matthew Heaney
1999-09-13 0:00 ` Brian Rogoff
1999-09-14 0:00 ` Robert Dewar
1999-09-14 0:00 ` Brian Rogoff
1999-09-14 0:00 ` Robert Dewar
1999-09-10 0:00 ` Proposed Ada features (was Re: Array of Variant Records Question...) Mark Lundquist
1999-09-10 0:00 ` Matthew Heaney
1999-09-10 0:00 ` tmoran
1999-09-09 0:00 ` Array of Variant Records Question Nick Roberts
1999-09-09 0:00 ` Robert Dewar
1999-09-09 0:00 ` Tucker Taft
1999-09-10 0:00 ` Nick Roberts
1999-09-08 0:00 ` Ted Dennison
1999-09-08 0:00 ` Thank you Bruce Detter
1999-09-08 0:00 ` Martin C. Carlisle
1999-09-08 0:00 ` Array of Variant Records Question Martin C. Carlisle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox