The transform tool is a command-line program with the following syntax:
java {java-flags} Transform {flags} spec-file {flags|parameters} wherejava-flagsare the standard Java virtual machine options,spec-fileis the name of the transform specificationfile (which must end in.spec), and parameters are either the names of Java sourcefiles, or directories to process recursively. Possible flags are as follows:
-v Verbose output. Display the names offiles as they are processed.
-i Incremental processing. Only process files if the sourcefile has a modification time more recent than the corresponding outputfile, or the outputfile does not exist.
-check Exit with error status if aprohibitrule is violated.
-o directory Output location. When processingfiles from an input directory struc-
ture, they are output to a corresponding location in a directory tree with root in the most recently processed-oflag. There can be multiple-oflags, and input files are processed according to the preceding-oflag.
-dt Enables debugging output for the transformation process. -ds Enables debugging output for the symbol table processing. -dr Enables debugging output for the type resolution process. -df Display information tracking thefile lookup process.
-showtree Display the parsed sourcefile using Antlr’s debugging widget.
Appendix B
Graphs
0 10 20 30 40 50
Heap size (MB > min heap) 0 0.5 1 1.5 2 2.5 3 Elapsed time (s) gcj 3.3 - Boehm JMTk/gcj - Boehm JMTk/gcj - semiSpace JMTk/gcj - genMS
Cross-platform comparison
Functional tree benchmark
Figure B.1: gcj and Boehm comparison: FTree benchmark.
82 Graphs
0 10 20 30 40 50 60 70 80 90 100
Heap size (MB > min heap) 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Elapsed time (s) gcj 3.3 - Boehm JMTk/gcj - Boehm JMTk/gcj - semiSpace JMTk/gcj - genMS
Cross-platform comparison
Functional tree benchmark
Bibliography
ALPERN, B., ATTANASIO, C. R., BARTON, J. J., COCCHI, A., HUMMEL, S. F., LIEBER, D., NGO, T., MERGEN, M. F., SHEPHERD, J. C., AND SMITH, S. 1999. Im- plementing Jalape ˜no in Java. In Proceedings of the 1999 ACM Conference on Object- Oriented Programming Systems, Languages and Applications (OOPSLA ’99)(1999), pp. 314–324. (p. 16)
ALPERN, B., ATTANASIO, C. R., BARTON, J. J., COCCHI, A., HUMMEL, S. F., LIEBER, D., NGO, T., MERGEN, M. F., SHEPHERD, J. C., AND SMITH, S. 2000. The Jalape ˜no virtual machine.IBM System Journal 39, 1 (Feb.), 211–238. (p. 16)
APPEL, A. W. 1989. Simple generational garbage collection and fast allocation.
Software—Practice and Experience 19, 171–183. (pp. 12, 54)
ATTANASIO, C. R., BACON, D. F., COCCHI, A., ANDSMITH, S. E. 2001. A com- parative evaluation of parallel garbage collectors. In Proceedings of the Fourteenth Annual Workshop on Languages and Compilers for Parallel Computing, Lecture Notes in Computer Science (June 2001). Springer-Verlag. Forthcoming. (p. 11)
AUGUSTSSON, L. 1984. A compiler for lazy ml. In Proc. ACM Symposium on Lisp
and Functional Programming(1984). (pp. 18, 47)
BARTLETT, J. F. 1988. Compacting garbage collection with ambiguous roots. Tech- nical Report 88/2, DEC WRL. (p. 12)
BERSHAD, B. N., CHAMBERS, C., EGGERS, S. J., MAEDA, C., MCNAMEE, D., PARDYAK, P., SAVAGE, S.,AND SIRER, E. G. 1994. SPIN - an extensible micro- kernel for application-specific operating system services. InACM SIGOPS European Workshop(1994), pp. 68–71. (p. 74)
BLACKBURN, S. M., CHENG, P., AND MCKINLEY, K. S. 2004a. Myths and real- ities: The performance impact of garbage collection. In Submitted for Publication to SIGMETRICS(2004). http://www.cs.utexas.edu/users/mckinley/papers/jmtk- sigmetrics-submit-2003.ps.g z. (pp. 13, 15, 62, 67)
BLACKBURN, S. M., CHENG, P., AND MCKINLEY, K. S. 2004b. Oil and water? High performance garbage collection in Java with JMTk. InSubmitted for Publica- tion to ICSE(2004). http://www.cs.utexas.edu/users/mckinley/papers/jmtk-icse- submit-2003.ps.gz. (pp. 13, 15)
BLACKBURN, S. M., JONES, R., MCKINLEY, K. S., ANDMOSS, J. E. B. 2002. Belt- way: Getting around garbage collection gridlock. InProceedings of the ACM SIG- PLAN Conference on Programming Language Design and Implementation (PLDI)(Berlin, Germany, June 2002). ACM. (pp. 11, 13)
84 Bibliography
BLACKBURN, S. M.ANDMCKINLEY, K. S. 2003. Ulterior Reference Counting: Fast Garbage Collection without a long wait (Oct. 2003). OOPSLA 2003. (pp. 11, 16)
BOEHM, H.-J.AND WEISER, M. 1988. Garbage collection in an uncooperative en- vironment.Software Practice and Experience 18, 9, 807–820. (p. 11)
CHENEY, C. J. 1970. A non-recursive list compacting algorithm.Communications of
the ACM 13, 11 (Nov.), 677–678. (p. 9)
CLINGER, W. D. AND HANSEN, L. T. 1997. Generational garbage collection and the radioactive decay model. InSIGPLAN Conference on Programming Language De- sign and Implementation(1997), pp. 97–108. (p. 11)
CLINGER, W. D. AND HANSEN, L. T. 2002. An experimental study of renewal- older-first garbage collection. InProceedings of the International Conference on Func- tional Programming(Oct. 2002). ACM. (pp. 11, 12)
COLLINS, G. E. 1960. A method for overlapping and erasure of lists.Communica-
tions of the ACM 3, 12 (Dec.), 655–657. (p. 8)
DEUTSCH, L. P. AND BOBROW, D. G. 1976. An efficient incremental automatic garbage collector.Communications of the ACM 19, 7 (July), 522–526. (p. 9)
DIJKSTRA, E. W., LAMPORT, L., MARTIN, A. J., SCHOLTEN, C. S., ANDSTEFFENS, E. F. M. 1978. On-the-fly garbage collection: An exercise in cooperation.Commu- nications of the ACM 21, 11 (Nov.), 965–975. (p. 7)
FENICHEL, R. R.ANDYOCHELSON, J. C. 1969. A lisp garbage collector for virtual memory systems.Communications of the ACM 12, 11 (Nov.), 611–612. (p. 9)
FLACK, C., HOSKING, T., AND VITEK, J. 2003. Idioms in ovm. Technical Report CSD-TR-03-017, Department of Computer Sciences, Purdue University. (p. 17)
GARRIDO, A.ANDJOHNSON, R. 2003. Refactoring C with conditional compilation. In18th IEEE International Conference on Automated Software Engineering (ASE 2003)
(Montreal, Canada, Oct. 2003), pp. 323–326. IEEE. (p. 43)
GILANI, F. 2003. Title unknown. Master’s thesis, Australian National University.
(pp. 68, 71)
GOSLING, J., JOY, B., STEELE, G.,ANDBRACHA, G. 2000. The Java Language Speci-
fication. Addison-Wesley. (p. 73)
HANSEN, W. J. 1969. Compact list representation: Definition, garbage collection and system implementation. Communications of the ACM 12, 9 (Sept.), 499–507.
(p. 9)
HENDERSON, F. 2002. Accurate garbage collection in an uncooperative environ- ment. In Proceedings of the third international symposium on Memory management
(2002), pp. 150–156. ACM Press. (p. 78)
HUDSON, R., MOSS, E., DIWAN, A., AND WEIGHT, C. F. 1991. A language- independent garbage collector toolkit. Technical Report TR 91-47, University of Massachusetts at Amherst. (p. 13)
Bibliography 85
JOHNSSON, T. 1984. Efficient compilation of lazy evaluation. InProc. ACM SIG-
PLAN ’84 Symposium on Compiler Construction (1984). SIGPLAN Notices 19(6).
(pp. 18, 47)
JONES, R. AND LINS, R. 1996. Garbage Collection. John Wiley and Sons. (pp. 5, 8, 12)
LEVANONI, Y. ANDPETRANK, E. 2001. An on-the-fly reference counting garbage collector for java. InACM Conference on Object-Oriented Programming, Systems, Lan- guages, and Applications (OOPSLA’01).(2001), pp. 367–380. (p. 9)
LIEBERMAN, H.ANDHEWITT, C. 1983. A real-time garbage collector based on the lifetimes of objects.Communications of the ACM 26, 6, 419–429. (p. 10)
MCCARTHY, J. 1960. Recursive functions of symbolic expressions and their com- putation by machine.Communications of the ACM 3, 4 (April), 173–197. (pp. 7, 8)
NELSON, G. Ed. 1991. Systems Programming with Modula-3. Prentice Hall. (p. 74)
PARR, T. 2002. ANTLR: Another Tool for Language Recognition.
http://www.antlr.org/. (p. 41)
PARR, T. J. 1994. An overview of SORCERER: A simple tree-parser generator. Tech- nical report,http://www.antlr.org/. (p. 41)
PARR, T. J.ANDQUONG, R. W. 1995. Antlr: A Predicated-LL(k) Parser.Software—
Practice And Experience 25, 7 (July), 789–810. (p. 41)
PEYTONJONES, S. L. 1987. The implementation of Functional Programming Languages. Prentice Hall. (pp. 18, 47)
PEYTONJONES, S. L. 1992. Implementing lazy functional languages on stock hard- ware: the spineless tagless g-machine.Journal of Functional Programming 2, 127–202.
(p. 47)
PEYTON JONES, S. L., MARLOW, S., AND REID, A. 1999. The STG runtime. http://www.haskell.org/ghc/. (p. 48)
QUINANE, L. 2003. Honours thesis. A.N.U. (p. 9)
RITCHIE, S. 1997. Systems Programming in Java.IEEE Micro 17, 3 (May/June), 30– 35. (pp. 16, 73)
ROVNER, P. 1985. On adding garbage collection and runtime types to a strongly typed, statically-checked, concurrent language. Technical report CSL-84-7 (July), Xerox PARC, Palo Alto, CA. (p. 5)
SANSOM, P. 1991. Dual-mode garbage collection. In H. GLASER AND P. H. HAR- TELEds.,Proceedings of the Workshop on the Parallel Implementation of Functional Lan-
guages(Southampton, UK, 1991), pp. 283–310. Department of Electronics and Com- puter Science, University of Southampton. (p. 12)
STEFANOVIC´, D. 1993. The garbage collection toolkit as an experimentation tool. OOPSLA 1993 Workshop on Memory Management and Garbage Collection.
86 Bibliography
STEFANOVIC, D., MCKINLEY, K. S.,ANDMOSS, J. E. B. 1999. Age-based garbage collection. InOOPSLA ’99(1999), pp. 370–381. (p. 11)
STEFANOVIC´, D., MOSS, J. E. B.,ANDMCKINLEY, K. S. 1998. Oldest-first garbage collection. Technical Report 98–81, University of Massachusetts. (p. 11)
UNGAR, D. M. 1984. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. ACM SIGPLAN Notices 19, 5 (April), 157–167.
(p. 10)
WADSWORTH, C. P. 1971. Semantics and Pragmatics of the lambda calculus. PhD the- sis, Oxford University. (p. 48)
WARRINGTON, I. 2003. Honours thesis. A.N.U. (p. 9)
WILSON, P. R. 1992. Uniprocessor garbage collection techniques. In H. BAKEREd.,
Proceedings of the International Workshop on Memory Management, Volume 637 ofLec- ture Notes in Computer Science(St Malo, France, Sept. 1992). Springer-Verlag. (p. 86)
WILSON, P. R. 1994. Uniprocessor garbage collection techniques. Expanded ver- sion of [Wilson 1992]. (p. 12)
WILSON, P. R., JOHNSTONE, M. S., NEELY, M., AND BOLES, D. 1995. Dynamic storage allocation: A survey and critical review. In H. BAKEREd.,Proceedings of In-
ternational WOrkshop on Memory Management, IWMM’95, Kinross, Scotland, Volume 986 ofLecture Notes in Computer Science(Sept. 1995). Springer-Verlag. (p. 6)
ZORN, B. 1991. The effect of garbage collection on cache performance. Techni- cal Report CU–CS–528–91, Department of Computer Science, Boulder, Colorado.
Never index your own book
She said that indexing was a thing that only the most amateurish author undertook to do for his own book. I asked her what she thought of Philip Castle’s job.
‘Flattering to the author, insulting to the reader,’ she said. ‘In a hyphenated word,’ she observed, with the shrewd amiability of an expert, ‘ “self-indulgent”. I’m always embarrassed when I see an index an author has made of his own work.’
‘Embarrassed ?’
‘It’s a revealing thing, an author’s index of his own work,’ she informed me. ‘It’s a shameless exhibition—to thetrainedeye.’
‘She can read character from an index,’ said her husband. ‘Oh ?’ I said. ‘What can you tell about Philip Castle ?’ She smiled faintly. ‘Things I’d better not tell strangers.’
Kurt Vonnegut
Cat’s Cradle