This work continues to form indirect anaphora as a new means of reference that is transferred from cognitive linguistics to the Java programming language. Indirect anaphora is a kind of textual reference in which a phrase is related but not co-referential to another phrase. Although my knowledge of linguistics is limited, the transfer starts with Schwarz-Friesel's process-oriented cognitive model of indirect anaphora as well as a modular theory of mental representations, three-tier semantics and her concept of a text-world model. Programming languages are considered metaphorically connected to natural languages and this relation is expanded by adding indirect anaphora to Java. Key aspects of the metaphor of indirect anaphors in Java are that textual and memorized knowledge is identical in Java and that an abstract syntax tree of Java source code functions as a text-world model. A subset of Schwarz-Friesel's forms of indirect anaphora is modeled using pre- and postconditions and invariants and is partially implemented for compile-time resolution. Development was test-first instead of using real-world source code, the impact of control structures has not yet been considered. Applicability of indirect anaphors will be relative to individual programmers, tasks and dynamics of learning.
This text is a reworked version of my submitted but abrupt bachelor thesis. It describes an obviously non-final state of my work but allows for feedback.
java -jar JaaaCompiler.jar to run it and see usage
instructions.
Sources are available zipped and from Subversion repositories.
The zip file src.zip contains the following directories:
src/Anaphora/ contains the main project filessrc/Java1.4Backend/ contains files from the JastAddJ project that are used to build the compilersrc/Java1.4Frontend/ "src/Java1.5Backend/ "src/Java1.5Frontend/ ".Note that the source files from the JastAddJ project are only provided to be able to compile the released version autonomously.
The sources are also available directly from Subversion repositories. The following list provides links to the repositories along with the tag or in case of the JastAddJ sources the revision used and the revision that contains the last modification to the module in question.
The following hints are based on the zipped sources but apply just as well to sources checked out from SVN.
To build the project yourself, copy the directories under src/ to
a writable directory and either invoke ant jar to generate a
binary, or ant test to execute the tests. Use ant
clean to remove built artifacts. Most likely you need to increase
the heap space by setting the environment variable ANT_OPTS:
export ANT_OPTS=-Xmx256m.
The project is developed under Eclipse, hence the projects files can
also be maintained in eclipse. Each subdirectory of src/
comes with a .project file and is to be imported as a
separate project in Eclipse. Please make sure that each projects is
named after the subdirectory of src/ it is based on. You
can configure the targets invoked above in Eclipse and will need to
increase heap space as well. A Ant separate target gen is
provided that does not compile but only generates the sources of the
compiler so they can be edited, compiled and tested in Eclipse.