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

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

3.
一种策略模式的AOP实现及应用   总被引:1,自引:0,他引:1  
基于面向方面编程(AOP)实现GoF设计模式是目前程序设计方法学的一个研究热点。针对GoF设计模式中的策略模式的传统面向对象实现方法所存在的问题,设计了一种基于AOP的实现方法,并应用到J2EE"应用服务"核心模式的实例中。分析结果表明,该方法能有效解决策略模式的传统面向对象实现方法中的混乱、间接影响、封装破坏等问题。  相似文献   

4.
可执行文件比较广泛应用于软件版权检测、恶意软件家族检测、异常检测的模式更新以及补丁分析.传统方法无法满足应用对速度和精度的要求.在函数、基本块和指令级别上设计了一元指令签名、基于函数控制流程图邻接矩阵的函数一元结构签名、指令的强/中/弱一元签名,并提出了融合签名和属性的函数匹配算法、基本块匹配算法,从而简化了已有指令比较,可抗指令重排,优于SPP.并通过匹配权统计以及严格的最大唯一匹配策略和Hash进一步降低误报,提高效率.最后,实现原型工具PEDiff,并通过实验证实了该比较方法在速度和精度上具有良好的性能.  相似文献   

5.
冯铁  靳乐  张家晨  王洪媛 《软件学报》2020,31(6):1703-1722
设计模式检测是理解和维护软件系统的一项重要工作.以高效识别设计模式变体和提高设计模式识别准确率为目的,将面向对象度量与模式微结构相结合,提出一种基于堆叠泛化的设计模式检测方法.该方法应用典型的机器学习算法,分别训练度量分类器和微结构分类器,并基于两者的预测值和相关对象模型特征进一步训练,从而形成堆叠分类器.为了评估该方法,基于该方法开发了一个原型工具OOSdpd.该工具从Java字节码级别的系统实现中抽取设计模式实例,并在JUnit等几个经典的开源项目上进行实验.通过与现有的两种工具进行对比分析,实验验证了该方法在提高设计模式识别准确率及召回率方面的有效性.  相似文献   

6.
In this work, we present an automatic code generation process from conceptual models. This process incorporates the use of design patterns in OO-Method, an automated software production method, which is built on a formal object-oriented model called OASIS. Our approach defines a precise mapping between conceptual patterns, design patterns and their implementation. Design patterns make the code generation process easy because they provide methodological guidance to go from the problem space to the solution space. In order to understand these ideas, we introduce a complete code generation process for conceptual models that have dynamic specialization relationships. This proposal can be incorporated into CASE tools, making the automation of the software production process feasible.  相似文献   

7.
基于程序源代码的设计模式自动发现是软件逆向工程的重要技术组成。以此为研究对象,提出了一种通用的设计模式自动发现框架,对该框架中的代码理解、模式表示、匹配算法等关键技术进行了研究。并在该框架下,分析比较了国际上三种先进解决方案在以上各技术方面的实现方法和各自特点。并对该项技术的发展前景进行了展望。  相似文献   

8.
古辉  张炜星  金鹏  顾杰杰 《计算机科学》2015,42(2):173-176,203
在程序理解和软件逆向工程研究中,找到准确和快速地描述软件的设计模式和待识别源代码的方法,对于构建合理的设计模式识别框架和高效的识别算法是至关重要的。运用无向图的邻接表和连通分量的原理,提出类与类之间关联度的概念,由待识别源代码构建一个关联类集合,旨在减小设计模式识别算法的搜索空间;根据设计模式的特征,提出基于关联度和特征约束的设计模式识别算法。对Junit、JHotDraw和JreFactory 3个开源应用程序进行的设计模式识别表明,该算法能够准确高效地完成对源代码设计模式的识别。  相似文献   

9.
The process of understanding and reusing software is often time-consuming, especially in legacy code and open-source libraries. While some core code of open-source libraries may be well-documented, it is frequently the case that open-source libraries lack informative API documentation and reliable design information. As a result, the source code itself is often the sole reliable source of information for program understanding activities. In this article, we propose a reverse-engineering approach that can provide assistance during the process of understanding software through the automatic recovery of hidden design patterns in software libraries. Specifically, we use ontology formalism to represent the conceptual knowledge of the source code and semantic rules to capture the structures and behaviors of the design patterns in the libraries. Several software libraries were examined with this approach and the evaluation results show that effective and flexible detection of design patterns can be achieved without using hard-coded heuristics.  相似文献   

10.
This research proposes a novel automatic method (termed Auto-Sign) for extracting unique signatures of malware executables to be used by high-speed malware filtering devices based on deep-packet inspection and operating in real-time. Contrary to extant string and token-based signature generation methods, we implemented Auto-Sign an automatic signature generation method that can be used on large-size malware by disregarding signature candidates which appear in benign executables. Results from experimental evaluation of the proposed method suggest that picking a collection of executables which closely represents commonly used code, plays a key role in achieving highly specific signatures which yield low false positives.  相似文献   

11.
Design patterns are often used in the development of object-oriented software. It offers reusable abstract information that is helpful in solving recurring design problems. Detecting design patterns is beneficial to the comprehension and maintenance of object-oriented software systems. Several pattern detection techniques based on static analysis often encounter problems when detecting design patterns for identical structures of patterns. In this study, we attempt to detect software design patterns by using software metrics and classification-based techniques. Our study is conducted in two phases: creation of metrics-oriented dataset and detection of software design patterns. The datasets are prepared by using software metrics for the learning of classifiers. Then, pattern detection is performed by using classification-based techniques. To evaluate the proposed method, experiments are conducted using three open source software programs, JHotDraw, QuickUML, and JUnit, and the results are analyzed.  相似文献   

