Sina Language and Composition Filters
started 1/31/2004; 4:49:52 PM - last post 2/5/2004; 12:54:02 AM
|
|
Mark Evans - Sina Language and Composition Filters
1/31/2004; 4:49:52 PM (reads: 12379, responses: 13)
|
|
Sina Language and Composition Filters |
Sina is a concurrent object-oriented programming
language, and it is the first language to adopt the
Composition Filters Object Model
(CFOM). The CFOM is an extension to the object-oriented model and can
express a number of concepts in a reusable and extensible way.
The Sina language has been developed by the
TRESE project as an expressive
vehicle for the Composition Filters Object Model. The TRESE project (part of
the SETI Group at the Computer Science Department of the University of Twente,
The Netherlands) performs activities related to research
on compositional object technology.
This work offers at least two points of interest, concurrency and generalizations of design-by-contract. Good documentation is the 1995 master's thesis by Piet S. Koopmans. I am not sure exactly where the work stands today, but ASoC seems the new buzzword. Composition Filters per se have seen passing mention on LtU. There are overlaps with aspects: links, helpful slides. There has been some Smalltalk development. For the hurried perhaps this basic rundown will work. I liked the paper "Object-Oriented Composition is Tangled" from Klaus Ostermann.
Posted to Software-Eng by Mark Evans on 1/31/04; 5:00:29 PM
|
|
|
|
Mark Evans - Re: Sina Language and Composition Filters
2/1/2004; 1:22:41 PM (reads: 592, responses: 0)
|
|
Actually I meant the paper "Object-Oriented Composition Untangled."
Object-oriented languages come with pre-defined composition mechanisms ... characterized by a certain set of composition properties, which do not themselves individually exist as abstractions at the language level. However, often non-standard composition semantics is needed.... Such non-standard semantics are simulated by complicated architectures that are sensitive to requirement changes and cannot easily be adapted without invalidating existing clients. In this paper, we propose compound references, a new abstraction for object references, that allows us to provide explicit linguistic means for expressing and combining individual composition properties on-demand. The model is statically typed and allows the programmer to express a seamless spectrum of composition semantics in the interval between object composition and inheritance. The resulting programs are better understandable, due to explicitly expressed design decisions, and less sensitive to requirement changes.
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/3/2004; 6:23:59 AM (reads: 460, responses: 0)
|
|
Are not these "compound references" just a poorman's lazy functions?
Or rather very limited version of them?
We may replace "limited" with "controlled" or "well-behaved", of course :-)
|
|
Klaus Ostermann - Re: Sina Language and Composition Filters
2/3/2004; 8:31:27 AM (reads: 438, responses: 0)
|
|
Hi all,
I am amazed to see a discussion about compound references here ;-)
The important issue about compound references is that their are transparent, i.e., the programmer does not know that his reference is actually a compound reference with more than one level of indirection. This is similar to an email redirection service - a user sending an email to a redirection service does not need to be aware of the redirection. If you use functions, pointers-to-pointers etc., you always have the additional step of function evaluation and pointer dereferencing; that is, the redirection is not transparent.
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/3/2004; 9:31:06 AM (reads: 435, responses: 0)
|
|
Edited: I finally followed the link that was marked as erroneous: Towards a Composition Taxonomy, which may keep me silent for a while...
So please ignore the rest of this message for all purposes except historical.
Is this just a syntactic transparency, as in C++, eh, references?
I mean, if you have a function
void swap(T& t1, T& t2);
and a client code
T a;
T b;
swap(a, b);
syntactically client is unaware of the fact that swap() needs references as opposed to values. At the object-code level, I think, client code still looks different for call-by-reference and call-by-value invocations.
Probably I am talking about open-world-transparency vs closed-world-transparency here :-)
My naive understanding is that either client code is aware of by-referenceness of arguments or the identity of the object referenced by compound reference may become quite fuzzy... (for me)
I am not sure whether I am not just asking the author to become a visiting professor in this thread :-)
And yes, I agree that OO composition is tangled. Not sure, which one is not. My current favorites are mixins/traits (yes, OO), but people keep saying they are way too complicated... Go figure :-(
|
|
Mark Evans - Re: Sina Language and Composition Filters
2/3/2004; 4:41:50 PM (reads: 369, responses: 0)
|
|
Apologies for the confusion but I was chasing a moving target. That particular paper has different callout on KO's home page than its actual title.
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/4/2004; 1:05:14 AM (reads: 328, responses: 0)
|
|
Apologies for the confusion
I confused myself :)
Consider the code in Java with compound references:
Person jack = ...
final Account ubsAccount = new Account("UBS", "12345");
final Account dbAccount = new Account("Deutsche Bank", "54321");
jack.setAccount(ubsAccount);
final Account jacksAccount = jack.getPersonsAccount();
assert(dbAccount != ubsAccount);
assert(jacksAccount == ubsAccount);
jack.setAccount(dbAccount);
assert(dbAccount != ubsAccount);
assert(jacksAccount == dbAccount);
To me, the first two asserts seem to contradict the second two (intuitively), taking into consideration finals.
As I said, either we have transparency or intuitive identities, I cannot see both.
Help me out of this, I am sure I trapped myself.
|
|
Klaus Ostermann - Re: Sina Language and Composition Filters
2/4/2004; 6:17:00 AM (reads: 305, responses: 0)
|
|
Concerning identity vs. CRs: In the paper, there is a discussion about this on p. 7, bottom of right column. There are different kinds of identity that can be considered in the context of CRs, for example head identity and tail identity. In your example, before the "jack.setAccount(dbAccount") call, we have
jacksAccount is not tail-identical to usbAccount, but it is head-identical to it.
After the setAccount-call, jacksAccount is not tail-identical to dbAccount, but it is head-identical to it.
What is probably slightly confusing here is that the identity relation can change without re-assigning the variables.
With head-identity you preserve the invariant that the identity relation cannot change "behind the scenes", whereas tail identity is more dynamic but does not preserve this invariant.
Hope that helps.
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/4/2004; 6:37:19 AM (reads: 296, responses: 0)
|
|
Yes, it clarifies the point.
I just wanted this stated plain - I have troubles understanding any text longer than a page ;-)
By the way - Towards a Composition Taxonomy is very interesting, and there is no joke in this sentence, despite my silly character. It states some things that people already knew, but never called by names (at least I never saw them doing that), as well as some completely new to me. And it does that in 16 pages and several figures. I wonder, how came I never saw that paper before - why not publishing it at CiteSeer?
|
|
Klaus Ostermann - Re: Sina Language and Composition Filters
2/4/2004; 7:21:36 AM (reads: 299, responses: 1)
|
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/4/2004; 7:49:42 AM (reads: 304, responses: 0)
|
|
Actually I was searching for Composition Taxonomy, not OOComposition is Tangled or Untangled. Are the later two distinct papers or just two editions of the same?
|
|
Peter Van Roy - Re: Sina Language and Composition Filters
2/4/2004; 10:51:58 AM (reads: 279, responses: 0)
|
|
Klaus Ostermann: The important issue about compound references is that they
are transparent, i.e., the programmer does not know that his reference is actually a compound reference with more than one level of indirection.
This behavior is very similar to Prolog's logic variables. CTM calls them dataflow
variables because they are what makes dataflow concurrency possible.
Dataflow variables can be used before they're
bound, which is at the heart of dataflow concurrency. When using a dataflow
variable in an operation that needs a value,
synchronization is implicit: the operation will block until the variable is bound
to a value. This idea has a long history: it comes from concurrent logic
programming in the early 1980s. Henri Bal et al [Computing Surveys Sep. 89]
call logic variables "spectacularly expressive" when used in concurrent programming.
Can you give a comparison of compound references and logic variables?
|
|
Klaus Ostermann - Re: Sina Language and Composition Filters
2/4/2004; 2:46:04 PM (reads: 267, responses: 0)
|
|
I have never heard about Prolog logic variables before, but from what you write they sound similar to the concept of Futures in concurrent programming (see, e.g., Doug Lea's book). This would be remotely related to CRs in that both mechanisms hide that something may happen behind the scenes, whereby the triggering of this "something" is very implicit. However, I don't see a close relationship besides this.
|
|
Andris Birkmanis - Re: Sina Language and Composition Filters
2/5/2004; 12:54:02 AM (reads: 249, responses: 0)
|
|
The commonality I see is making timing less of a concern for a programmer. In the case of futures (or promises) a programmer doesn't care about time of the call because he will obtain the value when it's available, in the case of CRs a programmer doesn't care about time of the call because he will obtain the handle to current value.
I see it as a bit wider concept than declarative concurrency, though it might be exactly the same concept...
|
|
|
|