首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到16条相似文献,搜索用时 187 毫秒
1.
面向Java语言的设计模式抽取方法的研究   总被引:1,自引:0,他引:1  
从源码中抽取设计模式对于提高软件可理解性和可维护性、软件设计重用以及软件重构具有重要意义。文章面向Java语言提出了一个从源码中抽取设计模式的方法。具体地,研究了一种特定的设计模式描述方法、定义了源码信息模型及其化简方法,以此为基础提出了设计模式模型和源码模型的匹配方法。特别讨论了在抽取设计模式时与container类相关的问题及其解决方案。最后根据抽取结果从模式及其实例的角度对方法进行了评价,并提出了必要的优化技术。  相似文献   

2.
应用模糊方法的设计模式挖掘策略研究   总被引:1,自引:0,他引:1       下载免费PDF全文
从系统源码中挖掘设计模式对软件的可理解性和可维护性具有重要意义。基于模糊理论,提出一种模式匹配方法,实现设计模式挖掘。其中,使用基于类关系的素数矩阵模型对设计模式结构及源码信息进行描述,并作为匹配的模型基础;采用聚类方法对源码模型进行优化,提高匹配效率;将模糊方法与设计模式匹配策略相结合,引入静态和动态信息,提高匹配的正确性。实验结果证明此方法在精确性和完整性方面得到了很大的提高,并且避免了对特殊模式的失效性。  相似文献   

3.
从源码中挖掘设计模式实例具有重要意义,它能够提升软件系统的可理解性和可维护性。基于机器学习方法,提出了一个设计模式挖掘方法。其中,使用类关系图表示软件系统和设计模式,采用子图匹配的方法从软件系统中提取出候选设计模式实例,过滤了大量非设计模式实例组合,提高了设计模式挖掘效率;提出了度量指标,将软件系统和设计模式向量化,采用机器学习的方法对候选设计模式实例进行分类,提高了设计模式挖掘的准确率。实验结果证明此方法效率和有效性上得到了一定的提升。  相似文献   

4.
基于设计模式的软件设计恢复方法研究   总被引:1,自引:0,他引:1  
从源码中抽取设计模式对于提高软件可理解性和可维护性、软件设计重用以及软件重构具有重要意义.本文研究基于设计模式的软件设计恢复方法框架,并根据该框架对设计模式实例查找过程可能遇到的关键问题予以分析解答,探讨该领域未来的研究方向和趋势.  相似文献   

5.
从源码中抽取设计模式对于提高软件可理解性和可维护性、软件设计重用以及软件重构具有重要意义。研究设计模式抽取技术的方法框架,并根据该框架对目前流行的几种设计模式抽取方法进行分类和比较,分析这些技术的优缺点,探讨该领域未来的研究方向和趋势。  相似文献   

6.
设计模式探测是从源码中提取设计模式实例的过程,其搜索算法是探测的关键。文中分析了设计模式探测的一般步骤和搜索策略,通过实现从Java源码中搜索Factory Method模式的算法,给出了设计模式自动探测工具的搜索功能实现原型。  相似文献   

7.
基于设计模式的可扩展Java静态分析器设计   总被引:1,自引:0,他引:1  
王越  刘冬懿  金茂忠 《计算机应用》2006,26(Z1):301-304
鉴于静态分析器设计的复杂性,提出运用多种设计模式构建静态分析器系统.结合实例详细论述单件、访问者、外观及工厂方法等模式在构建Java静态分析器中的应用.旨在促使静态分析器系统开发中应用设计模式,设计出灵活、可复用和易理解的软件,提高软件的质量和软件的复用性及可扩展性.  相似文献   

8.
Struts框架控制器及其进化的模式分析   总被引:1,自引:0,他引:1  
Struts框架为Web应用提供了预备的软件架构和相关的软件包,它的实现源代码使用设计模式以满足框架本身的复用性要求。简要介绍了Struts框架如何实现MVC模式,通过分析Struts框架控制器源码所使用的经典设计模式和J2EE模式阐明了Struts框架的工作原理及设计思想。针对该框架只能支持HTML格式终端数据的问题,讨论了如何使用具体设计模式将其控制器进化为以XML格式数据为应用处理核心来屏蔽各种客户终端。  相似文献   

9.
静动态结合的Java程序不变性分析方法   总被引:1,自引:0,他引:1  
程序的不变性(immutability)是指类的实例对象在其生命周期内状态不会发生改变.不变性信息可以用来指导程序的分析、测试和验证等工作.现有分析不变性的技术主要集中于对程序的静态分析,而动态分析方面的工作很少.文中在分析了静、动态分析技术各自的优缺点后,提出了一种静动态结合的混合分析技术.首先通过对程序进行静态分析,即对程序进行分析测试和验证,来获得初步的程序不变性信息,然后对静态分析的结果中不确定的部分再进行动态分析,即通过观察程序运行时各个对象的状态变化进行分析,同时还将动态分析用于对静态分析结果的验证.静动态结合的分析技术比单纯的静态分析提高了分析结果的精度,同时也比单纯的动态分析降低了开销,提高了效率.  相似文献   

10.
本文提出了基于接口呼叫模式的新型设计模式,详细描述了该模式的运行机理及实现方法,分析了该设计模式的特点,重点分析了其解耦特性。这种设计模式特别适合大型的软件框架设计,本文给出了该设计模式在Web软件构架中的应用实例。  相似文献   

