Newsgroups: comp.object,comp.object.logic,comp.theory,sci.math,de.sci.informatik
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!howland.reston.ans.net!ix.netcom.com!netcom.com!nntpuser
From: scottw@advsysres.com  (Scott A. Whitmire)
Subject: Re: mathematics (algebra?) of object orientation
Message-ID: <nntpuserDJ79Aw.2L7@netcom.com>
Sender: netnews@mork.netcom.com
Nntp-Posting-Host: advsysres.com
Reply-To: scottw@advsysres.com (Scott A. Whitmire)
Organization: Advanced Systems Research
X-Newsreader: IBM NewsReader/2 v1.2
References: <49c627$bgn@sparcserver.lrz-muenchen.de> <vwjloorymri.fsf@osfb.aber.ac.uk>
Date: Thu, 7 Dec 1995 04:47:20 GMT
Lines: 119
Xref: glinda.oz.cs.cmu.edu comp.object:42244 comp.object.logic:625 comp.theory:14877 sci.math:127870

In <vwjloorymri.fsf@osfb.aber.ac.uk>, pcg@aber.ac.uk (Piercarlo Grandi) writes:
>
>A difficulty is that there are many different notions of 'class'.
>
>Still, "algebra" comes to mind. You have the domain (set of values), the
>functions, the semantics, whatever. Then you have category theory (a
>kind of "meta algebra") where algebras themselves are "cataloged". This
>is a denotational correspondence between classes and some mathematical
>entity. Then there is another way of relating classes to mathematical
>entities, and it is to model them:
>

This appears to be the best starting point. Except for one thing: you need to
consider objects and collections of objects, and leave classes out of it, for now.
Category theory is (sort of) a blending and extension of set theory and graph
theory, at least as I interpret what I'm reading. I know that's not precisely
correct, but it's pretty close.

(">Scott>" is me in a previous note).
>Scott> A class is not the product of the domains of its attributes, it
>Scott> is merely the set of attributes.
>
>Uhm, perhaps the model of the class object. Is a model of the class
>object the same thing as a model of the class? Uhm, that's a question.
>
>I guess that this discussion is too informal. Also consider the problem
>that two attrbutes may be in fact have identical domains: then one may
>get a bag, not a set, unless you define attribute as accessor
>function+domain, which is indeed what should be done. There are many
>many possible choices.
>

Not quite. It is possible for all of the members of a set to have the same
domain, as long as there is some property that renders them unique. In the
case of classes, it would be the attribute's name.

>Scott> The attributes of a class have no values, only types. The
>Scott> attributes take on values (one each) when you create an object of
>Scott> the class.
>
>Yes, in programming languages. But when we are talking of mathematical
>entities we are talking direct denotations or models, and issues such as
>creation matter less. Mathematics is "timeless" (extensional).

No, that's not entirely true. The attributes of a class are variables that are
given values only when a particular set of circumstances warrants it. The
variables in a predicate have no value, only a type. They are assigned
actual values at some later point. So it is with classes and objects. Even in
math.

You may want to think of all of the objects of a type (class) as a set, and
the class as the set's specification, as in class A = {all objects that meet this
criteria}. I believe the set theoretic term is "specifying a set in extension."

>Scott> One other thing: there are several models of classes and objects,
>
>Most of them as clumsy as those outlined above, and some of them
>outright useless. But they keep the paper mill churning. As to me I
>still think that Hoare's article "On Data Types" in "Structured
>Programming" is _still_ (twenty years later) the best introduction to
>the subject (and yet it contains at least one obvious mistake, but not
>an important one).
>
>Scott> but no theories. None of the models are general enough to be
>Scott> extended to a true theory.
>
>And what would be the characteristics of a true theory? That's just a
>curiosity. I personally keep only marginally current with type theory,
>except for the obviously useful bits like type inference algorithms.
>

As I read the literature, a model gives some idea of an "implementation" of
a theory. The use of sets to describe classes puts limits on what can be done
with them. A "true" theory states a set of axioms and some inference rules,
and a description of the "language" or alphabet used in the axioms and rules.
For objects, I interpret this to mean algebraic descriptions of an object's
behavior under given stimuli, and not necessarily making it a set of some thing
or things.

A theory should hold for several models when they follow the rules of the
theory. A theory is generally built on a single model, and is then generalized.

Of course, this is all my interpretation of what I read and hear. I may be way
off base.

>Apart from the basics there is little interest, IMNHO. Perhaps it's a
>bit like category theory (a subject that I watch from an even greater
>distance): an algebrist once told me that after a flurry of activity in
>the field interest has petered out because it's neat, it's good to have
>it as a framework, but not, as yet, clearly useful in the sense of being
>fecund of new insights/results.
>
>Also, I think that this discussion is really unequal to the task of
>being meaningful about formal approaches: a difficulty is that either
>one is very much into them, and is essentially a mathematician
>interested in computing, and then the discussion can reach some
>meaningful level, or one is a computer science guy with an interest in
>formal systems, and then it's very hard to second guess the specialists,
>or at times even to follow them on their ground beyond the basics.
>

Well, now, hold on a minute. The only reason I became involved in this little
endeavor was to find a model or theory upon which I could build concepts
like coupling, cohesion, size, similarity, etc. I also wanted to be able to model
the operations on classes that a designer performs during the course of
design. I see that as a very important use of the mathematics.

Interest in category theory may have petered out in mathematics, but it holds
some promise in understanding objects, and networks of cooperating objects.
It may be our key method for figuring out what distributed computing is doing
to us.

Scott A. Whitmire             scottw@advsysres.com
Advanced Systems Research     
25238 127th Avenue SE         tel:(206)631-7868
Kent Washington 98031         fax:(206)630-2238

Consultants in object-oriented development and software metrics.

