Principles and Practice of Programming in Java最新文献

筛选
英文 中文
Automatic parallelization for graphics processing units 图形处理单元的自动并行化
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596670
Alan Leung, O. Lhoták, G. Lashari
{"title":"Automatic parallelization for graphics processing units","authors":"Alan Leung, O. Lhoták, G. Lashari","doi":"10.1145/1596655.1596670","DOIUrl":"https://doi.org/10.1145/1596655.1596670","url":null,"abstract":"Accelerated graphics cards, or Graphics Processing Units (GPUs), have become ubiquitous in recent years. On the right kinds of problems, GPUs greatly surpass CPUs in terms of raw performance. However, because they are difficult to program, GPUs are used only for a narrow class of special-purpose applications; the raw processing power made available by GPUs is unused most of the time.\u0000 This paper presents an extension to a Java JIT compiler that executes suitable code on the GPU instead of the CPU. Both static and dynamic features are used to decide whether it is feasible and beneficial to off-load a piece of code on the GPU. The paper presents a cost model that balances the speedup available from the GPU against the cost of transferring input and output data between main memory and GPU memory. The cost model is parameterized so that it can be applied to different hardware combinations. The paper also presents ways to overcome several obstacles to parallelization inherent in the design of the Java bytecode language: unstructured control flow, the lack of multi-dimensional arrays, the precise exception semantics, and the proliferation of indirect references.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"150 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":"131562083","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}
引用次数: 51
Unit test support for Java via reflection and annotations 通过反射和注释支持Java的单元测试
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596663
V. K. Proulx, Weston Jossey
{"title":"Unit test support for Java via reflection and annotations","authors":"V. K. Proulx, Weston Jossey","doi":"10.1145/1596655.1596663","DOIUrl":"https://doi.org/10.1145/1596655.1596663","url":null,"abstract":"Novice Java programmers face great difficulties when learning to design unit tests for any nontrivial cases. Deciding whether the result of a method, or the effect the method produced represents the expected result one must understand the difference between equality based on the values an object represents versus the reference equality (identity) --- and be able to define the correct equals method.\u0000 We describe the tester library that supports test design, evaluation, and reporting of the results in the manner that supports a novice programmer. The library uses Java reflection and annotation to compare any two data items (primitive types or objects) by the value they represent, produces report where the expected and actual values are pretty-printed, and a failed test report includes a link to the failed test.\u0000 The library has been used in classrooms and is used daily in our program design.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"75 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":"123128726","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}
引用次数: 12
Three approaches to object evolution 物体演化的三种方法
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596665
Tal Cohen, J. Gil
{"title":"Three approaches to object evolution","authors":"Tal Cohen, J. Gil","doi":"10.1145/1596655.1596665","DOIUrl":"https://doi.org/10.1145/1596655.1596665","url":null,"abstract":"Dynamic object reclassification allows changes to the type of an object at runtime. This paper makes the case for object evolution, a restriction of general reclassification by which an object may gain, but never lose properties. We argue that evolution is an expressive and useful language construct and can be implemented efficiently. Further, the monotonicity property of evolution promotes static type-safety better than general reclassification. We describe three concrete variants of evolution, relying on inheritance, mixins and shakeins, and explain how any combination of these can be integrated into a concrete programming language. We chart the language design space, mention our implementation, and introduce the notion of evolvers, a critical mechanism for maintaining class invariants in the course of reclassification.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"174 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":"116183335","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}
引用次数: 12
Actor frameworks for the JVM platform: a comparative analysis JVM平台的Actor框架:比较分析
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596658
Rajesh K. Karmani, A. Shali, G. Agha
{"title":"Actor frameworks for the JVM platform: a comparative analysis","authors":"Rajesh K. Karmani, A. Shali, G. Agha","doi":"10.1145/1596655.1596658","DOIUrl":"https://doi.org/10.1145/1596655.1596658","url":null,"abstract":"The problem of programming scalable multicore processors has renewed interest in message-passing languages and frameworks. Such languages and frameworks are typically actor-oriented, implementing some variant of the standard Actor semantics. This paper analyzes some of the more significant efforts to build actor-oriented frameworks for the JVM platform. It compares the frameworks in terms of their execution semantics, the communication and synchronization abstractions provided, and the representations used in the implementations. It analyzes the performance of actor-oriented frameworks to determine the costs of supporting different actor properties on JVM. The analysis suggests that with suitable optimizations, standard Actor semantics and some useful communication and synchronization abstractions may be supported with reasonable efficiency on the JVM platform.","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":"128332159","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}
引用次数: 172
Development of a Java-based unified and flexible natural language discourse system 基于java的统一灵活的自然语言话语系统的开发
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596659
Philip Hanna, Ian M. O'Neill, D. Stewart, B. Zadeh
{"title":"Development of a Java-based unified and flexible natural language discourse system","authors":"Philip Hanna, Ian M. O'Neill, D. Stewart, B. Zadeh","doi":"10.1145/1596655.1596659","DOIUrl":"https://doi.org/10.1145/1596655.1596659","url":null,"abstract":"This paper outlines the design and development of a Java-based, unified and flexible natural language dialogue system that enables users to interact using natural language, e.g. speech. A number of software development issues are considered with the aim of designing an architecture that enables different discourse components to be readily and flexibly combined in a manner that permits information to be easily shared. Use of XML schemas assists this component interaction. The paper describes how a range of Java language features were employed to support the development of the architecture, providing an illustration of how a modern programming language makes tractable the development of a complex dialogue system.","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":"130001026","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}
引用次数: 2
Lazy continuations for Java virtual machines Java虚拟机的延迟延续
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596679
Lukas Stadler, Christian Wimmer, Thomas Würthinger, H. Mössenböck, John R. Rose
{"title":"Lazy continuations for Java virtual machines","authors":"Lukas Stadler, Christian Wimmer, Thomas Würthinger, H. Mössenböck, John R. Rose","doi":"10.1145/1596655.1596679","DOIUrl":"https://doi.org/10.1145/1596655.1596679","url":null,"abstract":"Continuations, or 'the rest of the computation', are a concept that is most often used in the context of functional and dynamic programming languages. Implementations of such languages that work on top of the Java virtual machine (JVM) have traditionally been complicated by the lack of continuations because they must be simulated.\u0000 We propose an implementation of continuations in the Java virtual machine with a lazy or on-demand approach. Our system imposes zero run-time overhead as long as no activations need to be saved and restored and performs well when continuations are used. Although our implementation can be used from Java code directly, it is mainly intended to facilitate the creation of frameworks that allow other functional or dynamic languages to be executed on a Java virtual machine.\u0000 As there are no widely used benchmarks for continuation functionality on JVMs, we developed synthetical benchmarks that show the expected costs of the most important operations depending on various parameters.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"96 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":"123982365","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
Virtual reuse distance analysis of SPECjvm2008 data locality SPECjvm2008数据局部性的虚拟重用距离分析
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596684
Xiaoming Gu, Xiao-Feng Li, B. Cheng, Eric Huang
{"title":"Virtual reuse distance analysis of SPECjvm2008 data locality","authors":"Xiaoming Gu, Xiao-Feng Li, B. Cheng, Eric Huang","doi":"10.1145/1596655.1596684","DOIUrl":"https://doi.org/10.1145/1596655.1596684","url":null,"abstract":"Reuse distance analysis has been proved promising in evaluating and predicting data locality for programs written in Fortran or C/C++. But its effect has not been examined for applications in managed runtime environments, where there is no concept of memory address. For this reason, traditional reuse distance analysis based on memory addresses is not directly applicable to these applications.\u0000 This paper presents the Virtual Reuse Distance Analysis (ViRDA), which resolves the difficulties associated with runtime environments and provides insights into the highlevel locality in dynamic applications. ViRDA addresses the problem caused by managed runtime artifacts, garbage collection in particular, by using virtual data identities, obtained through a standard profiling interface, to capture inherent data locality. The effectiveness of ViRDA is evaluated using a subset of the SPECjvm2008 benchmark suite. The new analysis reveals the reuse distance signatures of these programs and helps to explain the cause of excessive cache misses. It also predicts locality for large inputs based on training analysis of several small inputs. The prediction error is no more than 6% for the 4 scimark workloads.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"3 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":"131367854","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}
引用次数: 2
ConcJUnit: unit testing for concurrent programs conjunit:并发程序的单元测试
Principles and Practice of Programming in Java Pub Date : 2009-08-27 DOI: 10.1145/1596655.1596676
M. Ricken, Robert Cartwright
{"title":"ConcJUnit: unit testing for concurrent programs","authors":"M. Ricken, Robert Cartwright","doi":"10.1145/1596655.1596676","DOIUrl":"https://doi.org/10.1145/1596655.1596676","url":null,"abstract":"In test-driven development, tests are written for each program unit before the code is written, ensuring that the code has a comprehensive unit testing harness. Unfortunately, unit testing is much less effective for concurrent programs than for conventional sequential programs, partly because extant unit testing frameworks provide little help in addressing the challenges of testing concurrent code. In this paper, we present ConcJUnit, an extension of the popular unit testing framework JUnit that simplifies the task of writing tests for concurrent programs by handling uncaught exceptions and failed assertions in all threads, and by detecting child threads that were not forced to terminate before the main thread ends.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"37 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":"123525079","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
Slim VM: optimistic partial program loading for connected embedded Java virtual machines Slim VM:连接的嵌入式Java虚拟机的乐观部分程序加载
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411749
Gregor Wagner, A. Gal, M. Franz
{"title":"Slim VM: optimistic partial program loading for connected embedded Java virtual machines","authors":"Gregor Wagner, A. Gal, M. Franz","doi":"10.1145/1411732.1411749","DOIUrl":"https://doi.org/10.1145/1411732.1411749","url":null,"abstract":"Embedded systems are inherently limited in terms of local storage capacity. This limitation conflicts with the demands of modern virtual machine platforms, which require large amounts of library code to be present on each client device. These conflicting requirements are often resolved by providing specialized embedded versions of the standard libraries, but even these stripped down libraries consume significant resources.\u0000 We present a solution for \"always connected\" mobile devices that is based on a zero footprint paradigm. In our approach, all code resides on a remote host. Only those parts of applications and libraries that are likely to be needed are transferred to the mobile device. Since it is difficult to predict statically which library parts will be needed at runtime, we combine static analysis and lazy code loading to transfer code with a high likelihood of execution ahead of time while other code (such as exception code) remains on the remote host and is provided only on demand. This allows us to perform not only dead code elimination, but also aggressive elimination of cold (or potentially unused) code.\u0000 The granularity of our approach is flexible all the way down to individual basic blocks. Our method achieves total code size reductions of up to 95%.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"41 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":"133587599","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
An experimental environment for teaching Java security Java安全性教学的实验环境
Principles and Practice of Programming in Java Pub Date : 2008-09-09 DOI: 10.1145/1411732.1411735
A. Riccioni, E. Denti, Roberto Laschi
{"title":"An experimental environment for teaching Java security","authors":"A. Riccioni, E. Denti, Roberto Laschi","doi":"10.1145/1411732.1411735","DOIUrl":"https://doi.org/10.1145/1411732.1411735","url":null,"abstract":"In many fields of Computer Engineering education it is crucial that students gain both conceptual understanding and practical skills. To this end, an effective teaching approach relies on a blended-learning strategy that combines face-to-face lessons with students' practice on some suitable educational tool. Such a tool should support students through the whole learning process, and help them to improve their modelling ability along with their programming expertise. In this paper we describe S-vLab, a virtual laboratory for supporting teaching and learning in several applicative domains; in particular, we analyse S-vLab applied to the Information Security field. In this context, one of its main goals is to help students in dealing with the Java Security Platform, supporting different learning styles and allowing multiple formative paths. Using S-vLab students can, in various steps, model a secure system, simulate its behaviour and evaluate its performance, and finally build and test a software prototype by leveraging numerous facilities. These include the provision of extracts of sample Java code, the availability of supporting resources and a continuous and immediate feedback, aimed at pointing out possible errors and suggesting solutions. After describing more in detail the features provided by S-vLab, as well as how the depicted functionalities can help in achieving the settled learning goals, we refer on the results obtained in an experimentation of the virtual lab during a course on Information Security with about 150 students.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 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":"129783994","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学术官方微信