@ARTICLE{journal-lzhl94:reuse,
AUTHOR = "Ling Liu and Roberto Zicari and Walter Hursch and
Karl Lieberherr",
TITLE = "Polymorphic Reuse Mechanisms for Object-Oriented
Database Specifications",
JOURNAL = "IEEE Transactions on Knowledge and Data Engineering" ,
YEAR = 1997,
PAGES = "50-67",
MONTH = "January-February",
VOLUME = "9" ,
NUMBER = "1" 
}



DISCUSSION OF PAPER

The paper studies reuse mechanisms for Adaptive Programming (AP)
which are worthy of further development and implementation.
Some of this work is done in the Demeter project.

The paper explains our current view of adaptive programming
but some of the concepts have been improved since the paper
was written in 1993/1994. Wrappers have been replaced by
context and visitor classes and objects.
Visitor classes replace wrappers and support reuse through
ordinary inheritance. For context objects, see
http://www.ccs.neu.edu/research/demeter/biblio/context.html
For visitors, see
http://www.ccs.neu.edu/home/lieber/Demeter-and-Java.html

The paper represents a union of propagation directives as
a graph. This can lead to difficulties (consistency and
subclass invariance violations) as explained in the
TOPLAS paper 
http://www.ccs.neu.edu/research/demeter/biblio/compile-ap.html
and the
AP-book
http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html

This paper does not introduce object graphs. They are important
to understanding the execution of propagation patterns and are
defined formally in the
TOPLAS paper 
http://www.ccs.neu.edu/research/demeter/biblio/compile-ap.html
and the
AP-book
http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html

This paper does not separate
propagation patterns and class dictionary graphs.
The TOPLAS paper and the
ESOP paper 
http://www.ccs.neu.edu/research/demeter/biblio/compile2-ap.html
and the
AP-book
http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html
separate the two.
It is better to define the concept of propagation directive
refinement independent of a class dictionary. Following
the TOPLAS paper terminology, the equivalent of the length definition 11
in the paper would be:

D2 is a propagation directive refinement of D1
if both D1 and D2 are well-formed and
if for all class graphs G compatible with D1 and D2:
PathSet_G(D2) is a subset of PathSet_G(D1).

The above definition
is a semantical definition of propagation directive refinement.
The idea is that a refinement makes the set of traversals
smaller.

From this semantical definition, we can
derive various syntactical versions. If we take the
propagation directive language of the paper, where a
directive is of the form [A,c,B], where c is either a bypassing
or a through constraint on edges, propagation directive
refinement means to add more edges to c.

If we take the propagation directive language of the
TOPLAS paper, where a directive is of the form [A,B],
D1 join D2, D1 merge D2, then propagation directive
refinement means to replace a subexpression by a more
constraining subexpression having the same source and target.
For example, [A,B] join [B,C] is a propagation directive refinement
of [A,B].

When the class graph G is known, we can define a finer
propagation directive refinement relation.

Let G be a class graph and D1 and D2 are well-formed
propagation directives compatible with G.
D2 is a propagation directive refinement of D1 with respect to G if 

Simplify'(PathSet_G(D2)) is a subset of Simplify'(PathSet_G(D1)).

Simplify'(R) for a path set R is defined in terms of Simplify(R)
from the ESOP paper.

Simplify'(R) = LastConcrete(Simplify(R)),

where LastConcrete(R) replaces any path p in R where
the last class name C is abstract by n paths where
n is the number of subclasses of C in G and C in p is substituted
by a concrete subclass of C.

Simplify'(R) is free of abstract classes and subclass edges.

The Simplify' operator allows to refine [A,B] to 
[AnySubclass(A), AnySubclass(B)]
(as we allow in Definition 11).

The issue of propagation pattern refinement is expressed
in terms of traversal call refinement in the Demeter Method
with visitors. A call o.t2(v2,v3) is a refinement of o.t1(v1)
if the class of v2 is a subclass of the class of v1 and t2
is a traversal directive refinement of t1. Note that
we are allowed to add more visitors (v3 in this case).


Referenced URLs:
http://www.ccs.neu.edu/research/demeter/biblio/context.html
http://www.ccs.neu.edu/research/demeter/biblio/compile2-ap.html
http://www.ccs.neu.edu/research/demeter/biblio/compile-ap.html
http://www.ccs.neu.edu/research/demeter/biblio/LZHL97-tkde.html
http://www.ccs.neu.edu/research/demeter/biblio/dem-book.html      
http://www.ccs.neu.edu/home/lieber/Demeter-and-Java.html