首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
For maintainers involved in understanding and reengineering large software, locating source code fragments that match certain patterns is a critical task. Existing solutions to the problem are few, and they either involve manual, painstaking scans of the source code using tools based on regular expressions, or the use of large, integrated software engineering environments that include simple pattern-based query processors in their toolkits. We present a framework in which pattern languages are used to specify interesting code features. The pattern languages are derived by extending the source programming language with pattern-matching symbols. We describe SCRUPLE, a finite state machine-based source code search tool, that efficiently implements this framework. We also present experimental performance results obtained from a SCRUPLE prototype, and the user interface of a source code browser built on top of SCRUPLE  相似文献   

2.
Motivated by packet filtering of firewall systems in Internet applications, we study the fault detection problem in the general Rule-based Software systems. We discuss algorithms for the detection of conflicts in a given set of rules. We first study a constrained version of the fault detection problem and propose a two-phase algorithm. The first phase is to do the rule normalization. The second phase is to detect conflicting rules. For this constrained version of the fault detection problem, the algorithm takes polynomial time. For the general problem, it is NP-hard. We apply the algorithms to the Rule Table getting from one of the firewalls in Bell Labs and report the experiment result.  相似文献   

3.
We illustrate here how software engineers developing engineering design systems can introduce patterns into the conceptual modeling techniques that were developed in the database community and integrate them with techniques that are emerging in the object-oriented analysis and engineering design community. The goal is to raise the level of abstraction used to communicate software specifications and to build applications. This will speed the development and improve the quality of engineering design tools. We show by an example how this can be accomplished through an example software pattern from the software engineering discipline (the observer pattern) [12]. We show how patterns can be automatically supported using the general techniques that were developed in the Semantic Objects, Relationships, and Constraints (SORAC) project [20] for the development of tools, for the specification of databases and for building design systems.  相似文献   

4.
在分析现有程序代码抄袭检测系统的特点及局限性的基础上,提出一种综合文本分析、结构度量和属性计数技术的混合式程序抄袭检测方法。应用文档指纹技术和Winnowing算法计算程序的文本相似度;将程序代码表示成动态控制结构树(Dynamic Control Structure tree,DCS),运用Winnowing算法计算DCS树相似度,从而得到结构相似度;收集并统计程序中的每个变量信息,应用变量相似度算法分析变量信息节点获取变量相似度;分别赋予文本相似度、结构相似度和变量相似度一个权值,计算得到总体的代码相似度。实验结果表明,所提出的方法能够有效检测出各种抄袭行为。针对不同的抄袭门槛值,使用该方法的检测结果准确度和查全率高于JPLAG系统。特别对于结构简单的程序组,此方法和JPLAG系统检测结果的平均准确度分别为82.5%和69.5%,说明所提的方法更加有效。  相似文献   

5.
In this paper, we present a robust rule-based edge detection method. Although generalized edge detection approaches are effective for most images they often fail in others. Thus the goal of our method is to provide more reliable edge detection results that are effective in most images. We implement the proposed method as follows: (1) transform RGB images to YCbCr format, (2) apply Sobel mask in four edge directions (horizontal, vertical, diagonal, anti-diagonal), (3) apply a bi-directional mask in four edge directions (horizontal–diagonal, vertical–diagonal, horizontal–anti-diagonal, vertical–anti-diagonal), and (4) detect rule-based edges by calculating membership degrees. Simulation results demonstrate that the proposed method is effective in most given images. We used three benchmarks approaches (Canny edge mask, high-pass filter, and Sobel mask) to compare the subjective performance quality.  相似文献   

6.
The main thrust of this research is in developing aknowledge-based system for the design of components for a material processing system. In particular, this paper concentrates on developing methodologies forinitial design andredesign in a quantitative and qualitative format. A die for plastic extrusion has been selected as the subject material processing component. A design algorithm using best first heuristic search and expert knowledge, both in procedural and declarative form, is the core of the scheme. Apart from this expert, the suggestedselection procedure for candidate design is also seen to accelerate the design scheme. The methodologies presented enableefficient design of the component. Some generality has been accomplished by the implementation of the techniques to dies of different cross-sectional shapes. The software is written inLisp within an object-oriented software package using analysis modules written in C.  相似文献   

