首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
针对代码与模型之间的不一致性问题,提出了一种基于UML模型和Java代码之间的一致性检测方法.首先,对UML类图和时序图进行形式化描述,并提出时序调用图(SD-CG)这一概念,在此基础上完成类的关联关系到关联属性的转换以及UML时序图到时序调用图SD-CG的转换;其次,通过方法调用图CG来表达类方法之间的调用关系,从而反映代码动态行为,由此通过对Java源代码的词法分析与语法分析,可获得类的信息及方法调用图CG;然后设计了UML模型与Java源代码间一致性检测算法,包括对类间静态信息以及时序调用图SD-CG与方法调用图CG间的一致性检测;最后,通过开发UML模型与Java源代码一致性检测工具,验证了所提出的方法是可行有效的.  相似文献   

2.
Implementing a concurrent programming language such as Java by means of a translator to an existing language is attractive as it provides portability over all platforms supported by the host language and reduces development time—as many low‐level tasks can be delegated to the host compiler. The C and C++ programming languages are popular choices for many language implementations due to the availability of efficient compilers on a wide range of platforms. For garbage‐collected languages, however, they are not a perfect match as no support is provided for accurately discovering pointers to heap‐allocated data on thread stacks. We evaluate several previously published techniques and propose a new mechanism, lazy pointer stacks, for performing accurate garbage collection in such uncooperative environments. We implemented the new technique in the Ovm Java virtual machine with our own Java‐to‐C/C++ compiler using GCC as a back‐end compiler. Our extensive experimental results confirm that lazy pointer stacks outperform existing approaches: we provide a speedup of 4.5% over Henderson's accurate collector with a 17% increase in code size. Accurate collection is essential in the context of real‐time systems, we thus validate our approach with the implementation of a real‐time concurrent garbage collection algorithm. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

3.
We present the integrated set of tools Arctis for the rapid development of reactive services. In our method, services are composed of collaborative building blocks that encapsulate behavioral patterns expressed as UML 2.0 collaborations and activities. Due to our underlying semantics in temporal logic, building blocks as well as their compositions can be transformed into formulas and model checked incrementally in order to guarantee that important system properties are kept. The process of model checking is fully automated. Error traces are presented to the users as easily understandable animations, so that no expertise in temporal logic is needed. In addition, the results of model checking are analyzed, so that in some cases automated diagnoses and fixes can be provided as well. The formal semantics also enables the correct, automatic synthesis of the activities to state machines which form the input of our code generators. Thus, the collaborative models can be fully automatically transformed into executable Java code. We present the development of a mobile treasure hunt system to exemplify the method and the tools.  相似文献   

4.
JAAS(Java Authentication and Authentication ServiceJay,认证和授权服务)是Java安全编程的一个重要补充。它提供了根据验证主题身份来验证主题和授权资源访问的标准方法。本文较全面地介绍了JAAS的特点、组成及其在Java安全编程中的应用。介绍了JAAS编程中常用的类,所提供的例子也只是说明了程序的执行过程,以及JAAS中主要类、方法之间的调用和被调用关系。  相似文献   

5.
GridSim仿真代码自动生成器GridsimHelper   总被引:1,自引:0,他引:1  
基于离散事件仿真平台si叼ava的网格建模和仿真工具C}irdSim提供了大量用于仿真分布式系统的基础类。但是使用该工具进行仿真并不简单。除了编制大量代码之外,初学者还需要花费较长时间熟悉实验构造过程和各种基础类的使用方法。针对此问题,设计、实现了图形界面(Graphical User Interface, GUI)的仿真代码生成器GridSimHclpcr,旨在缩短GridSim平台的学习过程,减轻用户实施仿真实验的工作量。该工具允许用户对自行设计的调度算法进行仿真测试,并提供静态启发式算法min-min和max-min作为性能比较的对象。详细介绍了GridSim-Helper的设计思路和实现细节。仿真实验结果证实了该工具的正确性和有效性。  相似文献   

