首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 125 毫秒
1.
针对安全性质,提出一种植入式监控方法.使用OCL(Object Constraint Language)实现安全性质在模型上的描述,并将OCL约束转化为Java监控代码,从而实现监控信息由模型到代码的映射.该方法采用AOP(Aspect-Oriented Programming)技术将监控代码植入目标系统,使软件在运行时具备安全性质的监控能力.  相似文献   

2.
面向对象的软件测试应该也只能被设计所指导.提出了一种方案:在使用UML进行面向对象的设计阶段为类和方法加入OCL约束,然后由一种转换工具将带有OCL约束的UML类图转换为带有JML(Java建模语言,Java Modeling Language)注解的Java类代码框架,就可以利用JML丰富的支撑工具进行调试和自动测试,从而实现了设计指导测试的思想.研究了OCL到JML的转换机制,并给出了基于Rational Rose的转换工具JML-AddIn的实现框架.  相似文献   

3.
为了应用精确、完备的PIM自动进行模型转换、校验及编译,分析了OCL元模型与UML元模型间的关系,在此基础上对OCL在精确化平台无关模型(PIM)方面的应用进行了研究,指出OCL面临的挑战,并对OCL的研究方向提出了几点建议。对象约束语言OCL可以对模型中的元素进行约束和查询,可以在MOF的任意一层上定义模型语言,还可以通过各种方法定义模型的转换规则。  相似文献   

4.
给出了CPL构件的复用机制,定义了一种对构件组合约束检查的矩阵技术.通过比较CPL语言与Java语言的语法特点,在XML规范的框架内,提出了一种将CPL语言翻译成等价功能的Java代码的翻译方法.该方法采用基于EJB容器的思想,并使用类对象的形式构造整个业务,用JavaBeans表示CPL中的功能构件,使翻译成的Java代码具有良好的可读性,并具有较高的可复用性及可扩展性.  相似文献   

5.
嵌入式系统描述与验证环境的实现   总被引:5,自引:1,他引:5  
首先,用统一建模语言(UML)中的状态图描述系统在整个活动周期中所处的不同的状态,活动图表示状态图中每个进程的功能,对象约束语言(OCL)描述系统中的约束条件;然后,用自行开发的软件UML2SC将UML描述的系统转换成SystemC代码,以完成系统的模拟验证;并介绍了该方法的一个应用实例。  相似文献   

6.
方文渊  刘琰  朱玛 《计算机科学》2019,46(1):219-225
最新的研究表明,从大量源代码中提取代码特征,建立统计语言模型,对代码有着良好的预测能力。然而,现有的统计语言模型在建模时,往往采用代码中的文本信息作为特征词,对代码的语法结构信息利用不充分,预测准确率仍有提升空间。为提高代码预测性能,提出了方法的约束关系这一概念;在此基础上,研究Java对象的方法调用序列,抽象代码特征,构建统计语言模型来完成代码预测,并研究基于方法约束关系的代码预测模型在Java语言中的适用范围。实验表明,该方法较现有的模型提高了8%的准确率。  相似文献   

7.
保证软件质量的前提下如何减少测试用例规模是测试设计的关键技术之一。提出一种带OCL约束的状态图测试线索的自动生成方法。该方法自动解析类图和带OCL约束的状态图的XML模型文件,获取相应的状态节点邻接表,再结合状态对-事件约束集合生成带OCL约束的测试线索。实例研究表明,通过OCL约束冲突判断可避免不可行测试线索的生成,减少测试用例数目,达到降低测试成本的目的。实验结果证明了该方法的可行性和有效性。  相似文献   

8.
武器系统效能评估是武器系统设计过程中的重要环节,效能评估指标体系作为效能评估的前提和基础,其描述的精确性将直接影响武器系统效能评估的结果.针对武器系统的设计过程,提出了一种效能评估指标体系的描述方法,即元模型描述方法;引入统一建模语言(UML)规范的一部分对象约束语言(OCL)对其进行精确描述.最后,通过实验验证了OCL描述的正确性,为武器系统设计过程中的效能评估提供依据.  相似文献   

9.
陈志锋  李清宝  张平  王烨 《软件学报》2017,28(7):1732-1745
近年来,代码复用攻击与防御成为安全领域研究的热点.内核级代码复用攻击使用内核自身代码绕过传统的防御机制.现有的代码复用攻击检测与防御方法多面向应用层代码复用攻击,忽略了内核级代码复用攻击.为有效检测内核级代码复用攻击,提出了一种基于细粒度控制流完整性(CFI)的检测方法.首先根据代码复用攻击原理和正常程序控制流构建CFI约束规则,然后提出了基于状态机和CFI约束规则的检测模型.在此基础上,基于编译器辅助实现CFI标签指令插桩,并在Hypervisor中实现CFI约束规则验证,提高了检测方法的安全性.实验结果表明该方法能够有效检测内核级代码复用攻击,并且性能开销不超过60%.  相似文献   

10.
数据库触发器是响应插入、更新和删除等数据库事件而执行的过程。本文详细叙述了Oracle触发器的功能及应用场合,并以一个实例示范用Java创建Oracle9i触发器的全过程。文尾给出了用Java开发不依赖具体数据库的稳固的触发器代码的思路。  相似文献   