7.
Software "design patterns" seek to package proven solutions to design problems in a form that makes it possible to find, adapt, and reuse them. A common claim is that a design based on properly applied patterns will have fewer defects than more ad hoc solutions. This case study analyzes the weekly evolution and maintenance of a large commercial product (C++, 500,000 LOC) over three years, comparing defect rates for classes that participated in selected design patterns to the code at large. We found that there are significant differences in defect rates among the patterns, ranging from 63 percent to 154 percent of the average rate. We developed a new set of tools able to extract design pattern information at a rate of 3/spl times/10/sup 6/ lines of code per hour, with relatively high precision. Based on a qualitative analysis of the code and the nature of the patterns, we conclude that the Observer and Singleton patterns are correlated with larger code structures and, so, can serve as indicators of code that requires special attention. Conversely, code designed with the Factory pattern is more compact and possibly less closely coupled and, consequently, has lower defect numbers. The Template Method pattern was used in both simple and complex situations, leading to no clear tendency.  相似文献   

8.
9.
Process-Design System (PDS) is a novel, rapid turn around, and rule-based process-cell design platform. It facilitates a gradual evolution of a design from an initial static concept to a functional monitoring system, and then to an operational transaction-driven process control system. PDS provides high productivity gains both in the cell-design process as well as in the operations of the implemented production cell. It's capabilities extend to the design of the supporting organizational structure that leads to lean and productive manufacturing enterprise. The design and implementation of a transaction driven process controller facilitates also the creation of an audit trail for quality assurance standards as commonly adopted by industry, i.e. following ISO9000 protocol. PDS employs techniques of graphic programming to automatically generate an underlying database that defines the static structure of a process-cell. Furthermore, graphic link chains are employed to automatically generate a transaction flow infrastructure, supporting the corresponding process monitors and controllers. The PDS design paradigm provides a turnaround of several human-days effort for the design of a static model of a small-scale process cell. It takes about one human-month effort to extend it to an operational, dynamic process-cell controller. It accommodates a mixed-process environment that supports partially automated and partially human-based processing. Incremental design capabilities lead to partial but functional implementations of local monitors and/or controllers. PDS focuses on the productivity of the individual designer in the context of extensive teamwork.  相似文献   

10.
Context—Design patterns represent recommended generic solutions to various design problems, whereas code smells are symptoms of design issues that could hinder further maintenance of a software system. We can intuitively expect that both concepts are mutually exclusive, and the presence of patterns is correlated with the absence of code smells. However, the existing experimental evidence supporting this claim is still insufficient, and studies separately analyzing the impact of smells and patterns on code quality deliver diverse results.Objective—The aim of the paper is threefold: (1) to determine if and how the presence of the design patterns is linked to the presence of code smells, (2) to investigate if and how these relationships change throughout evolution of code, and (3) to identify the relationships between individual patterns and code smells.Method—We analyze nine design patterns and seven code smells in two medium-size, long-evolving, open source Java systems. In particular, we explore how the presence of design patterns impacts the presence of code smells, analyze if this link evolves over time, and extract association rules that describe their individual relationships.Results—Classes participating in design patterns appear to display code smells less frequently than other classes. The observed effect is stronger for some patterns (e.g., Singleton, State-Strategy) and weaker for others (e.g., Composite). The ratio between the relative number of smells in the classes participating in patterns and the relative number of smells in other classes, is approximately stable or slightly decreasing in time.Conclusion—This observation could be used to anticipate the smell-proneness of individual classes, and improve code smell detectors. Overall, our findings indicate that the presence of design patterns is linked with a lower number of code smell instances. This could support programmers in a context-sensitive analysis of smells in code.  相似文献   

11.
Recent work in code optimization has led to development of new unified optimizing transformations[6,7]. Application of these transformations requires solution of bi-directional data flow problems over program flow graphs using iterative solution techniques. Appropriate characterization of program loops in the flow graph is necessary so as (i) not to hinder code movement, etc., and (ii) restrict optimization overheads to low levels. This paper reviews alternate loop characterizations and proposes a characterization which leads to minimum overheads and has certain nice properties from a practical viewpoint.  相似文献   

12.
13.

The rapid growth of the Internet in the past few years has revealed the limitation of address space in the current Internet Protocol (IP), namely IPv4. Essentially, the increasing demand and consumption of IP addresses have led to the anticipated exhaustion of IPv4 addresses. In order to address this concern, the Internet Protocol version 6 (IPv6) has been developed to provide a sufficient address space. IPv6 is shipped with a new protocol, namely, the neighbour discovery protocol (NDP) which has vulnerabilities that can be used by attackers to launch attacks on IPv6 networks. Such vulnerabilities include the lack of exchange message authentication of NDP. Attacks targeting ICMPv6 protocol display ICMPv6 anomalies. As such, this paper proposes a rule-based technique for detecting ICMPv6 anomalous behaviours that negatively affect the network performance. The effectiveness of this technique is demonstrated by using substantial datasets obtained from the National Advance IPv6 Centre of Excellence (NAv6) laboratory. The experimental results have proved that the proposed technique is capable of detecting ICMPv6 anomalous behaviour s with a detection accuracy rate of 92%.

  相似文献   