6.
JAAS Java(Authentication and Authentication Service Jay,认证和授权服务)是Java安全编程的一个重要补充。它提供了根据验证主题身份来验证主题和授权资源访问的标准方法。本文较全面地介绍了JAAS的特点、组成及其在Jaya安全编程中的应用。介绍了JAAS编程中常用的类,所提供的例子也只是说明了程序的执行过程,以及JAAS中主要类、方法之间的调用和被调用关系。  相似文献   

7.
Android 系统下基于NDK 方式的图形开发   总被引:1,自引:1,他引:0  
Google提供了Android系统下基于C/C++开发的NDK开发工具,通过使用这个工具可以嵌入C/C++代码到Android应用程序中,即可以使用“Java+C/C++”的编程方式进行程序开发.基于这种开发模式,开发Android应用程序中的图形模块,通过在Nativec/C++中调用两个图形引擎SkiaGL和OpenGLES的链接库,实现在应用程序中不使用AndroidSDK的图形模块API函数,同样能完成2D和3D的图形开发.  相似文献   

8.
9.
The development of robust software is a difficult undertaking and is becoming increasingly more important as applications grow larger and more complex. Although modern programming languages such as C++ and Java provide sophisticated exception handling mechanisms to detect and correct runtime error conditions, exception handling code must still be programmed with care to preserve application consistency. In particular, exception handling is only effective if the premature termination of a method due to an exception does not leave an object in an inconsistent state. We address this issue by introducing the notion of failure atomicity in the context of exceptions. We propose practical techniques to automatically detect and mask the nonatomic exception handling situations encountered during program execution. These techniques can be applied to applications written in various programming languages that support exceptions. We perform experimental evaluation on both C++ and Java applications to demonstrate the effectiveness of our techniques and measure the overhead that they introduce.  相似文献   

10.
11.
Geometric calibration to projection images is an indispensable operation for projection‐based spatial display. In this paper, we propose a new method for correcting images generated in a computer onto a cylindrical surface accurately, which can project a high‐resolution projection image with pixels matching avoiding too much manual operation. Images waiting to be projected are pre‐warped according to the rough correspondence between projectors and physical surface. To solve the errors resulting from unexpected pixel shifts in overlap projection area, we fit the Bézier interpolation to the images and apply the optimization theory with added constraints to correct the projection image accurately. This optimization process, by taking the pixels with specific significance on the images as the basis of calculation, avoids the traditional ways of translating the control points of the Bézier surface directly. The final results achieve a completely accurate projection picture even if the projection surface shape is inaccurate and irregular. We present the details of the proposed accurate calibration algorithm and illustrate our method, which, with its scalability, can achieve perfect projection efficiently and accurately with experiments.  相似文献   

12.
In recent years, the popularity of the Internet has increased and Java has emerged as a powerful animation tool for creating web pages. However, users have still not exploited the full power of Java. Java is an object-oriented programming language with a rich set of application programming interfaces (API). It has the infrastructure for building applications in diverse domains with ease. Java's sophisticated networking APIs facilitate building network centric enterprise applications. Java's virtual machine enables development of architecture neutral applications which can be ported without any modifications. This has revolutionized the way software is written and distributed. This paper highlights the key features of Java language, illustrates the use of networking libraries and enlists features that facilitate enterprise software development.  相似文献   

13.
14.
In object programming languages, the Visitor design pattern allows separation of algorithms and data structures. When applying this pattern to tree‐like structures, programmers are always confronted with the difficulty of making their code evolve. One reason is that the code implementing the algorithm is interwound with the code implementing the traversal inside the visitor. When implementing algorithms such as data analyses or transformations, encoding the traversal directly into the algorithm turns out to be cumbersome as this type of algorithm only focuses on a small part of the data‐structure model (e.g., program optimization). Unfortunately, typed programming languages like Java do not offer simple solutions for expressing generic traversals. Rewrite‐based languages like ELAN or Stratego have introduced the notion of strategies to express both generic traversal and rule application control in a declarative way. Starting from this approach, our goal was to make the notion of strategic programming available in a widely used language such as Java and thus to offer generic traversals in typed Java structures. In this paper, we present the strategy language SL that provides programming support for strategies in Java. Copyright © 2012 John Wiley & Sons, Ltd.  相似文献   

