Abstract
This paper focuses on extensibility, the ability of a programmer using a particular language to extend the expressiveness of that language. This paper explores how to provide an interesting notion of extensibility by virtualizing the interface between code and data. A virtual value is a special value that supports behavioral intercession. When a primitive operation is applied to a virtual value, it invokes a trap on that virtual value. A virtual value contains multiple traps, each of which is a user-defined function that describes how that operation should behave on that value. This paper formalizes the semantics of virtual values, and shows how they enable the definition of a variety of language extensions, including additional numeric types; delayed evaluation; taint tracking; contracts; revokable membranes; and units of measure. We report on our experience implementing virtual values for Javascript within an extension for the Firefox browser.
- T. H. Austin. Proxy values implementation and examples. http://slang.soe.ucsc.edu/proxy-values, 2010.Google Scholar
- G. Bracha and D. Ungar. Mirrors: design principles for meta-level facilities of object-oriented programming languages. In OOPSLA, pages 331--344, 2004. Google Scholar
Digital Library
- R. Cartwright, P.-L. Curien, and M. Felleisen. Fully abstract semantics for observably sequential languages. Inf. Comput., 111(2):297--401, 1994. Google Scholar
Digital Library
- T. V. Cutsem and M. S. Miller. Proxies: Design principles for robust object-oriented intercession APIs. In Dynamic Languages Symposium, 2010. Google Scholar
Digital Library
- R. B. Findler and M. Blume. Contracts as pairs of projections. In International Symposium on Functional and Logic Programming, pages 226--241, 2006. Google Scholar
Digital Library
- R. B. Findler and M. Felleisen. Contracts for higher-order functions. In Proceedings of the International Conference on Functional Programming, pages 48--59, 2002. Google Scholar
Digital Library
- C. Flanagan. Hybrid type checking. In Symposium on Principles of Programming Languages, pages 245 -- 256, 2006. Google Scholar
Digital Library
- M. Flatt and PLT. Reference: Racket. Technical Report PLT-TR2010--1, PLT Inc., June 7, 2010. http://racketlang.org/tr1/.Google Scholar
- A. Gal, B. Eich, M. Shaver, D. Anderson, B. Kaplan, G. Hoare, D. Mandelin, B. Zbarsky, J. Orendorff, M. Bebenita, M. Chang, M. Franz, E. Smith, R. Reitmaier, and M. Haghighat. Trace-based just-in-time type specialization for dynamic languages. In PLDI, 2009. Google Scholar
Digital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley, Boston, MA, 1995.Google Scholar
Digital Library
- A. Goldberg and D. Robson. Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1983. Google Scholar
Digital Library
- K. E. Gray, R. B. Findler, and M. Flatt. Fine-grained interoperability through mirrors and contracts. In OOPSLA, pages 231--245, 2005. Google Scholar
Digital Library
- A. Kennedy. Relational parametricity and units of measure. In Principles of Programming Languages, pages 442--455, 1997. Google Scholar
Digital Library
- G. Kiczales. Aspect-oriented programming. ACM Comput. Surv., page 154, 1996. Google Scholar
Digital Library
- G. Kiczales, J. D. Rivieres, and D. G. Bobrow. The Art of the Metaobject Protocol. The MIT Press, July 1991. Google Scholar
Digital Library
- L. A. Meyerovich, A. P. Felt, and M. S. Miller. Object views: Fine-grained sharing in browsers. In Proceedings of the WWW 2010, Raleigh NC, USA, 2010. Google Scholar
Digital Library
- M. S. Miller. Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. PhD thesis, Johns Hopkins University, Baltimore, Maryland, USA, May 2006. Google Scholar
Digital Library
- M. S. Miller and T. V. Cutsem. Catch-all proxies. http:// wiki.ecmascript.org/doku.php?id=harmony:proxies.Google Scholar
- M. S. Miller, E. D. Tribble, and J. Shapiro. Concurrency among strangers: Programming in E as plan coordination. In In Trustworthy Global Computing, International Symposium, TGC 2005, pages 195--229. Springer, 2005. Google Scholar
Digital Library
- S. Mostinckx, T. V. Cutsem, S. Timbermont, E. G. Boix, É. Tanter, and W. D. Meuter. Mirror-based reflection in AmbientTalk. Softw., Pract. Exper., 39(7):661--699, 2009. Google Scholar
Digital Library
- Mozilla labs: Zaphod add-on for the firefox browser. http://mozillalabs.com/zaphod, accessed October 2010.Google Scholar
- Paul Hudak and Simon Peyton-Jones and Philip Wadler (eds.). Report on the programming language Haskell: A non-strict, purely functional language version 1.2. SIGPLAN Notices, 27(5), 1992. Google Scholar
Digital Library
- J. Siek and W. Taha. Gradual typing for objects. In European Conference on Object Oriented Programming, pages 2--27, 2007. Google Scholar
Digital Library
- J. G. Siek and P. Wadler. Threesomes, with and without blame. In POPL, pages 365--376, 2010. Google Scholar
Digital Library
- Wikipedia: Narcissus JavaScript engine. http://en.wikipedia.org/wiki/ Narcissus_(JavaScript_engine), accessed October 2010.Google Scholar
Index Terms
Virtual values for language extension
Recommendations
Virtual values for language extension
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsThis paper focuses on extensibility, the ability of a programmer using a particular language to extend the expressiveness of that language. This paper explores how to provide an interesting notion of extensibility by virtualizing the interface between ...
Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationRuntime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols ...
Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises
PLDI '15Runtime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols ...







Comments