Preserving the Documentary Structure of Source Code in Language-Based Transformation Tools

Language-based tools necessarily translate textual source code into grammar-based representations. During translation, tools such as compilers and analyzers are generally free to discard comments and white space, which have no impact on the code's formal meaning. Tools that produce transformed source code for human consumption enjoy no such freedom. Comments and white space are crucial to the comprehensibility and maintainability of source code and thus to its ultimate value. However, it is not always practical or desirable for transformation tools to replicate comments and white space in their entirety. An analysis of the documentary (as opposed to linguistic) structure of source code leads to a practical strategy for preserving its comprehensibility when processed by such tools.

[1]  M. Fowler Improving the Design of Existing Code , 2000 .

[2]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[3]  Richard C. H. Connor,et al.  Persistent Program Construction through Browsing and User Gesture with some Typing , 1992, POS.

[4]  Pierre N. Robillard Automating comments , 1989, SIGP.

[5]  Donald E. Knuth,et al.  Literate Programming , 1984, Comput. J..

[6]  Thomas Reps,et al.  Programming Techniques and Data Structures , 1981 .

[7]  Peter Grogono,et al.  Comments, assertions and pragmas , 1989, SIGP.

[8]  Lisa Friendly,et al.  The Design of Distributed Hyperlinked Programming Documentation , 1995, IWHD.

[9]  Curtis R. Cook,et al.  Typographic Style is More , 1990 .

[10]  Ted Tenny,et al.  Program Readability: Procedures Versus Comments , 1988, IEEE Trans. Software Eng..

[11]  Michael J. Kaelbling Programming languages should NOT have comment statements , 1988, SIGP.

[12]  Kate Ehrlich,et al.  Empirical Studies of Programming Knowledge , 1984, IEEE Transactions on Software Engineering.

[13]  Mats Lind,et al.  The art of the obvious , 1992, CHI.

[14]  Curtis R. Cook,et al.  Typographic style is more than cosmetic , 1990, CACM.

[15]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[16]  Curtis R. Cook,et al.  Using literate programming to teach good programming practices , 1994, SIGCSE '94.

[17]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[18]  Greg J. Badros JavaML: a markup language for Java source code , 2000, Comput. Networks.

[19]  Aaron Marcus,et al.  Human factors and typography for more readable programs , 1990 .

[20]  A. Dearle,et al.  A Hyperlinked Persistent Software Development Environment , 2000 .

[21]  Marat Boshernitsan,et al.  Displaying and Editing Source Code in Software Engineering Environments , 2000 .

[22]  Adele Goldberg,et al.  Programmer as Reader , 1987, IEEE Software.

[23]  Frank W. Calliss Problems with automatic restructurers , 1988, SIGP.

[24]  Susan L. Graham,et al.  Source-to-source translation: Ada to Pascal and Pascal to Ada , 1980, SIGPLAN '80.