首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 234 毫秒
1.
随着计算机技术的不断进步和发展,Java语言程序凭借着自身的优势得到了广泛的应用,并取得了显著的成效。同时为了推动Java语言程序在计算机技术的作用,需要提高其精度,这就需要借助一定的对象别名分析技术。本文笔者对对象别名分析技术进行了分析和探讨,主要是为提高求值的深度,同时为实现Java语言程序中部分求值器的绑定时间分析的实现,进而为Java语言程序的应用提供指导和借鉴。  相似文献   

2.
一、Java技术简介谈起Java首先指的是Java语言,为此先谈谈Java语言,了解它的主要特点。 1.Java语言 Java语言是一种面向对象的语言。对象是变量和相关方法的集合,其中变量表明对态,表明对象可具有的行为。下图表示了一个对象: 例如,一个计算机应用就是一个对象,我们  相似文献   

3.
XQuery语言的部分求值技术的研究   总被引:1,自引:0,他引:1       下载免费PDF全文
部分求值作为一种新型的软件自动化技术,在程序优化中起着重要的作用.本文介绍了一种针对xQuery语言进行部分求值的实现技术,即部分求值技术中的绑定时间分析的方法和滞留程序生成的方法.  相似文献   

4.
提出了一种面向对象程序设计语言的部分求值动作分析方法,利用带有绑定时间标注的源程序生成部分求值动作原语序列,作为各种部分求值实现策略的基础。这种方法使部分求值算法独立于具体的实现方法,从而降低了部分求值系统的实现难度。  相似文献   

5.
一些面向上下文的编程语言已经实现,但在这些语言中所有的层被编译为程序可执行代码的一部分,这限制了程序的应用范围.为了解决该问题,提出一种以虚拟机为核心的方法支持动态层绑定,它融入对象组合与代理到虚拟机实现层激活,利用虚拟机服务支持动态层绑定.为了精确描述该方法并有效分析该方法对程序类型安全的影响,定义一个以Featherweight Java演算为核心的演算.基于该演算,形式化分析它对程序类型安全的影响,定义相应的约束,并证明在满足该约束下动态层绑定能保持程序的类型安全.为证明方法可行,以演算为指导,通过扩展Java的编译器与虚拟机实现并评估该方法.该演算和方法的实现可用于指导类似Java的语言的扩展,以支持程序动态地绑定层,同时保证扩展后语言的类型安全.  相似文献   

6.
程序分片是一种有效的程序分析技术,它能根据给定的分片准则从源程序中提取出所需部分进行分析,如进行程序调试、测试、程序重构分析等.程序分片技术在结构化程序中已有较广泛的应用,但对于面向对象语言程序,其研究与应用还存在一些待解决的问题. 针对面向对象语言程序,提出了一种改进后的系统依赖图:ISDG,用来更好地表示面向对象程序中的依赖关系,从而解决了对象类型参数和属性的表示问题,使分片更加准确.  相似文献   

7.
参数传递是Java语言中函数调用的重要步骤,清楚地了解参数传递的过程是编写出高质量程序所必需的。大多数程序设计语言具有传值调用和传引用调用两种方法。通过对典型程序的研究与分析可以看出Java语言的参数传递总是传值调用的,但是对于基本类型的参数和对象类型的参数来说,参数传递的情况不完全相同。Java语言不能直接使用传引用调用,但是可以通过数组的方式模拟传引用调用。  相似文献   

8.
参数传递是Java语言中函数调用的重要步骤,清楚地了解参数传递的过程是编写出高质量程序所必需的。大多数程序设计语言具有传值调用和传引用调用两种方法。通过对典型程序的研究与分析可以看出Java语言的参数传递总是传值调用的,但是对于基本类型的参数和对象类型的参数来说,参数传递的情况不完全相同。Java语言不能直接使用传引用调用,但是可以通过数组的方式模拟传引用调用。  相似文献   

9.
面向对象的程序设计语言中的强类型问题   总被引:1,自引:0,他引:1  
商陆军 《计算机学报》1991,14(10):721-729
本文以笔者近年来设计并实现的面向对象的程序设计语言为基础,讨论了我们在面向对象的程序设计语言中处理强类型问题的设计方法和实现技术.  相似文献   

10.
基于方法调用一般化模型的并行性分析   总被引:3,自引:0,他引:3  
该文给出了一种考虑了面向对象语言的多态和对象引用别名问题的对象方法间并行性的分析方法,这种方法用于面向对象语言并行化中的并行性分析,文中首先给出了一般化的方法调用模型,然后基于该模型给出了表达式化简,过程和过程间分析的算法,该算法可以求出变量的定义和使用集合,由于并行性分析,该文给出的简单例子即可以将该文的和相关的工作加以区别。其技术已经在作者研制的Java并行化编译器JAPS-Ⅱ中实现。  相似文献   

11.
文章研究部分求值技术中的约束时间分析(简称BTA),介绍了一种高阶的函数式语言FSL语言的部分求值器的BTA。该部分求值器的BTA由两个部分来实现:BTA1和BTA2,其目的是减少重复计算,提高部分求值的执行效率  相似文献   

12.
详细分类说明了变量和方法的概念,分析了变量和方法在java程序设计应用过程中的内存分配问题、在继承时的覆盖问题以及静态变量和静态方法的应用问题,并给出了部分典型案例。本文的研究可以提供java程序开发人员在程序设计过程中恰当的使用变量和方法作为参考,保证开发出来的程序简洁和高效。  相似文献   