11.
Linear equality and inequality constraints arise naturally in specifying many aspects of user interfaces, such as requiring that one window be to the left of another, requiring that a pane occupy the leftmost 1/3 of a window, or preferring that an object be contained within a rectangle if possible. For interactive use, we need to solve similar constraint satisfaction problems repeatedly for each screen refresh, with each successive problem differing from the previous one only in the position of an input device and the previous state of the system. We present an algorithm for solving such systems of constraints using projection. The solution is compiled into very efficient, constraint-free code, which is parameterized by the new inputs. Producing straight-line, constraint-free code of this sort is important in a number of applications: for example, to provide predictable performance in real-time systems, to allow companies to ship products without including a runtime constraint solver, to compile Java applets that can be downloaded and run remotely (again without having to include a runtime solver), or for applications where runtime efficiency is particularly important. Even for less time-critical user interface applications, the smooth performance of the resulting code is more pleasing than that of code produced using other current techniques.  相似文献   

12.
Mobile code presents a number of threats to machines that execute it. We introduce an approach for protecting machines and the resources they hold from mobile code and describe a system based on our approach for protecting host machines from Java 1.1 applets. In our approach, each Java applet downloaded to the protected domain is rerouted to a dedicated machine (or set of machines), the playground, at which it is executed. Prior to execution, the applet is transformed to use the downloading user's Web browser as a graphics terminal for its input and output, and so the user has the illusion that the applet is running on his own machine. In reality, however, mobile code runs only in the sanitized environment of the playground, where user files cannot be mounted and from which only limited network connections are accepted by machines in the protected domain. Our playground thus provides a second level of defense against mobile code that circumvents language-based defenses. This paper presents the design and implementation of a playground for Java 1.1 applets and discusses extensions of it for other forms of mobile code, including Java 1.2  相似文献   

13.
Java存储模型是Java语言和Java虚拟机研究中的核心关键部分,目前Java语言规范中的存储模型不能保证Java技术所必需的语义特性,而且不利于Java虚拟机的性能优化.提出了一种新的Java存储模型,该模型取消了规范中Java存储模型中对存储密致性的要求,保证了Location一致性;同时根据Java语义的要求,对Java语言中不同类型的变量详细规定了多线程存储操作的行为规则.该模型不仅能保证Java程序的正确性,同时能有效提高Java程序的运行效率.最后通过仿真实验验证了该存储模型的关键特性.  相似文献   

14.
Integrity constraints (including key, referential and domain constraints) are unique features of database applications. Integrity constraints are crucial for ensuring accuracy and consistency of data in a database. It is important to perform integrity constraint enforcement (ICE) at the application level to reduce the risk of database corruption. We have conducted an empirical analysis of open-source PHP database applications and found that ICE does not receive enough attention in real-world programming practice. We propose an approach for automatic detection of ICE violations at the application level based on identification of code patterns. We define four patterns that characterize the structures of code implementing integrity constraint enforcement. Violations of these patterns indicate the missing of integrity constraint enforcement. Our work contributes to quality improvement of database applications. Our work also demonstrates that it is feasible to effectively identify bugs or problematic code by mining code patterns in a specific domain/application area.  相似文献   

15.
非信任代码的安全执行是移动代码安全的重要问题之一。携带模型代码方法同时从移动代码的生产者和使用者的角度考虑,为安全执行非信任代码提供了一个系统、全面且有效的解决方案。该方法主要包括安全策略的定义、安全行为模型的生成,以及其验证和安全策略的强制实施。针对已被广泛使用的Java平台,在深入分析其基于访问控制的安全体系结构的基础上,通过对Java核心类的修改和扩展,提出了一种能增加新的安全策略,以及实现MCC方法中安全行为模型验证的方法,为提高Java安全策略的描述能力,以及基于于Java平台实现MCC方法,确保更全面的安全机制提供了可行的途径。  相似文献   

16.
本文介绍了如何用Java实现粒子模拟的面向对象的并行程序设计方法,并在由16个Pentium Ⅲ 1.6G CPU组成的微机机群上测试了其性能。同时,为了提高它的计算性能,我们还介绍了利用JNI实现Java和Fortran混合编程的方法,即把程序中计算量较大的部分用Fortran语言代替,以提高其计算性能。结果表明,Java/Fortran混合编程是进行科科学计算的一种有效途径。  相似文献   

17.
Java程序的并发性使它比串行程序更难测试,而可达性测试是一种有效的并发程序测试方法。首先比较了现有的Java程序可达性测试技术,进而提出了一种融合的改进方案以提高同步序列集的生成效率。然后指出新方案已覆盖了用伯恩斯坦条件裁减同步序列集的功能。最后详述如何通过扫描源程序来自动获取同步事件的时序约束关系,进而减少不可行的同步序列,并介绍了相应的实现算法和数据结构。  相似文献   

18.
In Java, type resolution is a function that takes a reference to a type occurring in a given context as input and returns the canonical name of that type. This information is fundamental to static analysis—a “must have” function underlying virtually all forms of semantic-based analysis. In the case of Java, this function is also complex and it is quite common to encounter tools where it is implemented incorrectly. This paper presents a novel approach for certifying the correctness of a given type resolution function with respect to an arbitrary Java source code base. The approach uses program transformation to instrument a subject code base in such a way that reflection can then be used to certify the correctness of the type resolution function against the function used by the Java compiler. In this form of certification, the type resolution function of the Java compiler serves as the test oracle.  相似文献   

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

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