{"title":"Truffle: a self-optimizing runtime system","authors":"Christian Wimmer, Thomas Würthinger","doi":"10.1145/2384716.2384723","DOIUrl":null,"url":null,"abstract":"We present Truffle, a novel framework for implementing managed languages in Java™. The language implementer writes an AST interpreter, which is integrated in our framework that allows tree rewriting during AST interpretation. Tree rewrites incorporate type feedback and other profiling information into the tree, thus specializing the tree and augmenting it with run-time information. When the tree reaches a stable state, partial evaluation compiles the tree into optimized machine code. The partial evaluation is done by Graal, the just-in-time compiler of our Java VM (a variation of the Java HotSpot VM). To show that Truffle supports a variety of programming language paradigms, we present prototype implementations of JavaScript (a dynamically typed programming language) and J (an array programming language).","PeriodicalId":194590,"journal":{"name":"ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity","volume":"5 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-10-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"93","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2384716.2384723","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 93
Abstract
We present Truffle, a novel framework for implementing managed languages in Java™. The language implementer writes an AST interpreter, which is integrated in our framework that allows tree rewriting during AST interpretation. Tree rewrites incorporate type feedback and other profiling information into the tree, thus specializing the tree and augmenting it with run-time information. When the tree reaches a stable state, partial evaluation compiles the tree into optimized machine code. The partial evaluation is done by Graal, the just-in-time compiler of our Java VM (a variation of the Java HotSpot VM). To show that Truffle supports a variety of programming language paradigms, we present prototype implementations of JavaScript (a dynamically typed programming language) and J (an array programming language).
我们提出了Truffle,一个在Java™中实现托管语言的新框架。语言实现者编写一个AST解释器,它集成在我们的框架中,允许在AST解释期间重写树。重写树将类型反馈和其他分析信息合并到树中,从而专门化树并使用运行时信息对其进行扩展。当树达到稳定状态时,部分求值将树编译为优化的机器代码。部分求值由Graal完成,它是Java VM (Java HotSpot VM的一个变体)的即时编译器。为了证明Truffle支持多种编程语言范式,我们给出了JavaScript(一种动态类型编程语言)和J(一种数组编程语言)的原型实现。