13.
In Java software, one important flexibility mechanism is dynamic class loading. Unfortunately, the vast majority of static analyses for Java treat dynamic class loading either unsoundly or too conservatively. We present a novel semi-static approach for resolving dynamic class loading by combining static string analysis with dynamically gathered information about the execution environment. The insight behind the approach is that dynamic class loading often depends on characteristics of the environment that are encoded in various environment variables. Such variables are not static elements; however, their run-time values typically remain the same across multiple executions of the application. Thus, the string values reported by our technique are tailored to the current installation of the system under analysis. Additionally, we propose extensions of string analysis to increase the number of sites that can be resolved purely statically, and to track the names of environment variables. An experimental evaluation on the Java 1.4 standard libraries shows that a state-of-the-art purely static approach resolves only 28% of non-trivial sites, while our approach resolves 74% of such sites. We also demonstrate how the information gained from resolved dynamic class loading can be used to determine the classes that can potentially be instantiated through the use of reflection. Our extensions of string analysis greatly increase the number of resolvable reflective instantiation sites. This work is a step towards making static analysis tools better equipped to handle the dynamic features of Java. This material is based upon work supported by the National Science Foundation under CAREER grant CCF-0546040.  相似文献   

14.
一个基于部分求值的Java动态优化系统   总被引:1,自引:0,他引:1  
A dynamic optimization system for Java programs based on partial evaluation is presented in this paper. It consists of four subsystems: Java program transformation, binding time analysis, program specialization generation and application interface generation.  相似文献   

15.
陈柏强  郭涛  阮辉  严俊 《计算机应用》2009,29(5):1376-1379
介绍了静态分析的相关背景知识,对Java程序中数组越界和空指针错误的常见表现形式进行了归类,并通过实验评估了现有的Java静态分析工具功能,指出了其在跨过程分析中的不足,并对如何改进进行了讨论。  相似文献   

16.
《Software, IEEE》2006,23(4):58-61
Programmers usually employ static checkers, it checks our programs for errors without executing them, in a process called static code analysis. In this way, it works with a program that has an initial indication of correctness (because it compiles) and try to avoid well-known traps and pitfalls before measuring it against its specifications (when it's tested). We use FindBugs, a popular open source static code checker for Java. Static code checkers in Java come in two flavors: those that work directly on the program source code and those that work on the compiled bytecode. Although each code checker works in its own way, most share some basic traits. They read the program and construct some model of it, a kind of abstract representation that they can use for matching the error patterns they recognize. They also perform some kind of data-flow analysis, trying to infer the possible values that variables might have at certain points in the program. Data-flow analysis is especially important for vulnerability checking, an increasingly important area for code checkers.  相似文献   

17.
代码质量度量是软件质量分析的一个重要研究方向。静态分析方法因其具有成本低、容易实现而且不依赖于程序特定的运行环境的优点,在当前软件网络化、服务化的趋势下倍受关注。针对Java代码质量度量进行研究,使用Ant工具整合各种开源的静态测试工具,并制定基于静态分析的Java代码质量综合评价方案,可支持包括代码规模、规范性、可维护性、可扩展性和潜在危险等方面的综合检测,为项目的开发者、管理者和使用者提供了实用的代码质量评价方法。  相似文献   

18.
This paper shows how to integrate two complementary techniques for manipulating program invariants: dynamic detection and static verification. Dynamic detection proposes likely invariants based on program executions, but the resulting properties are not guaranteed to be true over all possible executions. Static verification checks that properties are always true, but it can be difficult and tedious to select a goal and to annotate programs for input to a static checker. Combining these techniques overcomes the weaknesses of each: dynamically detected invariants can annotate a program or provide goals for static verification, and static verification can confirm properties proposed by a dynamic tool.We have integrated a tool for dynamically detecting likely program invariants, Daikon, with a tool for statically verifying program properties, ESC/Java. Daikon examines run-time values of program variables; it looks for patterns and relationships in those values, and it reports properties that are never falsified during test runs and that satisfy certain other conditions, such as being statistically justified. ESC/Java takes as input a Java program annotated with preconditions, postconditions, and other assertions, and it reports which annotations cannot be statically verified and also warns of potential runtime errors, such as null dereferences and out-of-bounds array indices.Our prototype system runs Daikon, inserts its output into code as ESC/Java annotations, and then runs ESC/Java, which reports unverifiable annotations. The entire process is completely automatic, though users may provide guidance in order to improve results if desired. In preliminary experiments, ESC/Java verified all or most of the invariants proposed by Daikon.  相似文献   

19.
Whenever an array element is accessed, Java virtual machines execute a compare instruction to ensure that the index value is within the valid bounds. This reduces the execution speed of Java programs. Array bounds check elimination identifies situations in which such checks are redundant and can be removed. We present an array bounds check elimination algorithm for the Java HotSpot? VM based on static analysis in the just-in-time compiler.The algorithm works on an intermediate representation in static single assignment form and maintains conditions for index expressions. It fully removes bounds checks if it can be proven that they never fail. Whenever possible, it moves bounds checks out of loops. The static number of checks remains the same, but a check inside a loop is likely to be executed more often. If such a check fails, the executing program falls back to interpreted mode, avoiding the problem that an exception is thrown at the wrong place.The evaluation shows a speedup near to the theoretical maximum for the scientific SciMark benchmark suite and also significant improvements for some Java Grande benchmarks. The algorithm slightly increases the execution speed for the SPECjvm98 benchmark suite. The evaluation of the DaCapo benchmarks shows that array bounds checks do not have a significant impact on the performance of object-oriented applications.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号