<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>UTas ePrints - Genesis: An Extensible Java</title> <script type="text/javascript" src="http://eprints.utas.edu.au/javascript/auto.js"><!-- padder --></script> <style type="text/css" media="screen">@import url(http://eprints.utas.edu.au/style/auto.css);</style> <style type="text/css" media="print">@import url(http://eprints.utas.edu.au/style/print.css);</style> <link rel="icon" href="/images/eprints/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/images/eprints/favicon.ico" type="image/x-icon" /> <link rel="Top" href="http://eprints.utas.edu.au/" /> <link rel="Search" href="http://eprints.utas.edu.au/cgi/search" /> <meta content="Lewis, Ian J" name="eprints.creators_name" /> <meta content="ij_lewis@utas.edu.au" name="eprints.creators_id" /> <meta content="thesis" name="eprints.type" /> <meta content="2007-01-22" name="eprints.datestamp" /> <meta content="2008-01-08 15:30:00" name="eprints.lastmod" /> <meta content="show" name="eprints.metadata_visibility" /> <meta content="Genesis: An Extensible Java" name="eprints.title" /> <meta content="unpub" name="eprints.ispublished" /> <meta content="280303" name="eprints.subjects" /> <meta content="280301" name="eprints.subjects" /> <meta content="public" name="eprints.full_text_status" /> <meta content="Programming Languages, Extensibility, Java, Meta-programming" name="eprints.keywords" /> <meta content="Extensible programming languages allow users to create fundamentally new syntax and translate this syntax into language primitives. The concept of compile-time meta-programming has been around for decades, but systems that provide such abilities generally disallow the creation of new syntactic forms, or have heavy restrictions on how, or where, this may be done. Genesis is an extension to Java that supports compile-time meta-programming by allowing users to create their own arbitrary syntax. This is achieved through macros that operate on a mix of both concrete and abstract syntax, and produce abstract syntax. Genesis attempts to provide a minimal design whilst maintaining, and extending, the expressive power of other similar macro systems. The core Genesis language definition lacks many of the desirable features found in other systems, such as quasi-quote, hygiene, and static expression-type dispatch, but is expressive enough to define these as syntax extensions. User-defined macros produce only well-formed syntactic structures via the use of a predefined set of classes that define a Java abstract syntax. At the heart of Genesis is a flexible parser that is capable of parsing any context-free grammars - even ambiguous ones. The parser is capable of arbitrary speculation and will consider all possible parses. The parser constructs a graph of possible paths, and is capable of dynamically pruning this graph, or combining nodes, based on precedence or associativity rules. This general parser allows macro programmers to forget about parsing, and concentrate on defining new syntax. One key goal of this system was to address the programmer's learning curve by providing as simple a system as possible. This was achieved by the use of the flexible parser, the introduction of only one new construct to standard Java, and extensions to make programming macros more user friendly. The expressiveness of Genesis is wide ranging; it is capable of providing small scale limited use macros, large scale semantic modifications, through to complete language replacements. To demonstrate this expressiveness, we implement many of the simple test cases found in other systems, such as a type-safe printf, assertions, and iteration statements. These test cases require an ability to perform static type-checking and to manipulate compile-time values and abstract syntax trees. As additional examples of Genesis' expressive power we also provide implementations of embedded subsets of SQL and Haskell. As a final proof of power, the Haskell subset can operate as a stand-alone extension independent of any recognisable Java code. " name="eprints.abstract" /> <meta content="2005-12" name="eprints.date" /> <meta content="published" name="eprints.date_type" /> <meta content="338" name="eprints.pages" /> <meta content="University of Tasmania" name="eprints.institution" /> <meta content="School of Computing" name="eprints.department" /> <meta content="phd" name="eprints.thesis_type" /> <meta content="[Ach+05] Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Philip Olson, Georg Richter, Damien Seguy, Jakub Vrana et al. Gabor Hojtsy (editor): PHP Manual, March 2005. Available from (viewed March 2005): http://www.php.net/manual/en/ [AG04] David Abrahams and Aleksey Gurtovoy: C++ Template Meta-programming, Concepts, Tools, and Techniques from Boost and Beyond, Addison-Wesley, December 2004. ISBN 0-321-22725-5. [ANS89] American National Standards Institute: Database Language Embedded SQL, ANSI standard X3.168-1989, 1989. [ANS92] American National Standards Institute: Database Language SQL, ANSI standard X3.135-1992, 1992. [Ast+05] Manuel Astudillo, Max Battcher, Jorgen Bodde, Matthew Hawkins, Justin Holmes, Paul Hulskamp, Marcus Klimstra, Milosz A. Krajewski, Adrian Moore, Vladimir Morozov, Alexandre Rai, Eylem Ugurel, Martin van der Geer, Robert van Loenhout, and Reggie Wilbanks: GOLD Parsing System, May 2005. Available from (viewed June 2005): http://www.devincook.com/ [ASU86] Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman: Compilers, Principle, Techniques, and Tools, Addison-Wesley, Reading, Massachusetts, 1986. ISBN 0-201-10088-6. [Bak01] Jason Baker: Macros that Play: Migrating from Java to Maya, Masters Thesis, University of Utah, December 2001. Available from (viewed March 2005): http://www.cs.utah.edu/~jbaker/maya/thesis.pdf [Bar91] J. G. P. Barnes: Programming in Ada plus Language Reference Manual, 3rd Edition, Addison-Wesley, 1991. ISBN 0-201-56539-0. [BCVM02] A. Bryant, A. Catton, K. De Volder, and G. C. Murphy: Explicit programming. In, Proceedings of the First International Conference on Aspect-Oriented Software Development, Enschede, The Netherlands, April 2002. Available from (viewed April 2005): http://www.cs.ubc.ca/~murphy/papers/ep/ep-aosd02.pdf [BDMN73] Graham M. Birtwistle, Ole-Johan Dahl, Bjorn Myhrhaug, and Kristen Nygaard: Simula Begin, Auerbach Press, Philadelphia, 1973. ISBN 0-884-05032-7. [BFYV96] Frank Budinsky, Marilyn Finnie, Patsy Yu, and John Vlissides: Automatic Code Generation from Design Patterns. In, IBM Systems Journal, Volume 35, Issue 2, pp. 151-171, IBM Corporation, Riverton, New Jersey, 1996. Available from (viewed April 2005): http://www.research.ibm.com/designpatterns/pubs/codegen.pdf [BH02] Jason Baker and Wilson C. Hsieh: Maya: Multiple-Dispatch Syntax Extension in Java. In, Proceedings of the ACM SIGPLAN 02 Conference on Programming Language Design and Implementation, pp. 270-281, Berlin, Germany, June 2002. Available from (viewed April 2005): http://www.cs.utah.edu/~wilson/papers/maya-pldi02.pdf [Bla01] BLAST Forum: Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard, August, 2001. Available from (viewed April 2005): http://www.netlib.org/blas/blast-forum/blas-report.pdf [BLS98] Don Batory, Bernie Lofaso, and Yannis Smaragdakis: JTS: tools for implementing domain specific languages. In, Proceedings of the Fifth International Conference on Software Reuse, pp. 143-153, Victoria, British Columbia, Canada, 1998. Available from (viewed April 2005): http://www.cs.tut.fi/~gp/materiaali/BatoryPapers.pdf [BOSW98a] Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler: GJ: Extending the Java Programming Language with type parameters, Manuscript, March 1998; revised August 1998. Available from (viewed March 2005): http://homepages.inf.ed.ac.uk/wadler/gj/Documents/gj-tutorial.pdf [BOSW98b] Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler: GJ Specification, Manuscript, May 1998. Available from (viewed March 2005): http://homepages.inf.ed.ac.uk/wadler/gj/Documents/gj-specification.pdf [BOSW98c] Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler: Making the future safe for the past: Adding Genericity to the Java Programming Language, OOPSLA 98, Vancouver, October 1998. Available from (viewed March 2005): http://homepages.inf.ed.ac.uk/wadler/gj/Documents/gj-oopsla.pdf [BP01] Jonathan Bachrach and Keith Playford: The Java Syntactic Extender (JSE). In, Proceedings of the 16th ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages, and Applications, pp. 31-42, Tampa Bay, Florida, 2001. Available from (viewed April 2005): http://people.csail.mit.edu/people/jrb/jse/jse.pdf [Bra99] Gilad Bracha: Add generic types to the Java programming language, Java Specification Request (JSR) 14, Sun Microsystems, 1999. Available from (viewed March 2005): http://www.jcp.org/en/jsr/detail?id=14 [Bra02] Gilad Bracha: Extending the Java Programming Language with Enumerations, Autoboxing, Enhanced for loops and Static Import, Java Specification Request (JSR) 201, Sun Microsystems, 2002. Available from (viewed March 2005): http://www.jcp.org/en/jsr/detail?id=201 [BS02] C. Brabrand and M. Schwartzbach: Growing languages with metamorphic syntax macros. In, Proceedings of the Workshop on Partial Evaluation and Semantics-Based Program Manipulation 02, Portland, Oregon, January 2002. Available from (viewed April 2005): http://www.brics.dk/bigwig/publications/macro.pdf [CE98] K. Czarnecki and U. Eisenecker: Meta-control structures for template meta-programming, 1998. Available from: http://home.t-online.de/home/Ulrich.Eisenecker/meta.htm [Chr96] Thomas W. Christopher: Icon Programming Language Handbook, Tools of Computing, Evanston, Illinois,1996. Available from (viewed April 2005): http://www.tools-of-computing.com/tc/CS/iconprog.pdf [CLCM00] Curtis Clifton, Gary T. Leavens, Craig Chambers, and Todd Millstein: MultiJava: Modular Open Classes and Symmetric Multiple Dispatch for Java. In, Proceedings of the 15th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 16-24, Vancouver, British Columbia, October 2000. Available from (viewed March 2005): http://www.cs.iastate.edu/~cclifton/multijava-data/papers/TR00-06.pdf [Cli01] Curtis Clifton: MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch, Masters Thesis, Iowa State University, December 2001. Available from (viewed March 2005): http://www.cs.iastate.edu/~cclifton/papers/MastersThesis.pdf [CMA94] Luca Cardelli, Florian Matthes, and MartÃÂÃÂn Abadi: Extensible syntax with lexical scoping, Technical Report 121, Digital Equipment Corporation Systems Research Center (DEC SRC), February 1994. Available from (viewed April 2005): http://www.cse.ucsc.edu/~abadi/Papers/jmgrammar.ps [Cor00] Robert Corbett: Berkeley Yacc, June 2000. Available from: ftp://ftp.cs.berkeley.edu/pub/4bsd/byacc.1.9.tar.Z. [CS70] John Cocke and Jacob T. Schwartz: Programming languages and their compilers: Preliminary notes, Technical report, Courant Institute of Mathematical Sciences, New York University, 1970. [DM05] Ulrich Drepper and Ingo Molnar: The Native POSIX Thread Library for Linux, Whitepaper, February 2005. Available from (viewed March 2005): http://people.redhat.com/drepper/nptl-design.pdf [Dyb03] R. Kent Dybvig: The Scheme Programming Language, 3rd edition, MIT Press, 2003. ISBN 0-262-54148-3. Available from (viewed March 2003): http://www.scheme.com/tspl3/ [Ear70] Jay Earley: An Efficient Context-Free Parsing Algorithm, Communications of the ACM, Volume 13, Number 2, pp. 94-102, February 1970. [EH01] Jon Ellis and Linda Ho: JDBC 3.0 Specification, Sun Microsystems, October 2001. Available from (viewed June 2005): http://java.sun.com/products/jdbc/download.html [FGP64] David J. Farber, Ralph E. Griswold, and Ivan P. Polonsky: SNOBOL, A String Manipulation Language, Journal of the ACM, Volume 11, Number 1, pp. 21-30, January 1964. [For77] ANSI: Programming Language Fortran, X3.9-1978, American National Standard. Available from (viewed March 2003): http://www.fortran.com/fortran/F77_std/rjcnf0001.html [GD83] Adele Goldberg, and David Robson: Smalltalk-80. The language and its implementation, Addison-Wesley, Reading, Massachusetts, May 1983. ISBN 0-201-11371-6. [GJ90] Dick Grune and Ceriel Jacobs: Parsing Techniques, A Practical Guide, Ellis Horwood, Chichester, West Sussex, 1990. ISBN 0-13-651431-6. Available from (viewed April 2005): ftp://ftp.cs.vu.nl/pub/dick/PTAPG/BookBody.pdf [GJSB00] James Gosling, Bill Joy, Guy Steele, and Gilad Bracha: The Java Language Specification, 2nd Edition, The Java Series, Addison-Wesley, Boston, Massachusetts, 2000. ISBN 0-201-31008-2. Available from (viewed March 2005): ftp://ftp.javasoft.com/docs/specs/langspec-2.0.pdf [GJSB05] James Gosling, Bill Joy, Guy Steele, and Gilad Bracha: The Java Language Specification, 3rd Edition, The Java Series, Addison-Wesley, draft, 2005. Available from (viewed March 2005): http://java.sun.com/docs/books/jls/java_language-3_0-mr-spec.zip [GG90] Ralph E. Griswold and Madge T. Griswold: The Icon Programming Language, 2nd edition, Prentice Hall, Englewood Cliffs, New Jersey, 1990. ISBN 0-13-447889-4. [GH03] Adam Granicz, Jason Hickey, Phobos: A Front-End Approach to Extensible Compilers. In, Proceedings of the 36th Annual Hawaii International Conference on System Sciences (HICSS03), Track 9, pp. 324.2, January 2003. Available from (viewed April 2005): http://mojave.caltech.edu/papers/hicss-36.pdf [GHC02] The GHC Team: The Glorious Glasgow Haskell Compilation System Users Guide, Version 6.4, University of Glasgow, 2002. Available from (viewed March 2005): http://www.haskell.org/ghc/docs/latest/users_guide.pdf [Gra93] Paul Graham: On Lisp: Advanced Techniques for Common Lisp, Prentice Hall, 1993. ISBN 0130305529. Available from (viewed November 2005): http://www.paulgraham.com/lib/paulgraham/onlisp.pdf [GST01] Steven E. Ganz, Amr Sabry, and Walid Taha: Macros as multi-stage computations: Type-safe, generative, binding macros in MacroML. In, Proceedings of the ACM SIGPLAN International Conference on Functional Programming 01 (ICFP01), pp. 74-85, Florence, Italy, September 2001. Available from (viewed April 2005): http://www.cs.rice.edu/~taha/publications/preprints/icfp01-pre.pdf [Gur04] Aleksey Gurtovoy et al: The Boost C++ Libraries, Release 1.32.0, November 2004. Available from (viewed March 2005): http://www.boost.org/doc/boost.pdf [Haa02] Arno Haase: Java Idioms: Exception Handling. In, Proceedings of EuroPLoP 2002, Irsee, Germany, 2002. Available from (viewed April 2005): http://hillside.net/patterns/EuroPLoP2002/papers/Haase.zip [Her04] Jack D. Herrington (editor): Greg Wilson Interview on Extensible Programming Languages, June 2004. Available from (viewed April 2005): http://www.codegeneration.net/tiki-read_article.php?articleId=56 [HM98] Graham Hutton and Erik Meijer: Functional Pearls: Monadic Parsing in Haskell. In, Journal of Functional Programming, Volume 8, Number 4, pp. 437-444, Cambridge University Press, July 1998. Available from (viewed June 2005): http://www.cs.nott.ac.uk/~gmh/pearl.pdf [HM04] David Herman and Philippe Meunier: Improving the Static Analysis of Embedded Languages via Partial Evaluation, International Conference on Functional Programming (ICFP2004), Snowbird, Utah, pp. 16-27, September 2004. Available from (viewed April 2005): http://www.ccs.neu.edu/scheme/pubs/icfp2004-hm.pdf [HW01] Anders Hejlsberg and Scott Wiltamuth: Microsoft C# Language Specifications, Microsoft Press, Redmond, Washington, 2001. [Ich99] Yuuji Ichisugi: Modular and extensible parser implementation using Mixins, Draft, March 1999. Available from (viewed April 2005): http://staff.aist.go.jp/y-ichisugi/epp/edoc/epp-parser.pdf [IHSM+96] Yutaka Ishikawa, Atsushi Hori, Mitsuhisa Sato, Motohiko Matsuda, Jorg Nolte, Hiroshi Tezuka, and Hiroki Konaka. Design and implementation of metalevel architecture in C++ - MPC++ approach. In, Proceedings of Reflection96, San Francisco, California, pp. 153-166, 1996. [Joy96] Ian Joyner: C++?? A Critique of C++ and Programming and Language Trends in the 1990s, 3rd Edition, 1996. Available from (viewed April 2005): http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/tools/java/misc/ACritiqueOfC++.pdf [Kal01] Danny Kalev: An interview with Bjarne Stroustrup: The future is multiparadigm programming, February 2001. Available from (viewed March 2005): http://www.linuxworld.com/story/32929.htm [Kas65] T. Kasami: An efficient recognition and syntax-analysis algorithm for context-free languages, Scientific report AFCRL-65-758, Air Force Cambridge Research Lab, Bedford, Massachusetts, 1965. [KR78] Brian W. Kernighan and Dennis M. Ritchie: The C Programming Language, Prentice-Hall, Englewood Cliffs, New Jersey, 1978. ISBN 0-13-110370-9. [LM02] Ian Lewis and Vishv Malhotra: An Efficient Generators Implementation in Pizza, January 2002. [Mat98] Yukihiro Matsumoto: Ruby Language Reference Manual version 1.4.6, 1998. Available from (viewed March 2005): ftp://ftp.ruby-lang.org/pub/ruby/doc/ruby-man-1.4.6.tar.gz [Mcc60] John MacCarthy: Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I, Communications of the ACM, Volume 3 , Number 4, pp. 184-195, April 1960. Available from (viewed April 2005): http://www-formal.stanford.edu/jmc/recursive.pdf [Mey92] Bertrand Meyer: Applying Design by Contract. In, IEEE Computer, Volume 25, Number 10, pp. 40-51, October 1992. [Mic05a] Microsoft: Message Maps, MFC Library Reference, Microsoft Developer Network (MSDN), Microsoft Online Documentation, 2005. Available from (viewed April 2005): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_message_maps.asp [Mic05b] Microsoft: Visual Basic Language and Run-Time Reference, Microsoft Online Documentation, 2005. Available from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vboriVBLangRefTopNode.asp [Mil84] Robin Milner: A Proposal for Standard ML. In, Proceedings of the Symposium on Lisp and Functional Programming, pp. 184-197, Austin, Texas, August 1984. [Mil00] Robin Miller (editor): C++ Answers from Bjarne Stroustrup, Slashdot Interview, Februray, 2000. Available from (viewed April 2005): http://developers.slashdot.org/article.pl?sid=00/02/25/1034222 [ML+97] Jack Melnick, Paul Lane, et al.: Programmers Guide to the Pro*C/C++ Precompiler Release 8.0, Part No. A54661-01, Oracle Corporation, June 1997. Available from (viewed March 2005): http://www-rohan.sdsu.edu/doc/oracle/server803/A54661_01/toc.htm [Mon96] Olivier Montanuy: Unofficial Quake-C Specification, August 1996. Available from (viewed March 2005): http://www.gamers.org/dEngine/quake/spec/quake-spec34/index1.htm [MPJT04] Simon Marlow, Simon Peyton Jones, and Wolfgang Thaller: Extending the Haskell Foreign Function Interface with Concurrency. In, Proceedings of the ACM SIGPLAN 2004 Haskell Workshop (Haskell 04), Snowbird, Utah, September 2004. Available from (viewed March 2005): http://research.microsoft.com/Users/simonpj/Papers/conc-ffi/conc-ffi.ps [Mue93] Frank Mueller: A library implementation of POSIX threads under Unix. In, Proceedings of the Winter 1993 USENIX Technical Conference and Exhibition, pp. 29-41, San Diego, California, January 1993. [Nau60] Peter Naur (editor): Revised report on the algorithmic language Algol 60, Communications of the ACM, pp. 299-314, May 1960. Available from (viewed April 2005): http://www.masswerk.at/algol60/report.htm [Nor96] Charles J. Northrup: Programming with UNIX Threads, John Wiley & Sons, March 1996. ISBN 0-471-13751-0. [OW97] Martin Odersky and Philip Wadler: Pizza into Java: Translating theory into practice. In, Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL97), pp. 146-159, Paris, France, January 1997. Available from (viewed April 2005): http://pizzacompiler.sourceforge.net/doc/pizza-language-spec.pdf [PJ87] Simon L. Peyton Jones: The Implementation of Functional Programming Languages, Prentice-Hall, 1987. ISBN 0-13-453333-X. [PJ99] Simon Peyton Jones (editor): Haskell 98 language and libraries: the Revised Report, Cambridge University Press, January 1999; revised December 2002. Available from (viewed March 2005): http://www.haskell.org/definition/haskell98-report.pdf [PJ02] Simon Peyton Jones: Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell, In, Engineering theories of software construction, IOS Press, Manfred Broy, Ralf Steinbruggen, pp. 47-96 , July 2002. ISBN 1-58603-1724. Available from (viewed April 2005): http://research.microsoft.com/Users/simonpj/papers/marktoberdorf/ [Pla92] P. J. Plauger: The Standard C library, Prentice Hall, Englewood Cliffs, New Jersey, 1992. ISBN 0-13-131509-9. [Pla93] P. J. Plaugher: Programming Language Guessing Games: If C++ is the Answer, whats the question?, Dr Dobbs Journal, October 1993. [PT99] Todd A. Proebsting and Gregg M. Townsend: A New Implementation of the Icon Language, Microsoft Research, The University of Arizona, October 1999. Available from (viewed March 2005): http://www.cs.arizona.edu/icon/jcon/impl.pdf [Rau03] Daniel de Rauglaudre: Camlp4 Reference Manual, version 3.07, September 2003. Available from (viewed April 2005): http://caml.inria.fr/pub/docs/manual-camlp4/index.html [RD04] Guido van Rossum and Fred L. Drake, Jr. (editor): Python Reference Manual, release 2.4 edition, November 2004. Available from (viewed March 2005): http://docs.python.org/ref/ref.html [RJHC+96] John V. W. Reynders, Paul J. Hinker, Julian C. Cummings, Susan R. Atlas, Subhankar Banerjee, William F. Humphrey, Steve R. Karmesin, Katarzyna Keahey, M. Srikant, Marydell Tholburn: POOMA: A Framework for Scientific Simulation on Parallel Architectures. In, G. V. Wilson and P. Lu, (editors): Parallel Programming Using C++, pp. 553-594, , MIT Press Cambridge, 1996. [RLHJ99] Dave Raggett, Arnaud Le Hors, and Ian Jacobs (editors): HTML 4.01 Specification, W3C Recommendation, December 1999. Available from (viewed March 2005): http://www.w3.org/TR/html4/ [Rob01] Arch D. Robinson: Impact of Economics on Compiler Optimization. In, Proceedings of the ACM 2001 Java Grande Conference, pp. 1-10, Standford University, California, June 2001. Available from (viewed April 2005): http://www.eecg.toronto.edu/~tsa/crgpapers/arch.pdf [Sha96a] A. Shalit: The Dylan Reference Manual, Addison-Wesley, Reading, Massachusetts, 1996. ISBN 0-201-44211-6. Available from (viewed April 2005): http://gauss.gwydiondylan.org/books/drm/ [Sha96b] Nik Shaylor: Java preprocessor (JPP), 1996. Available from: http://www.geocities.com/CapeCanaveral/Hangar/4040/jpp.html [SL94] Alexander Stepanov and Meng Lee: The Standard Template Library, HP Labs Technical Report HPL-94-34 (R. 1), August 1994. [SPJ02] Tim Sheard and Simon Peyton Jones: Template Meta-programming for Haskell. In, Proceedings of the ACM SIGPLAN workshop on Haskell 2002, Pittsburgh, Pennsylvania, May 2002. Available from (viewed March 2005): http://research.microsoft.com/~simonpj/papers/meta-haskell/meta-haskell.ps [Sta+04] Richard M. Stallman and the GCC Development Community: Using the GNU Compiler Collection (GCC), GNU Press, Boston, Massachusetts, May 2004. Available from (viewed March 2005): http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc.ps.gz [Ste90] G.L. Steele Jr., Common Lisp: The Language, 2nd edition, Digital Press, Bedford, Massachusetts, 1990. ISBN 1-55558-041-6. Available from (viewed April 2005): http://www.supelec.fr/docs/cltl/cltl2.html [Ste99] Guy L. Steele Jr.: Growing a Language. In Journal of Higher-Order and Symbolic Computation (Kluwer), Volume 12, Number 3, October 1999. Available from (viewed March 2005): http://homepages.inf.ed.ac.uk/wadler/gj/Documents/steele-oopsla98.pdf [Str91] Bjarne Stroustrup: The C++ Programming Language, 2nd edition, Addison-Wesley, Reading, Massachusetts, 1991, reprinted with corrections January 1994. ISBN 0-201-53992-6. [Str94] Bjarne Stroustrup: The Design and Evolution of C++, Addison-Wesley, 1994. ISBN 0-201-54330-3. [Str00] Bjarne Stroustrup: The C++ Programming Language, Special Edition, Addison-Wesley, March 2000. ISBN 0-201-70073-5. [Sun02] Sun Microsystems: Programming With Assertions, Java 2 Standard Edition (J2SE) Documentation Version 1.4.2, Sun Microsystems, 2002. Available from (viewed March 2005): http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html [Swe98] Tim Sweeney: Unreal Script Language Reference, July 1998. Available from (viewed March 2005): http://unreal.epicgames.com/UnrealScript.htm [Tat99] Michiaki Tatsubori: An Extension Mechanism for the Java Language, Masters Thesis, University of Tsukuba, February 1999. Available from (viewed April 2005): http://www.csg.is.titech.ac.jp/~mich/openjava/papers/mich_thesis99.pdf [TCKI00] Michiaki Tatsubori, Shigeru Chiba, Marc-Olivier Killijian, and Kozo Itano: OpenJava: A Class-Based Macro System for Java, Lecture Notes in Computer Science 1826, Reflection and Software Engineering, pp. 117-133, Springer-Verlag, Heidelberg, Germany, 2000. Available from (viewed March 2005): http://www.csg.is.titech.ac.jp/openjava/papers/mich_2000lncs1826.pdf [TPL01] Phil Trinder, Robert Pointon, Hans-Wolfgang Loidl: Individual Grant Review, Function Distributed Interactive Systems, GR/M55633/01, Heriot-Watt University, Edinburgh, January 2001. Available from (viewed March 2005): http://www.cee.hw.ac.uk/~dsg/gdh/papers/final.ps [TS+] Hubert Tonneau, Marcus Vinicius Santos, et al.: Pliant Reference Guide. Available from (viewed March 2005): http://playground.scs.ryerson.ca:8080/pliantdocs/babel/universal/referenceguide.html [Uni83] United States Department of Defense: Reference Manual for the Ada Programming Language, ANSI/MIL-STD-1815A-1983, United States Department of Defence, February 1983. [Unr94] E. Unruh: Prime number computation, ANSI X3J16-94-0075/ISO WG21-462, 1994. [Vel99] Todd L. Velhuizen: C++ Templates as Partial Evaluation, 1999 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, San Antonio, Texas, January 1999. Available from (viewed March 2005): http://osl.iu.edu/~tveldhui/papers/pepm99.ps [Vel01] Todd Velhuizen: Blitz++ Users Guide, Version 1.2, February 2001. Available from (viewed April 2005): http://www.oonumerics.org/blitz/manual/blitz.ps [WC93] Daniel Weise and Roger Crew: Programmable Syntax Macros. In, Proceedings of the SIGPLAN 93 Conference on Programming Language Design and Implementation (PLDI 93), pp. 156-165, Albuquerque, New Mexico, June 1993. [WCS96] Larry Wall, Tom Christiansen, and Randal L. Schwartz: Programming Perl, OReilly & Associates, Sebastopol, California, 1996. ISBN 1-56592-149-6. [Wil04] Gregory V Wilson: Extensible Programming for the 21st Century, Manuscript, May 2004. Available from (viewed April 2005): http://www.third-bit.com/~gvwilson/xmlprog.html [Wik95] Wikipedia: BrainFuck, Wikipedia, The Free Encyclopedia, draft, April 1995. Available from (viewed April 2005): http://en.wikipedia.org/wiki/Brainfuck [Wik01] Wikipedia: Operator Overloading, Wikipedia, The Free Encyclopedia, draft, December 2001. Available from (viewed June 2005): http://en.wikipedia.org/wiki/Operator_overloading [Wir71] Niklaus Wirth: The Programming Language Pascal. Acta Informatica, Volume 1, pp. 35-63, Jun 1971. [WK00] Joerg Walter and Mathias Koch: uBLAS Overview, 2000. Available from (viewed March 2005): http://www.boost.org/libs/numeric/ublas/doc/overview.htm [You67] Daniel H. Younger: Recognition and parsing of context-free languages in time n3, Information and Control, Volume 10, Number 2, pp. 189-208, 1967. " name="eprints.referencetext" /> <meta content="Lewis, Ian J (2005) Genesis: An Extensible Java. PhD thesis, University of Tasmania." name="eprints.citation" /> <meta content="http://eprints.utas.edu.au/637/1/01Front.pdf" name="eprints.document_url" /> <meta content="http://eprints.utas.edu.au/637/2/02Whole.pdf" name="eprints.document_url" /> <link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" /> <meta content="Genesis: An Extensible Java" name="DC.title" /> <meta content="Lewis, Ian J" name="DC.creator" /> <meta content="280303 Programming Languages" name="DC.subject" /> <meta content="280301 Programming Techniques" name="DC.subject" /> <meta content="Extensible programming languages allow users to create fundamentally new syntax and translate this syntax into language primitives. The concept of compile-time meta-programming has been around for decades, but systems that provide such abilities generally disallow the creation of new syntactic forms, or have heavy restrictions on how, or where, this may be done. Genesis is an extension to Java that supports compile-time meta-programming by allowing users to create their own arbitrary syntax. This is achieved through macros that operate on a mix of both concrete and abstract syntax, and produce abstract syntax. Genesis attempts to provide a minimal design whilst maintaining, and extending, the expressive power of other similar macro systems. The core Genesis language definition lacks many of the desirable features found in other systems, such as quasi-quote, hygiene, and static expression-type dispatch, but is expressive enough to define these as syntax extensions. User-defined macros produce only well-formed syntactic structures via the use of a predefined set of classes that define a Java abstract syntax. At the heart of Genesis is a flexible parser that is capable of parsing any context-free grammars - even ambiguous ones. The parser is capable of arbitrary speculation and will consider all possible parses. The parser constructs a graph of possible paths, and is capable of dynamically pruning this graph, or combining nodes, based on precedence or associativity rules. This general parser allows macro programmers to forget about parsing, and concentrate on defining new syntax. One key goal of this system was to address the programmer's learning curve by providing as simple a system as possible. This was achieved by the use of the flexible parser, the introduction of only one new construct to standard Java, and extensions to make programming macros more user friendly. The expressiveness of Genesis is wide ranging; it is capable of providing small scale limited use macros, large scale semantic modifications, through to complete language replacements. To demonstrate this expressiveness, we implement many of the simple test cases found in other systems, such as a type-safe printf, assertions, and iteration statements. These test cases require an ability to perform static type-checking and to manipulate compile-time values and abstract syntax trees. As additional examples of Genesis' expressive power we also provide implementations of embedded subsets of SQL and Haskell. As a final proof of power, the Haskell subset can operate as a stand-alone extension independent of any recognisable Java code. " name="DC.description" /> <meta content="2005-12" name="DC.date" /> <meta content="Thesis" name="DC.type" /> <meta content="NonPeerReviewed" name="DC.type" /> <meta content="application/pdf" name="DC.format" /> <meta content="http://eprints.utas.edu.au/637/1/01Front.pdf" name="DC.identifier" /> <meta content="application/pdf" name="DC.format" /> <meta content="http://eprints.utas.edu.au/637/2/02Whole.pdf" name="DC.identifier" /> <meta content="Lewis, Ian J (2005) Genesis: An Extensible Java. PhD thesis, University of Tasmania." name="DC.identifier" /> <meta content="http://eprints.utas.edu.au/637/" name="DC.relation" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/BibTeX/epprod-eprint-637.bib" title="BibTeX" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/ContextObject/epprod-eprint-637.xml" title="OpenURL ContextObject" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/ContextObject::Dissertation/epprod-eprint-637.xml" title="OpenURL Dissertation" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/ContextObject::Journal/epprod-eprint-637.xml" title="OpenURL Journal" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/DC/epprod-eprint-637.txt" title="Dublin Core" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/DIDL/epprod-eprint-637.xml" title="DIDL" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/EndNote/epprod-eprint-637.enw" title="EndNote" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/HTML/epprod-eprint-637.html" title="HTML Citation" type="text/html; charset=utf-8" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/METS/epprod-eprint-637.xml" title="METS" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/MODS/epprod-eprint-637.xml" title="MODS" type="text/xml" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/RIS/epprod-eprint-637.ris" title="Reference Manager" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/Refer/epprod-eprint-637.refer" title="Refer" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/Simple/epprod-eprint-637text" title="Simple Metadata" type="text/plain" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/Text/epprod-eprint-637.txt" title="ASCII Citation" type="text/plain; charset=utf-8" /> <link rel="alternate" href="http://eprints.utas.edu.au/cgi/export/637/XML/epprod-eprint-637.xml" title="EP3 XML" type="text/xml" /> </head> <body bgcolor="#ffffff" text="#000000" onLoad="loadRoutine(); MM_preloadImages('images/eprints/ePrints_banner_r5_c5_f2.gif','images/eprints/ePrints_banner_r5_c7_f2.gif','images/eprints/ePrints_banner_r5_c8_f2.gif','images/eprints/ePrints_banner_r5_c9_f2.gif','images/eprints/ePrints_banner_r5_c10_f2.gif','images/eprints/ePrints_banner_r5_c11_f2.gif','images/eprints/ePrints_banner_r6_c4_f2.gif')"> <div class="ep_noprint"><noscript><style type="text/css">@import url(http://eprints.utas.edu.au/style/nojs.css);</style></noscript></div> <table width="795" border="0" cellspacing="0" cellpadding="0"> <tr> <td><script language="JavaScript1.2">mmLoadMenus();</script> <table border="0" cellpadding="0" cellspacing="0" width="795"> <!-- fwtable fwsrc="eprints_banner_final2.png" fwbase="ePrints_banner.gif" fwstyle="Dreamweaver" fwdocid = "1249563342" fwnested="0" --> <tr> <td><img src="/images/eprints/spacer.gif" width="32" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="104" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="44" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="105" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="41" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="16" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="68" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="68" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="68" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="82" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="69" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="98" height="1" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="1" border="0" alt="" /></td> </tr> <tr> <td colspan="12"><img name="ePrints_banner_r1_c1" src="/images/eprints/ePrints_banner_r1_c1.gif" width="795" height="10" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="10" border="0" alt="" /></td> </tr> <tr> <td rowspan="6"><img name="ePrints_banner_r2_c1" src="/images/eprints/ePrints_banner_r2_c1.gif" width="32" height="118" border="0" alt="" /></td> <td rowspan="5"><a href="http://www.utas.edu.au/"><img name="ePrints_banner_r2_c2" src="/images/eprints/ePrints_banner_r2_c2.gif" width="104" height="103" border="0" alt="" /></a></td> <td colspan="10"><img name="ePrints_banner_r2_c3" src="/images/eprints/ePrints_banner_r2_c3.gif" width="659" height="41" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="41" border="0" alt="" /></td> </tr> <tr> <td colspan="3"><a href="http://eprints.utas.edu.au/"><img name="ePrints_banner_r3_c3" src="/images/eprints/ePrints_banner_r3_c3.gif" width="190" height="31" border="0" alt="" /></a></td> <td rowspan="2" colspan="7"><img name="ePrints_banner_r3_c6" src="/images/eprints/ePrints_banner_r3_c6.gif" width="469" height="37" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="31" border="0" alt="" /></td> </tr> <tr> <td colspan="3"><img name="ePrints_banner_r4_c3" src="/images/eprints/ePrints_banner_r4_c3.gif" width="190" height="6" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="6" border="0" alt="" /></td> </tr> <tr> <td colspan="2"><img name="ePrints_banner_r5_c3" src="/images/eprints/ePrints_banner_r5_c3.gif" width="149" height="1" border="0" alt="" /></td> <td rowspan="2" colspan="2"><a href="/information.html" onMouseOut="MM_swapImgRestore();MM_startTimeout()" onMouseOver="MM_showMenu(window.mm_menu_0821132634_0,0,25,null,'ePrints_banner_r5_c5');MM_swapImage('ePrints_banner_r5_c5','','/images/eprints/ePrints_banner_r5_c5_f2.gif',1);"><img name="ePrints_banner_r5_c5" src="/images/eprints/ePrints_banner_r5_c5.gif" width="57" height="25" border="0" alt="About" /></a></td> <td rowspan="2"><a href="/view/" onMouseOut="MM_swapImgRestore();MM_startTimeout()" onMouseOver="MM_showMenu(window.mm_menu_0821133021_1,0,25,null,'ePrints_banner_r5_c7');MM_swapImage('ePrints_banner_r5_c7','','/images/eprints/ePrints_banner_r5_c7_f2.gif',1);"><img name="ePrints_banner_r5_c7" src="/images/eprints/ePrints_banner_r5_c7.gif" width="68" height="25" border="0" alt="Browse" /></a></td> <td rowspan="2"><a href="/perl/search/simple" onMouseOut="MM_swapImgRestore();MM_startTimeout()" onMouseOver="MM_showMenu(window.mm_menu_0821133201_2,0,25,null,'ePrints_banner_r5_c8');MM_swapImage('ePrints_banner_r5_c8','','/images/eprints/ePrints_banner_r5_c8_f2.gif',1);"><img name="ePrints_banner_r5_c8" src="/images/eprints/ePrints_banner_r5_c8.gif" width="68" height="25" border="0" alt="Search" /></a></td> <td rowspan="2"><a href="/perl/register" onMouseOut="MM_swapImgRestore();MM_startTimeout();" onMouseOver="MM_showMenu(window.mm_menu_1018171924_3,0,25,null,'ePrints_banner_r5_c9');MM_swapImage('ePrints_banner_r5_c9','','/images/eprints/ePrints_banner_r5_c9_f2.gif',1);"><img name="ePrints_banner_r5_c9" src="/images/eprints/ePrints_banner_r5_c9.gif" width="68" height="25" border="0" alt="register" /></a></td> <td rowspan="2"><a href="/perl/users/home" onMouseOut="MM_swapImgRestore();MM_startTimeout()" onMouseOver="MM_showMenu(window.mm_menu_0821133422_4,0,25,null,'ePrints_banner_r5_c10');MM_swapImage('ePrints_banner_r5_c10','','/images/eprints/ePrints_banner_r5_c10_f2.gif',1);"><img name="ePrints_banner_r5_c10" src="/images/eprints/ePrints_banner_r5_c10.gif" width="82" height="25" border="0" alt="user area" /></a></td> <td rowspan="2"><a href="/help/" onMouseOut="MM_swapImgRestore();MM_startTimeout()" onMouseOver="MM_showMenu(window.mm_menu_0821133514_5,0,25,null,'ePrints_banner_r5_c11');MM_swapImage('ePrints_banner_r5_c11','','/images/eprints/ePrints_banner_r5_c11_f2.gif',1);"><img name="ePrints_banner_r5_c11" src="/images/eprints/ePrints_banner_r5_c11.gif" width="69" height="25" border="0" alt="Help" /></a></td> <td rowspan="3" colspan="4"><img name="ePrints_banner_r5_c12" src="/images/eprints/ePrints_banner_r5_c12.gif" width="98" height="40" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="1" border="0" alt="" /></td> </tr> <tr> <td rowspan="2"><img name="ePrints_banner_r6_c3" src="/images/eprints/ePrints_banner_r6_c3.gif" width="44" height="39" border="0" alt="ePrints home" /></td> <td><a href="/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ePrints_banner_r6_c4','','/images/eprints/ePrints_banner_r6_c4_f2.gif',1);"><img name="ePrints_banner_r6_c4" src="/images/eprints/ePrints_banner_r6_c4.gif" width="105" height="24" border="0" alt="ePrints home" /></a></td> <td><img src="/images/eprints/spacer.gif" width="1" height="24" border="0" alt="" /></td> </tr> <tr> <td><img name="ePrints_banner_r7_c2" src="/images/eprints/ePrints_banner_r7_c2.gif" width="104" height="15" border="0" alt="" /></td> <td colspan="8"><img name="ePrints_banner_r7_c4" src="/images/eprints/ePrints_banner_r7_c4.gif" width="517" height="15" border="0" alt="" /></td> <td><img src="/images/eprints/spacer.gif" width="1" height="15" border="0" alt="" /></td> </tr> </table></td> </tr> <tr><td><table width="100%" style="font-size: 90%; border: solid 1px #ccc; padding: 3px"><tr> <td align="left"><a href="http://eprints.utas.edu.au/cgi/users/home">Login</a> | <a href="http://eprints.utas.edu.au/cgi/register">Create Account</a></td> <td align="right" style="white-space: nowrap"> <form method="get" accept-charset="utf-8" action="http://eprints.utas.edu.au/cgi/search" style="display:inline"> <input class="ep_tm_searchbarbox" size="20" type="text" name="q" /> <input class="ep_tm_searchbarbutton" value="Search" type="submit" name="_action_search" /> <input type="hidden" name="_order" value="bytitle" /> <input type="hidden" name="basic_srchtype" value="ALL" /> <input type="hidden" name="_satisfyall" value="ALL" /> </form> </td> </tr></table></td></tr> <tr> <td class="toplinks"><!-- InstanceBeginEditable name="content" --> <div align="center"> <table width="720" class="ep_tm_main"><tr><td align="left"> <h1 class="ep_tm_pagetitle">Genesis: An Extensible Java</h1> <p style="margin-bottom: 1em" class="not_ep_block"><span class="person_name">Lewis, Ian J</span> (2005) <xhtml:em>Genesis: An Extensible Java.</xhtml:em> PhD thesis, University of Tasmania.</p><p style="margin-bottom: 1em" class="not_ep_block"></p><table style="margin-bottom: 1em" class="not_ep_block"><tr><td valign="top" style="text-align:center"><a onmouseover="EPJS_ShowPreview( event, 'doc_preview_648' );" href="http://eprints.utas.edu.au/637/1/01Front.pdf" onmouseout="EPJS_HidePreview( event, 'doc_preview_648' );"><img alt="[img]" src="http://eprints.utas.edu.au/style/images/fileicons/application_pdf.png" class="ep_doc_icon" border="0" /></a><div class="ep_preview" id="doc_preview_648"><table><tr><td><img alt="" src="http://eprints.utas.edu.au/637/thumbnails/1/preview.png" class="ep_preview_image" border="0" /><div class="ep_preview_title">Preview</div></td></tr></table></div></td><td valign="top"><a href="http://eprints.utas.edu.au/637/1/01Front.pdf"><span class="ep_document_citation">PDF (Front Matter)</span></a> - Requires a PDF viewer<br />242Kb</td></tr><tr><td valign="top" style="text-align:center"><a onmouseover="EPJS_ShowPreview( event, 'doc_preview_649' );" href="http://eprints.utas.edu.au/637/2/02Whole.pdf" onmouseout="EPJS_HidePreview( event, 'doc_preview_649' );"><img alt="[img]" src="http://eprints.utas.edu.au/style/images/fileicons/application_pdf.png" class="ep_doc_icon" border="0" /></a><div class="ep_preview" id="doc_preview_649"><table><tr><td><img alt="" src="http://eprints.utas.edu.au/637/thumbnails/2/preview.png" class="ep_preview_image" border="0" /><div class="ep_preview_title">Preview</div></td></tr></table></div></td><td valign="top"><a href="http://eprints.utas.edu.au/637/2/02Whole.pdf"><span class="ep_document_citation">PDF (Complete thesis)</span></a> - Requires a PDF viewer<br />1939Kb</td></tr></table><div class="not_ep_block"><h2>Abstract</h2><p style="padding-bottom: 16px; text-align: left; margin: 1em auto 0em auto">Extensible programming languages allow users to create fundamentally new syntax and translate this syntax into language primitives. The concept of compile-time meta-programming has been around for decades, but systems that provide such abilities generally disallow the creation of new syntactic forms, or have heavy restrictions on how, or where, this may be done. Genesis is an extension to Java that supports compile-time meta-programming by allowing users to create their own arbitrary syntax. This is achieved through macros that operate on a mix of both concrete and abstract syntax, and produce abstract syntax. Genesis attempts to provide a minimal design whilst maintaining, and extending, the expressive power of other similar macro systems. The core Genesis language definition lacks many of the desirable features found in other systems, such as quasi-quote, hygiene, and static expression-type dispatch, but is expressive enough to define these as syntax extensions. User-defined macros produce only well-formed syntactic structures via the use of a predefined set of classes that define a Java abstract syntax. At the heart of Genesis is a flexible parser that is capable of parsing any context-free grammars - even ambiguous ones. The parser is capable of arbitrary speculation and will consider all possible parses. The parser constructs a graph of possible paths, and is capable of dynamically pruning this graph, or combining nodes, based on precedence or associativity rules. This general parser allows macro programmers to forget about parsing, and concentrate on defining new syntax. One key goal of this system was to address the programmer's learning curve by providing as simple a system as possible. This was achieved by the use of the flexible parser, the introduction of only one new construct to standard Java, and extensions to make programming macros more user friendly. The expressiveness of Genesis is wide ranging; it is capable of providing small scale limited use macros, large scale semantic modifications, through to complete language replacements. To demonstrate this expressiveness, we implement many of the simple test cases found in other systems, such as a type-safe printf, assertions, and iteration statements. These test cases require an ability to perform static type-checking and to manipulate compile-time values and abstract syntax trees. As additional examples of Genesis' expressive power we also provide implementations of embedded subsets of SQL and Haskell. As a final proof of power, the Haskell subset can operate as a stand-alone extension independent of any recognisable Java code. </p></div><table style="margin-bottom: 1em" cellpadding="3" class="not_ep_block" border="0"><tr><th valign="top" class="ep_row">Item Type:</th><td valign="top" class="ep_row">Thesis (PhD)</td></tr><tr><th valign="top" class="ep_row">Keywords:</th><td valign="top" class="ep_row">Programming Languages, Extensibility, Java, Meta-programming</td></tr><tr><th valign="top" class="ep_row">Subjects:</th><td valign="top" class="ep_row"><a href="http://eprints.utas.edu.au/view/subjects/280303.html">280000 Information, Computing and Communication Sciences > 280300 Computer Software > 280303 Programming Languages</a><br /><a href="http://eprints.utas.edu.au/view/subjects/280301.html">280000 Information, Computing and Communication Sciences > 280300 Computer Software > 280301 Programming Techniques</a></td></tr><tr><th valign="top" class="ep_row">ID Code:</th><td valign="top" class="ep_row">637</td></tr><tr><th valign="top" class="ep_row">Deposited By:</th><td valign="top" class="ep_row"><span class="ep_name_citation"><span class="person_name">Dr Ian J Lewis</span></span></td></tr><tr><th valign="top" class="ep_row">Deposited On:</th><td valign="top" class="ep_row">22 Jan 2007</td></tr><tr><th valign="top" class="ep_row">Last Modified:</th><td valign="top" class="ep_row">09 Jan 2008 02:30</td></tr><tr><th valign="top" class="ep_row">ePrint Statistics:</th><td valign="top" class="ep_row"><a target="ePrintStats" href="/es/index.php?action=show_detail_eprint;id=637;">View statistics for this ePrint</a></td></tr></table><p align="right">Repository Staff Only: <a href="http://eprints.utas.edu.au/cgi/users/home?screen=EPrint::View&eprintid=637">item control page</a></p> </td></tr></table> </div> <!-- InstanceEndEditable --></td> </tr> <tr> <td><!-- #BeginLibraryItem "/Library/footer_eprints.lbi" --> <table width="795" border="0" align="left" cellpadding="0" class="footer"> <tr valign="top"> <td colspan="2"><div align="center"><a href="http://www.utas.edu.au">UTAS home</a> | <a href="http://www.utas.edu.au/library/">Library home</a> | <a href="/">ePrints home</a> | <a href="/contact.html">contact</a> | <a href="/information.html">about</a> | <a href="/view/">browse</a> | <a href="/perl/search/simple">search</a> | <a href="/perl/register">register</a> | <a href="/perl/users/home">user area</a> | <a href="/help/">help</a></div><br /></td> </tr> <tr><td colspan="2"><p><img src="/images/eprints/footerline.gif" width="100%" height="4" /></p></td></tr> <tr valign="top"> <td width="68%" class="footer">Authorised by the University Librarian<br /> © University of Tasmania ABN 30 764 374 782<br /> <a href="http://www.utas.edu.au/cricos/">CRICOS Provider Code 00586B</a> | <a href="http://www.utas.edu.au/copyright/copyright_disclaimers.html">Copyright & Disclaimers</a> | <a href="http://www.utas.edu.au/accessibility/index.html">Accessibility</a> | <a href="http://eprints.utas.edu.au/feedback/">Site Feedback</a> </td> <td width="32%"><div align="right"> <p align="right" class="NoPrint"><a href="http://www.utas.edu.au/"><img src="http://www.utas.edu.au/shared/logos/unioftasstrip.gif" alt="University of Tasmania Home Page" width="260" height="16" border="0" align="right" /></a></p> <p align="right" class="NoPrint"><a href="http://www.utas.edu.au/"><br /> </a></p> </div></td> </tr> <tr valign="top"> <td><p> </p></td> <td><div align="right"><span class="NoPrint"><a href="http://www.eprints.org/software/"><img src="/images/eprintslogo.gif" alt="ePrints logo" width="77" height="29" border="0" align="bottom" /></a></span></div></td> </tr> </table> <!-- #EndLibraryItem --> <div align="center"></div></td> </tr> </table> </body> </html>