@INPROCEEDINGS{solomon:param,
AUTHOR = "Cristina Videira Lopes and Paul Dourish  and David H. Lorenz and Karl 
Lieberherr",
TITLE = "Beyond AOP: Toward Naturalistic Programming",
BOOKTITLE = oopsla,
YEAR = "2003",
ADDRESS = "Anaheim",
PAGES = "",
EDITOR = "",
PUBLISHER = "ACM Press",
NOTE = "Onward! Track"
}

Feedback is appreciated.

Paper (in several formats).

Notes by Karl

A fundamental issue in supporting better referential programming is the capability to talk about the traversals of trees and to refer to subtrees already visited in a convenient way. The Monadic Second-order Logic on finite binary trees (M2L) is an interesting logic to define sets of trees. Each formula in M2L denotes a set of trees which is a regular tree set. But the M2L representation may be non-elementary more succinct than the corresponding automaton.

(in a different space, strategies play a similar role: they are a succinct representation fo a regular set of paths.)

M2L is decidable; yet most extensions lead to an undecidable logic.

See the following TAPOS and OOPSLA paper: http://citeseer.nj.nec.com/cache/papers/cs/280/ftp:zSzzSzftp.ccs.neu.eduzSzpubzSzpeoplezSzlieberzSztaposzSzrev2.pdf/klarlund97formal.pdf

Since this paper a lot of progress has been made:

http://citeseer.nj.nec.com/327523.html

http://citeseer.nj.nec.com/cache/papers/cs/16299/http:zSzzSzwww.brics.dkzSz~amoellerzSzpaperszSzsecretszSzpaper.pdf/klarlund00mona.pdf

A Domain-Specific Language for Regular Sets of Strings and Trees (1997) Abstract: We propose a new high-level programming notation, called FIDO, that we have designed to concisely express regular sets of strings or trees. In particular, it can be viewed as a domain-specific language for the expression of finite-state automata on large alphabets (of sometimes astronomical size). FIDO is based on a combination of mathematical logic and programming language concepts. http://citeseer.nj.nec.com/cache/papers/cs/8330/http:zSzzSzwww.usenix.orgzSzpublicationszSzlibraryzSzproceedingszSzdsl97zSzfull_paperszSzklarlundzSzklarlund.pdf/klarlund97domainspecific.pdf

@article{ klarlund99domainspecific,
author = "Nils Klarlund and Michael I. Schwartzbach",
title = "A Domain-Specific Language for Regular Sets of Strings and Trees",
journal = "Software Engineering",
volume = "25",
number = "3",
pages = "378--386",
year = "1999",
url = "citeseer.nj.nec.com/klarlund97domainspecific.html" }

3. Lessons from AOP: (1) Domain-specific aspect languages might be a better approach than a general purpose aspect language. The reason is that domain specific aspect languages can utilize a higher level join point model. We can even use a domain-specific language that generates code that is the basis for a higher-level join point model. The join points are then advised by additional aspects. See the XAspects paper in the 3D track at OOPSLA 2003 for further arguments for domain-specific aspect languages.

@inproceedings{XAspects:SLS-oopsla-03,
AUTHOR = "Macneil Shonle and Karl Lieberherr and Ankit Shah",
TITLE = "XAspects: An Extensible System for Domain Specific Aspect Languages",
booktitle = "OOPSLA '2003, Domain-Driven Development Track",
YEAR = 2003,
MONTH = "October"
}

John Sung's thesis proposal on "Cognitive Analysis of Scientific Theory Development in Genetics" builds on the work of Lakoff. John uses Lakoff's Conceptual Metaphor Theory (1980) and Conceptual Blending Theory by Fauconnier and Turner (2002) to analyze the theory of genetics. I can not resist but I see the following conections in simplified form: metaphor <-> aspect and blending <-> composition of aspect and metaphor mapping <-> attachment (of aspect). I think this is interesting from the point of view of XAspects where the "blending" of domain specific aspect languages needs further study.

