Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1449764.1449772acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Mixing source and bytecode: a case for compilation by normalization

Published: 19 October 2008 Publication History

Abstract

Language extensions increase programmer productivity by providing concise, often domain-specific syntax, and support for static verification of correctness, security, and style constraints. Language extensions can often be realized through translation to the base language, supported by preprocessors and extensible compilers. However, various kinds of extensions require further adaptation of a base compiler's internal stages and components, for example to support separate compilation or to make use of low-level primitives of the platform (e.g., jump instructions or unbalanced synchronization). To allow for a more loosely coupled approach, we propose an open compiler model based on normalization steps from a high-level language to a subset of it, the core language. We developed such a compiler for a mixed Java and (core) bytecode language, and evaluate its effectiveness for composition mechanisms such as traits, as well as statement-level and expression-level language extensions.

References

[1]
A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools (2nd Edition). Addison Wesley, August 2006.
[2]
P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: an extensible AspectJ compiler. In Aspect-oriented software development (AOSD'05), pages 87--98, New York, NY, USA, 2005. ACM.
[3]
J. Bachrach and K. Playford. The Java syntactic extender (JSE). In Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications (OOPSLA'01), volume 36 of ACM SIGPLAN Notices, pages 31--42, New York, NY, USA, 2001. ACM.
[4]
M. G. J. van den Brand, J. Scheerder, J. Vinju, and E. Visser. Disambiguation filters for scannerless generalized LR parsers. In N. Horspool, editor, Compiler Construction (CC 2002), volume 2304 of Lecture Notes in Computer Science, pages 143--158, Grenoble, France, April 2002. Springer-Verlag.
[5]
M. Bravenboer, E. Dolstra, and E. Visser. Preventing injection attacks with syntax embeddings. A host and guest language independent approach. In J. Lawall, editor, Generative Programming and Component Engineering (GPCE 2007), pages 3--12, New York, NY, USA, October 2007. ACM.
[6]
M. Bravenboer, K. T. Kalleberg, R. Vermaas, and E. Visser. Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming, 72(1-2):52--70, June 2008. Special issue on experimental software and toolkits.
[7]
M. Bravenboer and E. Visser. Concrete syntax for objects. Domain-specific language embedding and assimilation without restrictions. In D. C. Schmidt, editor, Proceedings of the 19th ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA'04), pages 365--383, Vancouver, Canada, October 2004. ACM Press.
[8]
C. Clifton. MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch. Technical Report 01-10, Department of Computer Science, Iowa State University, Nov. 2001.
[9]
C. Clifton, T. Millstein, G. T. Leavens, and C. Chambers. Multijava: Design rationale, compiler implementation, and applications. ACM Transactions on Programming Languages and Systems (TOPLAS), 28(3):517--575, 2006.
[10]
J. Danaher, I. Angelina Lee, and C. Leiserson. Programming with exceptions in JCilk. Science of Computer Programming, 63(2):147--171, 2006.
[11]
A. B. Dov. infomancers-collections. http://code.google.com/p/infomancers-collections/
[12]
S. Ducasse, O. Nierstrasz, N. Schärli, R. Wuyts, and A. Black. Traits: A mechanism for fine-grained reuse. ACM Transactions on Programming Languages and Systems (TOPLAS), 28(2):331--388, 2006.
[13]
T. Ekman and G. Hedin. The JastAdd extensible Java compiler. In Proceedings of the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications (OOPSLA'07), pages 1--18, New York, NY, USA, 2007. ACM.
[14]
J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification. Prentice Hall PTR, Boston, Mass., third edition, 2005.
[15]
J. C. Hardwick and J. Sipelstein. Java as an intermediate language. Technical Report CMU-CS-96-161, School of Computer Science, Carnegie Mellon University, August 1996.
[16]
Z. Hemel, L. C. L. Kats, and E. Visser. Code generation by model transformation. A case study in transformation modularity. In J. Gray, A. Pierantonio, and A. Vallecillo, editors, Proceedings of the International Conference on Model Transformation (ICMT 2008), volume 5063 of Lecture Notes in Computer Science, pages 183--198. Springer, June 2008.
[17]
M. Hirzel and R. Grimm. Jeannie: granting Java Native Interface developers their wishes. In R. P. Gabriel, D. F. Bacon, C. V. Lopes, and G. L. S. Jr., editors, Object-Oriented Programming, Systems, Languages, and Applications, (OOPSLA'07), pages 19--38. ACM, 2007.
[18]
J. B. Kam and J. D. Ullman. Monotone data flow analysis frameworks. Acta Inf., 7:305--317, 1977.
[19]
L. C. L. Kats. java-csharp: C#-inspired language extensions for Java. http://strategoxt.org/Stratego/JavaCSharp/.
[20]
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In M. Aks¸it and S. Matsuoka, editors, Proceedings of the European Conference on Object-Oriented Programming (ECOOP'07), volume 1241 of Lecture Notes in Computer Science, pages 220--242. Springer, 1997.
[21]
S. Liang. Java Native Interface: Programmer's Guide and Reference. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999.
[22]
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, second edition, 1999.
[23]
F. Logozzo and M. Fähndrich. On the relative completeness of bytecode analysis versus source code analysis. In L. Hendren, editor, Compiler Construction (CC'08), volume 4959 of Lecture Notes in Computer Science, pages 192--212. Springer, 2008.
[24]
J. Melton and A. Eisenberg. Understanding SQL and Java Together: A Guide to SQLJ, JDBC, and Related Technologies. Morgan Kaufmann, 2000.
[25]
J. Meyer and T. Downing. Java Virtual Machine. O'Reilly & Associates, Inc., Sebastopol, CA, USA, 1997.
[26]
J. Miecznikowski and L. Hendren. Decompiling Java using staged encapsulation. Workshop on Decompilation Techniques, appeared in Proceedings of the Working Conference on Reverse Engineering (WCRE'01), pages 368--374, 2001.
[27]
S. Murer, S. Omohundro, D. Stoutamire, and C. Szyperski. Iteration abstraction in Sather. ACM Transactions on Programming Languages and Systems (TOPLAS), 18(1):1--15, 1996.
[28]
N. Nystrom, M. Clarkson, and A. Myers. Polyglot: An Extensible Compiler Framework for Java. Compiler Construction (CC'03), 2622:138--152, Apr. 2003.
[29]
M. Odersky and al. An overview of the Scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland, 2004.
[30]
S. Pedroni and N. Rappin. Jython Essentials. O'Reilly Media, Inc., 2002.
[31]
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3--47, September 1998.
[32]
K. Seymour and J. Dongarra. Automatic translation of Fortran to JVM bytecode. In Joint ACM Java Grande -- ISCOPE 2001 Conference, Stanford University, California, June 2-4, 2001, New York, NY 10036, USA, 2001. ACM.
[33]
Y. Smaragdakis and D. Batory. Mixin layers: an object-oriented implementation technique for refinements and collaboration-based designs. ACM Transactions on Software Engineering and Methodology (TOSEM), 11(2):215--255, 2002.
[34]
G. Steele. Growing a language. Higher-Order and Symbolic Compututation, 12(3):221--236, October 1999.
[35]
Sun Microsystems. The annotation processing tool (apt). http://java.sun.com/j2se/1.5.0/docs/guide/apt.
[36]
M. Tatsubori, S. Chiba, K. Itano, and M.-O. Killijian. OpenJava: A class-based macro system for Java. In W. Cazzola, R. J. Stroud, and F. Tisato, editors, First OOPSLA Workshop on Reflection and Software Engineering (OORaSE'99), volume 1826 of Lecture Notes in Computer Science, pages 117--133. Springer, Nov. 1999.
[37]
The XDoclet team. XDoclet: attribute-oriented programming. http://xdoclet.sourceforge.net/
[38]
A. Tolmach. An external representation for the GHC core language. http://haskell.org/ghc/docs/papers/core.ps.gz, September 2001.
[39]
R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a Java bytecode optimization framework. In CASCON '99: Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research, page 13. IBM, 1999.
[40]
A. van Deursen, P. Klint, and F. Tip. Origin tracking. Journal of Symbolic Computation, 15(5/6):523--545, 1993.
[41]
E. VanWyk, O. de Moor, K. Backhouse, and P. Kwiatkowski. Forwarding in attribute grammars for modular language design. In R. N. Horspool, editor, Proceedings of the 11th International Conference on Compiler Construction (CC'02), volume 2304 of Lecture Notes on Computer Science, pages 128--142, London, UK, 2002. Springer-Verlag.
[42]
E. Van Wyk, L. Krishnan, A. Schwerdfeger, and D. Bodin. Attribute grammar-based language extensions for Java. In E. Ernst, editor, European Conference on Object Oriented Programming (ECOOP'07), volume 4609 of Lecture Notes on Computer Science, pages 575--599. Springer Verslag, July 2007.
[43]
E. Visser. Meta-programming with concrete object syntax. In D. Batory, C. Consel, and W. Taha, editors, Generative Programming and Component Engineering (GPCE 2002), volume 2487 of Lecture Notes in Computer Science, pages 299--315, Pittsburgh, PA, USA, October 2002. Springer-Verlag.
[44]
J. Warmer and A. Kleppe. Building a flexible software factory using partial domain specific models. In J. Gray, J.-P. Tolvanen, and J. Sprinkle, editors, Proceedings of the 6th OOPSLA Workshop on Domain-Specific Modeling (DSM 2006), volume TR-37 of Computer Science and Information System Reports, pages 15-22, Finland, October 2006. University of Jyväskylä.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
October 2008
654 pages
ISBN:9781605582153
DOI:10.1145/1449764
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 43, Issue 10
    September 2008
    613 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1449955
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. SDF
  2. bytecode
  3. compilers
  4. domain-specific languages
  5. dryad compiler
  6. embedded languages
  7. iterators
  8. java
  9. language extensions
  10. meta programming
  11. source tracing
  12. stratego
  13. traits

Qualifiers

  • Research-article

Conference

OOPSLA08
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)0
Reflects downloads up to 18 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2021)Term Rewriting-Based ProgrammingFormal and Adaptive Methods for Automation of Parallel Programs Construction10.4018/978-1-5225-9384-3.ch003(76-111)Online publication date: 2021
  • (2020)Gradually typing strategiesProceedings of the 13th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3426425.3426928(1-15)Online publication date: 16-Nov-2020
  • (2018)Algebra-Algorithmic Models and Methods of Parallel Programing10.15407/akademperiodyka.367.192Online publication date: 2018
  • (2013)Integration of data validation and user interface concerns in a DSL for web applicationsSoftware and Systems Modeling (SoSyM)10.1007/s10270-010-0173-912:1(35-52)Online publication date: 1-Feb-2013
  • (2012)Model-driven web engineering methods: a literature reviewRevista Facultad de Ingeniería Universidad de Antioquia10.17533/udea.redin.12487(69-81)Online publication date: 1-Aug-2012
  • (2012)Natural and Flexible Error Recovery for Generated Modular Language EnvironmentsACM Transactions on Programming Languages and Systems10.1145/2400676.240067834:4(1-50)Online publication date: 1-Dec-2012
  • (2011)Interactive Disambiguation of Meta Programs with Concrete Object SyntaxSoftware Language Engineering10.1007/978-3-642-19440-5_22(327-336)Online publication date: 2011
  • (2010)Interactive disambiguation of meta programs with concrete object syntaxProceedings of the Third international conference on Software language engineering10.5555/1964571.1964601(327-336)Online publication date: 12-Oct-2010
  • (2010)Embedding languages without breaking toolsProceedings of the 24th European conference on Object-oriented programming10.5555/1883978.1884006(380-404)Online publication date: 21-Jun-2010
  • (2009)Providing rapid feedback in generated modular language environmentsProceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications10.1145/1640089.1640122(445-464)Online publication date: 26-Oct-2009
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media