12.
从源码中抽取设计模式对于提高软件可理解性和可维护性、软件设计重用以及软件重构具有重要意义。面向Java语言提出了一种静态和动态分析相结合的源码中设计模式的抽取方法。具体地,研究了源码中设计模式抽取的静态结构分析过程,为了进一步提高设计模式实例抽取的准确率,对结构分析得到的创建型模式候选,使用创建对象的多重性分析方法进行验证,对结构分析得到的行为型模式候选,使用动态分析的方法进行验证,以区分结构相似但行为不同的模式的实例。最后实现了设计模式抽取工具并对开源软件中的模式实例进行抽取。通过实验数据,验证了设计模式实例抽取及验证方法的可行性及有效性。  相似文献   

13.
折蓉蓉  张丽萍  侯敏  闫盛 《计算机应用》2018,38(7):2037-2043
针对克隆代码的大量使用会导致长期软件维护问题甚至引入错误,提出了一种基于决策树的分类器来推荐克隆进行重构。首先,使用NiCad进行克隆检测;其次,收集了与克隆关系、克隆代码段和克隆上下文都相关的特征;然后,利用决策树分类器训练;最后,利用K折交叉评估分类结果。在5款开源软件中对近600多个克隆实例进行实验,实验结果表明所提方法为每个目标系统推荐克隆重构实例时达到80%的精度。  相似文献   

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.
Design patterns codify proven solutions to recurring design problems. Their proper use within a development context requires that: (i) we understand them; (ii) we ascertain their applicability or relevance to the design problem at hand; and (iii) we apply them faithfully to the problem at hand. We argue that an explicit representation of the design problem solved by a design pattern is key to supporting the three tasks in an integrated fashion. We propose a model‐driven representation of design patterns consisting of triples < MP, MS, T > where MP is a model of the problem solved by the pattern, MS is a model of the solution proposed by the pattern, and T is a model transformation of an instance of the problem into an instance of the solution. Given an object‐oriented design model, we look for model fragments that match MP (call them instances of MP), and when one is found, we apply the transformation T yielding an instance of MS. Easier said than done. Experimentation with an Eclipse Modeling Framework‐based implementation of our approach applied to a number of open‐source software application's raised fundamental questions about: (i) the nature of design patterns in general, and the ones that lend themselves to our approach, and (ii) our understanding and codification of seemingly simple design patterns. In this paper, we present the principles behind our approach, report on the results of applying the approach to the Gang of Four (GoF) design patterns, and discuss the representability of design problems solved by these patterns. Copyright © 2011 John Wiley & Sons, Ltd.  相似文献   

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

17.
《Computer Networks》2005,47(3):351-366
It is well known that excessive computational demands of public key cryptography have made its use limited especially when constrained devices are of concern. To reduce the costs of generating public key signatures one viable method is to employ a third party; the server. In open networks, getting help from a verifiable-server has an advantage over proxy-based solutions since as opposed to proxy-server, verifiable-server’s cheating can be proven.Verifiable-server assisted signatures were proposed in the past but they could not totally eliminate public key operations for the signer. In this paper, we propose a new alternative called SAOTS (server assisted one-time signatures) where just like proxy signatures generating a public key signature is possible without performing any public key operations at all. This feature results in both computational efficiency and implementation simplicity (e.g. a reduction in the code size) of the proposed protocol. In addition, SAOTS is a more promising approach since the signature is indistinguishable from a standard signature, no storage is necessary for the signer to prove the server’s cheating and the protocol works in less number of rounds (two instead of three). On the other hand, the drawback of SAOTS is the increased bandwidth requirement between the sender and server.  相似文献   

18.
Behavior‐based detection and signature‐based detection are two popular approaches to malware (malicious software) analysis. The security industry, such as the sector selling antivirus tools, has been using signature and heuristic‐based technologies for years. However, this approach has been proven to be inefficient in identifying unknown malware strains. On the other hand, the behavior‐based malware detection approach has a greater potential in identifying previously unknown instances of malicious software. The accuracy of this approach relies on techniques to profile and recognize accurate behavior models. Unfortunately, with the increasing complexity of malicious software and limitations of existing automatic tools, the current behavior‐based approach cannot discover many newer forms of malware either. In this paper, we implement ‘holography platform’, a behavior‐based profiler on top of a virtual machine emulator that intercepts the system processes and analyzes the CPU instructions, CPU registers, and memory. The captured information is stored in a relational database, and data mining techniques are used to extract information. We demonstrate the breadth of the ‘holography platform’ by conducting two experiments: a packed binary behavior analysis and a malvertising (malicious advertising) incident tracing. Both tasks are known to be very difficult to do efficiently using existing methods and tools. We demonstrate how the precise behavior information can be easily obtained using the ‘holography platform’ tool. With these two experiments, we show that the ‘holography platform’ can provide security researchers and automatic malware detection systems with an efficient malicious software behavior analysis solution. Copyright © 2011 John Wiley & Sons, Ltd.  相似文献   

19.
We propose a visualization based approach for digital signature authentication. Using our method, the speed and pressure aspects of a digital signature process can be clearly and intuitively conveyed to the user for digital signature authentication. Our design takes into account both the expressiveness and aesthetics of the derived visual patterns. With the visual aid provided by our method, digital signatures can be authenticated with better accuracy than using existing methods—even novices can examine the authenticity of a digital signature in most situations using our method. To validate the effectiveness of our method, we conducted a comprehensive user study which confirms positively the advantages of our approach. Our method can be employed as a new security enhancement measure for a range of business and legal applications in reality which involve digital signature authorization and authentication.  相似文献   

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

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

京公网安备 11010802026262号