Richard Gabriel's related ideas: http://www.dreamsongs.com/10ideas.html

John McCarthy's Elephant: http://www-formal.stanford.edu/jmc/elephant.html
Some quotes:
Elephant source programs may not need data structures, because they can refer directly to the past.
This article proposes several new features for programming languages more or less taken from natural language.
3 Referring to the past Algolic programs refer to the past via variables, arrays and other data structures. Elephant 2000 programs can refer to the past directly. In one respect, this is not such a great difference, because the program can be regarded as having a single virtual history list or journal. It is then a virtual side-effect of actions to record the action in the history list.
However, we propose to provide ways of referring to the past that are semantically more like the ways people refer to the past in natural languages than just having an index variable into a list.
Philosophers treat speech acts as natural phenomena to be studied. However, they propose not to treat them from the point of view of anthropology or linguistics. Instead they study their essential characteristics in terms of what they accomplish. This makes their work more relevant to computer science and artificial intelligence than linguistic or anthropological work would be.

Terry Winograd's KRL:
http://hci.stanford.edu/~winograd/publications.html
http://www.ai.mit.edu/people/jcma/papers/1986-ai-memo-871/subsection3_8_2.html

A reviewer writes: I think an example from programming-in-the-large would be more interesting. For example, how would you describe a visitor pattern.
A visitor is advice on a subset of the join points: the advice is only on node and edge visits of an object graph. We view the traversal that tells the visitor where to go to be defined separately. Visitors are a good example to study referential mechanisms. When we visit a node or edge, we would like to refer back to what happened at certain node or edge visits in the past. We could program this by adding variables to the visitor to store the relevant information but the program becomes more understandable if we can easily refer back to computations that happened earlier. We distinguish between two kinds of references to the past: the LocalPast and the GlobalPast. The LocalPast is about the past that is currently still on the stack. In AOP terminology we would say the current join point, the enclosing join point, the enclosing join point of the enclosing join point etc. The GlobalPast consists of all nodes and edges visited so far by the traversal associated with the visitor.

Examples of references we would like to make are:
the most recent node of type Company that we have visited in LocalPast (or GlobalPast) and that was reached through edge subsidiares in LocalPast
the most recent edge labeled subsidiares in LocalPast (or GlobalPast)
the most recent node of type Vertex reachable through edge vertex in GlobalPast

http://www.ccs.neu.edu/home/lieber/com1205/w01/materials/html/alpha.html (ContextVisitor example towards the end)
gives a hint at how to implement such referential capabilities although the presented solution is far from complete.
classGraph.traverse(what, whereToGo, whereAndWhatToDo)
where classGraph is the meta information in the UML class diagram, what is the object to be processed, whereToGo selects the subobject relevant for the processing and whereAndWhatToDo is advice on whereToGo that contains the referential statements. A good way to express those referential statements might be to use expressions like thisJoinPoint.LocalPast(exp1) or thisJoinPoint.GlobalPast(exp2) where the detailed structure of exp1 and exp2 needs to be worked out.

References between ontologies:
http://www-db.stanford.edu/SKC/publications/ifip99.html
http://www-db.stanford.edu/SKC/
talks about composition of ontologies. Some of this is of interest to XAspects. Intersection is the most crucial operation since it identifies the articulation over two ontologies, namely the terms where linkage occurs among the domains.

Data flow based pointcuts provide another referential mechanism [Masuhara et al. 2003]. For example, as an addition to AspectJ, dflow[x,x'](p) matches if the value of x in the current join point originates from a value of x' in a previous join point that matches p.

@INPROCEEDINGS{masuhara:dflow,
AUTHOR = "Hidehiko Masuhara and Kazunori Kawauchi",
TITLE = "Dataflow Pointcut in Aspect-Oriented Programming",
BOOKTITLE = "APLAS 03: Asian Symposium on Programming Languages and Systems",
YEAR = "2003",
ADDRESS = "Beijing",
PAGES = "",
EDITOR = "",
PUBLISHER = "Springer Verlag"
}