11.
To improve software quality, static or dynamic defect-detection tools accept programming rules as input and detect their violations in software as defects. As these programming rules are often not well documented in practice, previous work developed various approaches that mine programming rules as frequent patterns from program source code. Then these approaches use static or dynamic defect-detection techniques to detect pattern violations in source code under analysis. However, these existing approaches often produce many false positives due to various factors. To reduce false positives produced by these mining approaches, we develop a novel approach, called Alattin, that includes new mining algorithms and a technique for detecting neglected conditions based on our mining algorithm. Our new mining algorithms mine patterns in four pattern formats: conjunctive, disjunctive, exclusive-disjunctive, and combinations of these patterns. We show the benefits and limitations of these four pattern formats with respect to false positives and false negatives among detected violations by applying those patterns to the problem of detecting neglected conditions.  相似文献   

12.
H. Szer 《Software》2015,45(10):1359-1373
Static code analysis tools automatically generate alerts for potential software faults that can lead to failures. However, these tools usually generate a very large number of alerts, some of which are subject to false positives. Because of limited resources, it is usually hard to inspect all the alerts. As a complementary approach, runtime verification techniques verify dynamic system behavior with respect to a set of specifications. However, these specifications are usually created manually based on system requirements and constraints. In this paper, we introduce a noval approach and a toolchain for integrated static code analysis and runtime verification. Alerts that are generated by static code analysis tools are utilized for automatically generating runtime verification specifications. On the other hand, runtime verification results are used for automatically generating filters for static code analysis tools to eliminate false positives. The approach is illustrated for the static analysis and runtime verification of an open‐source bibliography reference manager software. Copyright © 2014 John Wiley & Sons, Ltd.  相似文献   

13.
漏洞这一名词伴随着计算机软件领域的发展已经走过了数十载。自世界上第一个软件漏洞被公开以来,软件安全研究者和工程师们就一直在探索漏洞的挖掘与分析方法。源代码漏洞静态分析是一种能够贯穿整个软件开发生命周期的、帮助软件开发人员及早发现漏洞的技术,在业界有着广泛的使用。然而,随着软件的体量越来越大,软件的功能越来越复杂,如何表示和建模软件源代码是当前面临的一个难题;此外,近年来的研究倾向于将源代码漏洞静态分析和机器学习相结合,试图通过引入机器学习模型提升漏洞挖掘的精度,但如何选择和构建合适的机器学习模型是该研究方向的一个核心问题。本文将目光聚焦于源代码漏洞静态分析技术(以下简称:静态分析技术),通过对该领域相关工作的回顾,将静态分析技术的研究分为两个方向:传统静态分析和基于学习的静态分析。传统静态分析主要是利用数据流分析、污点分析等一系列软件分析技术对软件的源代码进行建模分析;基于学习的静态分析则是将源代码以数值的形式表示并提交给学习模型,利用学习模型挖掘源代码的深层次表征特征和关联性。本文首先阐述了软件漏洞分析技术的基本概念,对比了静态分析技术和动态分析技术的优劣;然后对源代码的表示方法进行了说明。接着,本文对传统静态分析和基于学习的静态分析的一般步骤进行了总结,同时对这两个研究方向典型的研究成果进行了系统地梳理,归纳了它们的技术特点和工作流程,提出了当前静态分析技术中存在的问题,并对该方向上未来的研究工作进行了展望。  相似文献   

14.
In this paper we propose an approach for recovering structural design patterns from object-oriented source code. The recovery process is organized in two phases. In the first phase, the design pattern instances are identified at a coarse-grained level by considering the design structure only and exploiting a parsing technique used for visual language recognition. Then, the identified candidate patterns are validated by a fine-grained source code analysis phase. The recognition process is supported by a tool, namely design pattern recovery environment, which allowed us to assess the retrieval effectiveness of the proposed approach on six public-domain programs and libraries.  相似文献   

15.
Reasoning about software systems at the architectural level is key to effective software development, management, evolution and reuse. All too often, though, the lack of appropriate documentation leads to a situation where architectural design information has to be recovered directly from implemented software artifacts. This is a very demanding process, particularly when involving recovery of runtime abstractions (clients, servers, interaction protocols, etc.) that are typical to the design of distributed software systems. This paper presents an exploratory reverse engineering approach, called X-ray, to aid programmers in recovering architectural runtime information from a distributed system's existing software artifacts. X-ray comprises three domain-based static analysis techniques, namely component module classification, syntactic pattern matching, and structural reachability analysis. These complementary techniques can facilitate the task of identifying a distributed system's implemented executable components and their potential runtime interconnections. The component module classification technique automatically distinguishes source code modules according to the executables components they implement. The syntactic pattern matching technique in turn helps to recognise specific code fragments that may implement typical component interaction features. Finally, the structural reachability analysis technique aids in the association of those features to the code specific for each executable component. The paper describes and illustrates the main concepts underlying each technique, reports on their implementation as a suit of new and off-the-shelf tools, and, to give evidence of the utility of the approach, provides a detailed account of a successful application of the three techniques to help recover a static approximation of the runtime architecture for Field, a publicly-available distributed programming environment.  相似文献   

16.
Web工程中存在的后门给网站安全带来极大风险,针对日益猖獗的后门攻击,文章提出了一种基于静态分析的后门检测技术,该技术通过分析源代码,可以检测出Java语言Web工程中存在的主要后门漏洞,并结合流分析及关键数据传播分析,给出漏洞的完整攻击路径。  相似文献   

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

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