Principles and Practice of Programming in Java最新文献

筛选
英文 中文
Dynamic code evolution for Java Java的动态代码演化
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852764
Thomas Würthinger, Christian Wimmer, Lukas Stadler
{"title":"Dynamic code evolution for Java","authors":"Thomas Würthinger, Christian Wimmer, Lukas Stadler","doi":"10.1145/1852761.1852764","DOIUrl":"https://doi.org/10.1145/1852761.1852764","url":null,"abstract":"Dynamic code evolution is a technique to update a program while it is running. In an object-oriented language such as Java, this can be seen as replacing a set of classes by new versions. We modified an existing high-performance virtual machine to allow arbitrary changes to the definition of loaded classes. Besides adding and deleting fields and methods, we also allow any kind of changes to the class and interface hierarchy. Our approach focuses on increasing developer productivity during debugging. Changes can be applied at any point a Java program can be suspended. The evaluation section shows that our modifications to the virtual machine have no negative performance impact on normal program execution. The fast in-place instance update algorithm ensures that the performance characteristics of a change are comparable with performing a full garbage collection run. Standard Java development environments are capable of using the code evolution features of our modified virtual machine, so no additional tools are required.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"32 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116893162","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}
引用次数: 5
Comparison of different impact analysis methods and programmer's opinion: an empirical study 不同影响分析方法的比较与程序员意见:一项实证研究
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852777
Gabriella Tóth, Péter Hegedüs, Árpád Beszédes, T. Gyimóthy, J. Jász
{"title":"Comparison of different impact analysis methods and programmer's opinion: an empirical study","authors":"Gabriella Tóth, Péter Hegedüs, Árpád Beszédes, T. Gyimóthy, J. Jász","doi":"10.1145/1852761.1852777","DOIUrl":"https://doi.org/10.1145/1852761.1852777","url":null,"abstract":"In change impact analysis, obtaining guidance from automatic tools would be highly desirable since this activity is generally seen as a very difficult program comprehension problem. However, since the notion of an 'impact set' (or dependency set) of a specific change is usually very inexact and context dependent, the approaches and algorithms for computing these sets are also very diverse producing quite different results. The question 'which algorithm finds program dependencies in the most efficient way?' has been preoccupying researchers for a long time, but there are still very few results published on the comparison of the different algorithms to what programmers think are real dependencies. In this work, we report on our experiment conducted with this goal in mind using a compact, easily comprehensible Java experimental software system, simulated program changes, and a group of programmers who were asked to perform impact analysis with the help of different tools and on the basis of their programming experience. We show which algorithms turned out to be the closest to the programmers' opinion in this case study. However, the results also certified that most existing algorithms need to be further enhanced and an effective methodology to use automated tools to support impact analysis still needs to be found.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"129 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128435745","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}
引用次数: 28
Memoization of methods using software transactional memory to track internal state dependencies 使用软件事务性内存跟踪内部状态依赖关系的方法记忆
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852775
Hugo Rito, João P. Cachopo
{"title":"Memoization of methods using software transactional memory to track internal state dependencies","authors":"Hugo Rito, João P. Cachopo","doi":"10.1145/1852761.1852775","DOIUrl":"https://doi.org/10.1145/1852761.1852775","url":null,"abstract":"Memoization is a well-known technique for improving the performance of a program, but it has been confined mostly to functional programming, where no mutable state or side-effects exist.\u0000 Most object-oriented programs, however, are built around objects with an internal state that is mutable over the course of the program. Therefore, the execution of methods often depends on the internal state of some objects or produces side-effects, thus making the application of memoization impractical for object-oriented programs in general.\u0000 In this paper, we propose an extended memoization approach that builds on the support provided by a Software Transactional Memory (STM) to identify both internal state dependencies and side-effects, hence removing many of the limitations of traditional memoization.\u0000 We describe the Automatic Transaction-Oriented Memoization (ATOM) system, a thread-safe implementation of our memoization model that requires minimal learning effort from programmers, while offering a simple and customizable interface.\u0000 Additionally, we describe a memoization advisory system that collects per-method performance statistics with the ultimate goal of aiding programmers in their task of choosing which methods are profitable to memoize.\u0000 We argue that ATOM is the first memoization system adequate to the unique characteristics of object-oriented programs and we show how memoization can be implemented almost for free in systems that use an STM, presenting the reasons why this synergy can be particularly useful in transactional contexts.\u0000 We show the usefulness of memoizing object-oriented programs by applying memoization to the STMBench7 benchmark, a standard benchmark developed for evaluating STM> implementations. The memoized version of the benchmark shows up to a 14-fold increase in the throughput for a read-dominated workload.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"15 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131278769","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}
引用次数: 22
Trace-based compilation in execution environments without interpreters 在没有解释器的执行环境中基于跟踪的编译
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852771
Michael Bebenita, Mason Chang, Gregor Wagner, A. Gal, Christian Wimmer, M. Franz
{"title":"Trace-based compilation in execution environments without interpreters","authors":"Michael Bebenita, Mason Chang, Gregor Wagner, A. Gal, Christian Wimmer, M. Franz","doi":"10.1145/1852761.1852771","DOIUrl":"https://doi.org/10.1145/1852761.1852771","url":null,"abstract":"Trace-based compilation is a technique used in managed language runtimes to detect and compile frequently executed program paths. The goal is to reduce compilation time and improve code quality by only considering \"hot\" parts of methods for compilation. Trace compilation is well suited for interpreter-based execution environments because the control flow of an application program is highly visible and recordable. In this paper, we show that trace compilation is also feasible and beneficial in runtime environments without interpreters where it is more difficult to monitor the control flow of an application.\u0000 We present the implementation of Maxpath, a trace-based Java just-in-time compiler for the meta-circular Maxine virtual machine. Maxine uses a tiered compilation strategy where methods are first compiled with a non-optimizing just-in-time compiler in order to collect profiling information, and then recompiled with an optimizing compiler for long-term efficient execution. We record traces by dynamically inserting instrumentation code in non-optimized methods. Execution traces are first collected into trace regions, after which they are compiled, optimized and linked to non-optimized methods for efficient execution. We show that trace-based compilation is an effective way to focus scarce compilation resources on performance critical application regions.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133737958","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}
引用次数: 33
Test-based inference of polynomial loop-bound functions 基于测试的多项式环界函数推理
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852776
O. Shkaravska, Rody Kersten, M. V. Eekelen
{"title":"Test-based inference of polynomial loop-bound functions","authors":"O. Shkaravska, Rody Kersten, M. V. Eekelen","doi":"10.1145/1852761.1852776","DOIUrl":"https://doi.org/10.1145/1852761.1852776","url":null,"abstract":"This paper presents an interpolation-based method of inferring arbitrary degree loop-bound functions for Java programs. Given a loop, by its \"loop-bound function\" we mean a function with the numeric program variables as its parameters, that is used to bound the number of loop-iterations. Using our analysis, loop-bound functions that are polynomials with natural, rational or real coefficients can be found.\u0000 Analysis of loop bounds is important in several different areas, including worst-case execution time (WCET) and heap consumption analysis, optimising compilers and termination-analysis. While several other methods exist to infer numerical loop bounds, we know of no other research on the inference of non-linear loop-bound functions. Additionally, the inferred bounds are provable using external tools, e.g. KeY.\u0000 To infer a loop-bound function for a given loop it is instrumented with a counter and executed on a well-chosen set of values of the numerical program variables. By well-chosen we mean that using these test values and the corresponding values of the counter, one can construct a unique interpolating polynomial. The uniqueness and the existence of the interpolating polynomial is guaranteed if the input values are in the so-called NCA-configuration, known from multivariate-polynomial interpolation theory. The constructed interpolating polynomial presumably bounds the dependency of the number of loop iterations on arbitrary values of the program variables. This hypothesis is verified by a third-party proof assistant.\u0000 A prototype tool has been developed which implements this method. This prototype can infer piecewise polynomial loop-bound functions for a large class of loops in Java programs. Applicability of the prototype has been tested on a series of safety-critical case studies. For most of the loops in the case studies, loop-bound functions could be inferred (and verified using a proof assistant).","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"6 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124151662","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}
引用次数: 25
Multicore-enabling the MPJ express messaging library 多核启用MPJ快速消息传递库
Principles and Practice of Programming in Java Pub Date : 2010-09-15 DOI: 10.1145/1852761.1852769
A. Shafi, Jawad Manzoor, Kamran Hameed, Bryan Carpenter, M. Baker
{"title":"Multicore-enabling the MPJ express messaging library","authors":"A. Shafi, Jawad Manzoor, Kamran Hameed, Bryan Carpenter, M. Baker","doi":"10.1145/1852761.1852769","DOIUrl":"https://doi.org/10.1145/1852761.1852769","url":null,"abstract":"With the transition to multicore processors almost complete, the parallel processing community is seeking efficient ways to port legacy message passing applications on shared memory and multicore processors. MPJ Express is our reference implementation of Message Passing Interface (MPI)-like bindings for the Java language. Starting with the current release, the MPJ Express software can be configured in two modes: the multicore and the cluster mode. In the multicore mode, parallel Java applications execute on shared memory or multicore processors. In the cluster mode, Java applications parallelized using MPJ Express can be executed on distributed memory platforms like compute clusters and clouds. The multicore device has been implemented using Java threads in order to satisfy two main design goals of portability and performance. We also discuss the challenges of integrating the multicore device in the MPJ Express software. This turned out to be a challenging task because the parallel application executes in a single JVM in the multicore mode. On the contrary in the cluster mode, the parallel user application executes in multiple JVMs. Due to these inherent architectural differences between the two modes, the MPJ Express runtime is modified to ensure correct semantics of the parallel program. Towards the end, we compare performance of MPJ Express (multicore mode) with other C and Java message passing libraries---including mpiJava, MPJ/Ibis, MPICH2, MPJ Express (cluster mode)---on shared memory and multicore processors. We found out that MPJ Express performs signicantly better in the multicore mode than in the cluster mode. Not only this but the MPJ Express software also performs better in comparison to other Java messaging libraries including mpiJava and MPJ/Ibis when used in the multicore mode on shared memory or multicore processors. We also demonstrate effectiveness of the MPJ Express multicore device in Gadget-2, which is a massively parallel astrophysics N-body siimulation code.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"8 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-09-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121516597","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}
引用次数: 19
Safer typing of complex API usage through Java generics 通过Java泛型对复杂API的使用进行更安全的类型化
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596666
W. Harrison, David Lievens, Fabio Simeoni
{"title":"Safer typing of complex API usage through Java generics","authors":"W. Harrison, David Lievens, Fabio Simeoni","doi":"10.1145/1596655.1596666","DOIUrl":"https://doi.org/10.1145/1596655.1596666","url":null,"abstract":"When several incompatible implementations of a single API are in use in a Java program, the danger exists that instances from different implementations may inadvertently be mixed, leading to errors. In this paper we show how to use generics to prevent such mixing. The core idea of the approach is to add a type parameter to the interfaces of the API, and tie the classes that make up an implementation to a unique choice of type parameter. In this way methods of the API can only be invoked with arguments that belong to the same implementation. We show that the presence of a type parameter in the interfaces does not violate the principle of interface-based programming: clients can still completely abstract over the choice of implementation. In addition, we demonstrate how code can be reused between different implementations, how implementations can be defined as extensions of other implementations, and how different implementations may be mixed in a controlled and safe manner. To explore the feasibility of the approach, gauge its usability, and identify any issues that may crop up in practical usage, we have refactored a fairly large existing API-based application suite, and we report on the experience gained in the process.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125369629","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}
引用次数: 5
Parsing Fortress syntax 解析堡垒语法
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596667
Sukyoung Ryu
{"title":"Parsing Fortress syntax","authors":"Sukyoung Ryu","doi":"10.1145/1596655.1596667","DOIUrl":"https://doi.org/10.1145/1596655.1596667","url":null,"abstract":"In this paper, we report our experience with parsing the syntax of the Fortress programming language. Fortress is a new programming language designed for scientific and high-performance computing. Features include: implicit parallelism, transactions, and concrete syntax that emulates mathematical notation. Fortress is intended to grow over time to accommodate the changing needs of its users.\u0000 Parsing the Fortress syntax is nontrivial due to its support for mathematical syntax and growable syntax. Mathematical syntax is highly ambiguous and growable syntax allows a program itself to define how it is parsed. Fortress currently runs entirely on the JVM, which requires internal representation of Fortress as Java classes. We describe our trials to parse the entire Fortress syntax, in the presence of constant changes of the language syntax and its internal representation. and the lessons we learned from the experience.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"7 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130853350","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}
引用次数: 14
The use of hardware transactional memory for the trace-based parallelization of recursive Java programs 使用硬件事务性内存对递归Java程序进行基于跟踪的并行化
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596671
Borys J. Bradel, T. Abdelrahman
{"title":"The use of hardware transactional memory for the trace-based parallelization of recursive Java programs","authors":"Borys J. Bradel, T. Abdelrahman","doi":"10.1145/1596655.1596671","DOIUrl":"https://doi.org/10.1145/1596655.1596671","url":null,"abstract":"We describe a framework for trace-based parallelization of recursive Java programs. We also explore and evaluate the feasibility of using a hardware transactional memory (HTM) system to handle dependences. We design, implement, and evaluate a system that takes as input a sequential program, identifies traces on it, and groups these traces into coarse-grain units of computation, or tasks. We then insert code that allows tasks to execute in parallel transactions using a fork/join paradigm. We also present a software algorithm that ensures sequential program order is maintained by transactional memory. We identify the associated issues and describe criteria that are necessary for Java programs to execute successfully on HTM systems. Our evaluation using JOlden benchmarks indicates that the computational phases of the benchmarks can be executed effectively on HTM systems. The average speedup is 2.7 for four processors. We conclude that HTM is a viable solution to dealing with dependences when performing trace-based parallelization.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127837403","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
Parallelizing calling context profiling in virtual machines on multicores 在多核的虚拟机上并行调用上下文分析
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596672
Walter Binder, Danilo Ansaloni, A. Villazón, Philippe Moret
{"title":"Parallelizing calling context profiling in virtual machines on multicores","authors":"Walter Binder, Danilo Ansaloni, A. Villazón, Philippe Moret","doi":"10.1145/1596655.1596672","DOIUrl":"https://doi.org/10.1145/1596655.1596672","url":null,"abstract":"The Calling Context Tree (CCT) is a prevailing datastructure for calling context profiling. As generating a complete CCT reflecting every method call is expensive, recent research has focused on efficiently approximating the CCT with sampling techniques. However, for tasks such as debugging, testing, and reverse engineering, complete and accurate CCTs are often needed. In this paper, we introduce the ParCCT, a novel approach to parallelizing application code and CCT generation on multicores. Each thread maintains a shadow stack and generates \"packets\" of method calls and returns that correspond to partial CCTs. Each packet includes a copy of the shadow stack, indicating the calling context of the first method call in the packet. Hence, packets are independent of each other and can be processed out-of-order and in parallel in order to update the CCT. Our portable and extensible implementation targets standard Java Virtual Machines, thanks to instrumentation techniques that ensure complete bytecode coverage and efficiently support custom calling context representations. The ParCCT is more than 110% faster than a primitive, non-parallel approach to CCT construction, when more than two cores are available. This speedup stems both from reduced contention and from parallelization.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130608698","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}
引用次数: 13
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学术官方微信