14.
程序代码相似度度量是用来检测剽窃及重复率、验证学生作业原创性的关键科技技术,这一技术还可以对所评阅的作业进行自动修改,通过对算法在程序代码相似度度量中的应用进行研究,可以辅助教师有效的衡量出学生程序设计对间的相似程度,从而检测出学生作业中相似的程序代码,促进教学评价的科学性和真实性,实现尊重原创、提倡创新的社会效益和教育目的。  相似文献   

15.
服务器是计算机网络应用系统中的重要组成部分.本文提出了一种方法:在计算机网络维护工作中,通过编写故障检测处理程序,让它运行于故障服务器上,来自动发现和处理服务器某种类型故障:本文阐述了程序设计原理、思想,工作流程,程序结构;简述了主要功能的编程语言实现,以及该程序在实际使用中,相对于人工排故,更加准确、快捷.  相似文献   

16.
Code completion is a widely used productivity tool. It takes away the burden of remembering and typing the exact names of methods or classes: As a developer starts typing a name, it provides a progressively refined list of candidates matching the name. However, the candidate list usually comes in alphabetic order, i.e., the environment is only second-guessing the name based on pattern matching, relying on human intervention to pick the correct one. Finding the correct candidate can thus be cumbersome or slower than typing the full name.  相似文献   

17.
In the paper, defects in a program code in Python are considered. It is shown that these defects are different from those in a code in C/C++; hence, there is a need in study of defects in large-scale projects with an open source code. A classification of the defects found, which is based on whether type inference is required for finding an error, is presented. It is shown that there exists a small portion of “simple” defects; however, the determination of the majority of the defects requires type inference. The question of what constructs of the Python language are to be supported in type inference for finding real defects is discussed.  相似文献   

18.
程序代码相似度度量算法研究   总被引:5,自引:0,他引:5  
代码剽窃是程序设计课程中经常出现的一种作弊行为,检测剽窃的源代码,验证学生程序作业的原创性在教学中很重要.程序代码的相似度度量是剽窃检测的关键技术.通过对现有程序代码相似度度量技术进行研究后,基于Karp-Rabin和最长公共子串算法思想,提出了一种改进的源代码相似度度量算法,即串的散列值匹配算法.  相似文献   

19.
在编写程序代码的过程中,软件工程师常常花费大量的时间来搜索和重用代码,为了快速和准确搜索源代码,提高源代码重用效率,开展了程序源代码切片摘要获取方法研究。通过分析源代码的结构特征,给出了变量切片的定义。选取与函数代码段核心功能密切相关的变量,联合其变量切片形成切片摘要,以反映源代码的结构和功能信息。然后分别设计了变量切片算法和切片摘要提取算法,并且将切片摘要应用于开源代码搜索引擎中。应用实验表明:本文提出的方法具有可行性,且较传统搜索方法在搜索精度上有较大的提高。  相似文献   

20.
Code and design smells are recurring design problems in software systems that must be identified to avoid their possible negative consequences on development and maintenance. Consequently, several smell detection approaches and tools have been proposed in the literature. However, so far, they allow the detection of predefined smells but the detection of new smells or smells adapted to the context of the analysed systems is possible only by implementing new detection algorithms manually. Moreover, previous approaches do not explain the transition from specifications of smells to their detection. Finally, the validation of the existing approaches and tools has been limited on few proprietary systems and on a reduced number of smells. In this paper, we introduce an approach to automate the generation of detection algorithms from specifications written using a domain-specific language. This language is defined from a thorough domain analysis. It allows the specification of smells using high-level domain-related abstractions. It allows the adaptation of the specifications of smells to the context of the analysed systems. We specify 10 smells, generate automatically their detection algorithms using templates, and validate the algorithms in terms of precision and recall on Xerces v2.7.0 and GanttProject v1.10.2, two open-source object-oriented systems. We also compare the detection results with those of a previous approach, iPlasma.  相似文献   

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

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

京公网安备 11010802026262号