Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Multi-stage programming with explicit annotations
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Featherweight Java: a minimal core calculus for Java and GJ
ACM Transactions on Programming Languages and Systems (TOPLAS)
The Java syntactic extender (JSE)
OOPSLA '01 Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Maya: multiple-dispatch syntax extension in Java
PLDI '02 Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation
The Art of the Metaobject Protocol
The Art of the Metaobject Protocol
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Interfaces with default implementations in Java
PPPJ '02/IRE '02 Proceedings of the inaugural conference on the Principles and Practice of programming, 2002 and Proceedings of the second workshop on Intermediate representation engineering for virtual machines, 2002
A first-class approach to genericity
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Implementing multi-stage languages using ASTs, Gensym, and reflection
Proceedings of the 2nd international conference on Generative programming and component engineering
Easy language extension with meta-aspectJ
Proceedings of the 28th international conference on Software engineering
A flexible framework for implementing software transactional memory
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Reflective program generation with patterns
Proceedings of the 5th international conference on Generative programming and component engineering
Statically safe program generation with safegen
GPCE'05 Proceedings of the 4th international conference on Generative Programming and Component Engineering
A type system for reflective program generators
GPCE'05 Proceedings of the 4th international conference on Generative Programming and Component Engineering
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Morphing: safely shaping a class in the image of others
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Feature featherweight java: a calculus for feature-oriented programming and stepwise refinement
GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
Language support for distributed proxies
Proceedings of the 1st International Workshop on Distributed Objects for the 21st Century
Toward foundations for type-reflective metaprogramming
GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
Generating safe template languages
GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
Reusable enterprise metadata with pattern-based structural expressions
Proceedings of the 9th International Conference on Aspect-Oriented Software Development
Ur: statically-typed metaprogramming with type-level record computation
PLDI '10 Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation
Mint: Java multi-stage programming using weak separability
PLDI '10 Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation
Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs
GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Morphing: Structurally shaping a class by reflecting on others
ACM Transactions on Programming Languages and Systems (TOPLAS)
A type system for reflective program generators
Science of Computer Programming
Object reuse and behavior adaptation in Java-like languages
Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
Streams that compose using macros that oblige
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
Proceedings of the 27th Annual ACM Symposium on Applied Computing
Metadata invariants: checking and inferring metadata coding conventions
Proceedings of the 34th International Conference on Software Engineering
Marco: safe, expressive macros for any language
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Proceedings of the 11th International Conference on Generative Programming and Component Engineering
A variability-aware module system
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Forsaking inheritance: supercharged delegation in DelphJ
Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
Extending Type Inference to Variational Programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
Compile-time reflection and metaprogramming for Java
Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation
Hi-index | 0.00 |
Recently, language extensions have been proposed for Java and C# to support pattern-based reflective declaration. These extensions introduce a disciplined form of meta-programming and aspect-oriented programming to mainstream languages: They allow members of a class (i.e., fields and methods) to be declared by statically iterating over and pattern-matching on members of other classes. Such techniques, however, have been unable to safely express simple, but common, idioms such as declaring getter and setter methods for fields. In this paper, we present a mechanism that addresses the lack of expressiveness in past work without sacrificing safety. Our technique is based on the idea of nested patterns that elaborate the outer-most pattern with blocking or enabling conditions. We implemented this mechanism in a language, MorphJ. We demonstrate the expressiveness of MorphJ with real-world applications. In particular, the MorphJ reimplementation of DSTM2, a software transactional memory library, reduces 1,107 lines of Java reflection and bytecode engineering library calls to just 374 lines of MorphJ code. At the same time, the MorphJ solution is both high level and safer, as MorphJ can separately type check generic classes and catch errors early. We present and formalize the MorphJ type system, and offer a type-checking algorithm.