15.
源代码相似程度分析在软件工程和计算机教学等领域都有重要的应用.软件工程领域的源代码盗窃和著作权纠纷仲裁,计算机教学领域的学生作业作弊分析都需要源代码相似程度的分析.良好的源代码相似程序分析软件还可以应用于相似代码聚类和搜索引擎的源代码搜索领域.尽管源代码相似程度分析问题由来已久,但是这个问题并没有令人十分满意和惊喜的研究结果.源代码有其特殊结构,使用传统的纯文本相似度分析显然是不合适的.将首先介绍这个问题的研究历史和进展,简单分析这个问题的难点所在,继而介绍一个新的基于程序控制流图分析的源代码相似程度分析系统,并给出其算法和实现细节.文章最后将分析这个方法的优劣所在,讨论这个方法的进一步改进方向.  相似文献   

16.
Pilsung Kang 《Software》2018,48(3):385-401
Function call interception (FCI), or method call interception (MCI) in the object‐oriented programming domain, is a technique of intercepting function calls at program runtime. Without directly modifying the original code, FCI enables to undertake certain operations before and/or after the called function or even to replace the intercepted call. Thanks to this capability, FCI has been typically used to profile programs, where functions of interest are dynamically intercepted by instrumentation code so that the execution control is transferred to an external module that performs execution time measurement or logging operations. In addition, FCI allows for manipulating the runtime behavior of program components at the fine‐grained function level, which can be useful in changing an application's original behavior at runtime to meet certain execution requirements such as maintaining performance characteristics for different input problem sets. Due to this capability, however, some FCI techniques can be used as a basis of many security exploits for vulnerable systems. In this paper, we survey a variety of FCI techniques and tools along with their applications to diverse areas in the computing and software domains. We describe static and dynamic FCI techniques at large and discuss the strengths and weaknesses of different implementations in this category. In addition, we also discuss aspect‐oriented programming implementation techniques for intercepting method calls.  相似文献   

17.
18.
One of the most promising approaches to Java acceleration in embedded systems is a bytecode-to-C ahead-of-time compiler (AOTC). It improves the performance of a Java virtual machine (JVM) by translating bytecode into C code, which is then compiled into machine code via an existing C compiler. One important design issue in AOTC is efficient exception handling. Since the excepting point and the exception handler may locate in different methods on a call stack, control transfer between them should be streamlined, while an exception would be an “exceptional” event, so it should not slow down normal execution paths. Previous AOTCs often employed a technique called stack cutting based on a setjmp()/longjmp() pair, which we found is involved with too much performance overheads. Also, when the AOTC and the interpreter are employed concurrently (e.g., some methods are AOTCed while other methods are interpreted), the performance of normal execution paths is affected more seriously. This paper proposes a simpler solution based on an exception check after each method call, merged with garbage collection check for reducing its overhead. Our evaluation results on SPECjvm98 on Sun's CVM indicate that our technique can improve the performance of stack cutting by more than 25%. A similar performance benefit can be noted on a hybrid execution environment of both the AOTC and the interpreter.  相似文献   

19.
The generation of compiled code for expressions in programming languages such as Icon that support goal-directed evaluation in addition to traditional control structures presents more of a challenge than generating code for traditional imperative programming languages. This paper describes a code-generation technique for translating Icon programs into a traditional high-level language. Translations into both Pascal and C are discussed. However, any language that provides function parameters and recursion is sufficient. The technique described here has been used in the implementation of an optimizing compiler for Icon.  相似文献   

20.
We present an object oriented algorithm, written in the Java programming language, which performs a Monte Carlo calculation of the evaporation-fission process taking place inside an excited nucleus. We show that this nuclear physics problem is very suited for the object oriented programming by constructing two simple objects: one that handles all nuclear properties and another that takes care of the nuclear reaction. The MCEF code was used to calculate important results for nuclear reactions, and here we show examples of possible uses for this code.  相似文献   

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

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