Principles and Practice of Programming in Java最新文献

筛选
英文 中文
Speculative improvements to verifiable bounds check elimination 对可验证边界检查消除的推测性改进
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411745
Andreas Gampe, J. Ronne, David Niedzielski, K. Psarris
{"title":"Speculative improvements to verifiable bounds check elimination","authors":"Andreas Gampe, J. Ronne, David Niedzielski, K. Psarris","doi":"10.1145/1411732.1411745","DOIUrl":"https://doi.org/10.1145/1411732.1411745","url":null,"abstract":"As a safety measure, the Java programming language requires bounds checking of array accesses. This usually translates to dynamic checks each time an array element is accessed. Static analysis can help eliminate some of those checks by proving them to be redundant, reducing the runtime overhead. Compilation of Java programs is usually method-based, and dynamic dispatch complicates interprocedural analysis. The result is a severely restricted static analysis. This paper presents a novel combination of two techniques to alleviate this problem. By assuming constraints that cannot safely be inferred from the program, the amount of provable safe bounds can be greatly extended. These constraints, called speculations, can be derived automatically from the program code by an analyzer, which assumes that there will be no violation of the array bounds. To ensure that the speculations hold at runtime, additional checks have to be injected into the code. Finding good speculations that benefit the runtime performance can be expensive. This paper shows that the speculation technique can be combined with a verifiable annotation framework, allowing most of the work to be shifted to compile-time. Experimental results show that this combination of techniques increases the number of eliminated bounds checks and can result in speedups that approach unconditional bounds check removal.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"40 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116503301","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 7
Portable execution of legacy binaries on the Java virtual machine 在Java虚拟机上可移植地执行遗留二进制文件
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411742
Alexander Yermolovich, A. Gal, M. Franz
{"title":"Portable execution of legacy binaries on the Java virtual machine","authors":"Alexander Yermolovich, A. Gal, M. Franz","doi":"10.1145/1411732.1411742","DOIUrl":"https://doi.org/10.1145/1411732.1411742","url":null,"abstract":"The move toward pure managed-code environments is held back by the vast amount of legacy software available only as statically compiled binaries for some legacy instruction set architecture (ISA). Catering to this legacy software requires all sorts of compromises, from the necessity of providing backward compatibility with dated instruction sets to the need for unsatisfactory mixed-mode environments, in which the legacy code runs \"besides\" (rather than on top of) the managed code platform. We have been investigating strategies for running legacy binaries on top of, rather than \"besides\", a managed code platform, by virtualizing the legacy ISA. Our system \"upcompiles\" low-level machine code to high-level Java code, which can then be executed on any Java Virtual Machine (JVM). On JVMs that have a just-in-time compiler, our generated JVM bytecode is subsequently \"downcompiled\" again into the native code of the host machine (which may be identical or different from the starting ISA). Despite executing on top of the Java Virtual Machine, our system delivers performance comparable to commercial-strength dynamic translators such as QEMU that directly generate platform-dependant machine code.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"110 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133761124","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 7
The PIM: an innovative robot coordination model based on Java thread migration PIM:一种基于Java线程迁移的创新机器人协调模型
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411739
R. Quitadamo, Danilo Ansaloni, Niranjan Suri, K. Ford, James F. Allen, Giacomo Cabri
{"title":"The PIM: an innovative robot coordination model based on Java thread migration","authors":"R. Quitadamo, Danilo Ansaloni, Niranjan Suri, K. Ford, James F. Allen, Giacomo Cabri","doi":"10.1145/1411732.1411739","DOIUrl":"https://doi.org/10.1145/1411732.1411739","url":null,"abstract":"There is a growing demand to apply multi-robot systems to address many current problems ranging from search and rescue to distributed surveillance to coordination of small satellites in space. Solving these problems effectively requires that teams of robots coordinate effectively. Many of the algorithms for coordination are based on the so-called centralized paradigm, where a central controlling authority is responsible for coordinating the entire team of robots. Unfortunately, centralized approaches often fall short when dealing with rapidly changing situations, unreliability of communications, and failure of robots, especially in hostile environments. Distributed approaches, in an effort to address such issues, tend to introduce complex negotiation or market-based strategies for distributed task execution, sometimes resulting in cumbersome programming models and suboptimal solutions. In this paper, we introduce the readers to the PIM (Process Integrated Mechanism) approach to multi-robot coordination grounded in research on Java thread migration. The core idea of the PIM is to retain the perspective of the single controlling authority but abandon the notion that it must have a fixed location within the system. Instead, the single coordinating thread is rapidly moved among the team members. The PIM leverages on Java thread mobility to preserve the optimality of the centralized approach, while effectively addressing most of its weaknesses (e.g. sluggish response to dynamic conditions, communication difficulties, and a single point of failure). A prototype implementation of such a model is presented on top of the Mobile JikesRVM framework for Java thread migration, along with some preliminary performance results.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"58 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126697234","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 11
A lazy developer approach: building a JVM with third party software 懒惰的开发人员方法:用第三方软件构建JVM
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411743
Nicolas Geoffray, Gaël Thomas, Charles Clément, B. Folliot
{"title":"A lazy developer approach: building a JVM with third party software","authors":"Nicolas Geoffray, Gaël Thomas, Charles Clément, B. Folliot","doi":"10.1145/1411732.1411743","DOIUrl":"https://doi.org/10.1145/1411732.1411743","url":null,"abstract":"The development of a complete Java Virtual Machine (JVM) implementation is a tedious process which involves knowledge in different areas: garbage collection, just in time compilation, interpretation, file parsing, data structures, etc. The result is that developing its own virtual machine requires a considerable amount of man/year. In this paper we show that one can implement a JVM with third party software and with performance comparable to industrial and top open-source JVMs on scientific applications. Our proof-of-concept implementation uses existing versions of a garbage collector, a just in time compiler, and the base library, and is robust enough to execute complex Java applications such as the OSGi Felix implementation and the Tomcat servlet container.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"34 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123228780","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 17
Embedded typesafe domain specific languages for Java 用于Java的嵌入式类型安全域特定语言
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411758
Jevgeni Kabanov, Rein Raudjärv
{"title":"Embedded typesafe domain specific languages for Java","authors":"Jevgeni Kabanov, Rein Raudjärv","doi":"10.1145/1411732.1411758","DOIUrl":"https://doi.org/10.1145/1411732.1411758","url":null,"abstract":"Projects like jMock and Hibernate Criteria Query introduced embedded DSLs into Java. We describe two case studies in which we develop embedded typesafe DSLs for building SQL queries and engineering Java bytecode. We proceed to extract several patterns useful for developing typesafe DSLs for arbitrary domains. Unlike most previous Java DSLs we find that mixing the Fluent Interface idiom with static functions, metadata and closures provides for a better user experience than pure method chaining. We also make very liberal use of the Java 5 Generics to improve the type safety properties of the DSLs.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"231 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123140074","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 30
Type safe dynamic object delegation in class-based languages 基于类的语言中的类型安全动态对象委托
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411756
Lorenzo Bettini, V. Bono
{"title":"Type safe dynamic object delegation in class-based languages","authors":"Lorenzo Bettini, V. Bono","doi":"10.1145/1411732.1411756","DOIUrl":"https://doi.org/10.1145/1411732.1411756","url":null,"abstract":"Class inheritance and method overriding, as provided by standard class-based languages, are not flexible enough to represent the dynamic behavior of objects; with this respect, object composition and delegation are often advocated as a more flexible alternative to class inheritance since they act at run-time, thus permitting the behavior of objects to be specialized dynamically. In this paper we present Incomplete Featherweight Java (IFJ), an extension of Featherweight Java with incomplete objects, i.e., objects that require some missing methods which can be provided at run-time by composition with another (complete) object. The mechanism for method invocation is based on delegation and it is disciplined by static typing, therefore the language enjoys type safety (which implies no \"message-not-understood\" run-time errors) and avoids possible accidental overrides due to method clashes.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"370 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115027020","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 9
Optimized strings for the Java HotSpot#8482; virtual machine 为Java HotSpot#8482优化字符串;虚拟机
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411747
Christian Häubl, Christian Wimmer, H. Mössenböck
{"title":"Optimized strings for the Java HotSpot#8482; virtual machine","authors":"Christian Häubl, Christian Wimmer, H. Mössenböck","doi":"10.1145/1411732.1411747","DOIUrl":"https://doi.org/10.1145/1411732.1411747","url":null,"abstract":"In several Java VMs, strings consist of two separate objects: metadata like the string length are stored in the actual string object, while the string characters are stored in a character array. This separation causes an unnecessary overhead. Each string method must access both objects, which leads to a bad cache behavior and reduces the execution speed.\u0000 We propose to merge the character array with the string's metadata object at run time. This results in a new layout of strings with better cache performance, fewer field accesses, and less memory overhead. We implemented this optimization for Sun Microsystems' Java HotSpot#8482; VM, so that the optimization is performed automatically at run time and requires no actions on the part of the programmer. The original class String is transformed into the optimized version and the bytecodes of all methods that allocate string objects are rewritten. All these transformations are performed by the Java HotSpot#8482; VM when a class is loaded. Therefore, the time overhead of the transformations is negligible.\u0000 Benchmarks show a reduction of the average used memory after a full garbage collection and an improved performance. The performance of the SPECjbb2005 benchmark increases by 8%, and the average used memory after a full garbage collection is reduced by 19%. The peak performance of SPECjvm98 is improved by 8% on average, with a maximum speedup of 62%.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"2 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127817765","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 3
Patterns and traceability in teaching software architecture 教学软件体系结构中的模式和可追溯性
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411736
H. Gast
{"title":"Patterns and traceability in teaching software architecture","authors":"H. Gast","doi":"10.1145/1411732.1411736","DOIUrl":"https://doi.org/10.1145/1411732.1411736","url":null,"abstract":"Courses on software architecture and software engineering need to explain the role of non-functional properties in software design, and they often use student projects to highlight their interrelations. Despite its critical importance in software development, the property of traceability has so far been mostly neglected.\u0000 This paper examines the role of traceability for teaching software architecture and describes the objectives and structure of two consecutive courses given by the author at the University of Tübingen. The courses build on architectural patterns as blueprints for achieving particular non-functional properties. The vehicle for improving traceability is a sequence of small-scale projects, each of which includes the phases of requirements analysis, design, and implementation. This iterative approach allows students to learn from their experiences and to integrate the feedback on their solutions into the next project.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"17 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130984946","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 6
A trait based re-engineering technique for Java hierarchies 一种基于特征的Java层次结构再工程技术
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411753
Lorenzo Bettini, V. Bono, M. Naddeo
{"title":"A trait based re-engineering technique for Java hierarchies","authors":"Lorenzo Bettini, V. Bono, M. Naddeo","doi":"10.1145/1411732.1411753","DOIUrl":"https://doi.org/10.1145/1411732.1411753","url":null,"abstract":"Traits are pure behavior components introduced in the Smalltalk community in order to integrate the traditional class inheritance with a composition mechanism: a class is composed by traits and inherits from superclasses. This offers the advantage of promoting code reuse. In this paper, we tackle the problem of re-engineering a Java hierarchy into traits, by adapting to a Java setting a methodology developed by Lienhard, Ducasse, and Arévalo for a Smalltalk setting, based on Formal Concept Analysis. We illustrate the approach by applying it to the Java input stream library. We also obtain two by-products: (i) we identify clearly some workarounds that programmers must exploit in order to overcome some of the limitations of Java single inheritance; (ii) we single out some features a Java with traits might include, as none of the proposals in the literature in this sense has taken the lead yet.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"36 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116786707","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 11
Self-configuring object-to-relational mapping queries 自配置对象到关系映射查询
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411740
P. Pohjalainen, J. Taina
{"title":"Self-configuring object-to-relational mapping queries","authors":"P. Pohjalainen, J. Taina","doi":"10.1145/1411732.1411740","DOIUrl":"https://doi.org/10.1145/1411732.1411740","url":null,"abstract":"Object-to-relational maps are nowadays routinely utilized in providing a persistency mechanism for object-oriented programs. We present how an object-to-relational mapper, such as Hibernate, provides transparent persistency to object-oriented programs. We then show how the existing approaches of eager and lazy fetching of associations are problematic under the face of program evolution. As an improvement, we present self-configuring components, which reflectively configure the persistency layer usage sites, thus leading to improved maintainability of software.\u0000 A self-configuring component analyses the actual persistency layer usage pattern. Based on this information, the actual queries are configured. A general algorithm for retrieving the actual usage pattern is given. As an implementation mechanism, we discuss different approaches for the self-configuring components. Practical choices for implementation can vary between analysis of abstract syntax trees and Java byte-code analysis. Suitability of two byte-code analysis frameworks, namely BCEL and Soot are evaluated.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"22 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128654407","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 6
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
相关产品
×
本文献相关产品
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信