首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 155 毫秒
1.
程序流程图在整个软件工程的生命周期中发挥着非常重要的作用。在软件设计中,设计人员通常需要先根据算法从结构上画出程序执行流程图,然后再依据流程图写出相应的源程序代码;在分析和维护软件时,如果能先将源程序代码逆向转换成流程图,则可以有效地帮助分析程序结构。显然,若能让计算机自动地实现流程图与源程序代码之间的相互转换,将大量节省软件开发的人力资源和时间耗费。讨论了如何利用基于边的图文法EGG来自动地实现这种转换,并用具体例子展示了应用EGG图文法的归约和推导操作分别实现流程图的语法分析和流程图的逆向生成,前者可以完成从流程图自动生成源程序代码,而后者则可以从源程序代码自动生成流程图。  相似文献   

2.
对图变换和可视化语言的研究激发并促进了图文法的研究和发展。作为一维字符文法的扩展,图文法可以形式化描述二维空间中的对象,如图像、图形和表格等,为它们的定义、生成、变换及分析提供理论和技术上的支持。设计模式是可复用面向对象软件的基础,通常以二维图的形式来表示。为了与用户多样化的需求相适应,设计模式经常需要在不改变系统基本结构的情况下进行演化。本文讨论了图文法EGG及其形式化方法在设计模式的演化中的应用,聚焦在图变换和图解析两方面。前者用EGG格式的产生式作为图重写式来指导图的每一次变换,以确保相应设计模式演化每一步的正确性;后者用EGG文法机制来对图进行归约,以检查随意演化后的设计模式是否合法。  相似文献   

3.
王毅  丁函 《计算机应用》2014,34(11):3180-3183
为了降低归约算法的时间复杂度,在基于边的上下文相关图文法(EGG)形式化的基础上,通过对产生式形式的适当约束,提出了EGG的产生式选择无关条件的判断方法。通过此方法可有效判断EGG产生式的选择无关性。对于选择无关的产生式,由于归约过程中产生式的使用顺序不会影响归约的结果,从而避免了回溯,能够有效地降低归约算法的时间复杂度。  相似文献   

4.
本文介绍了如何用句法图来表示扩展的BNF文法(EBNF),给出一个将EBNF文法翻译成句法图算法,然后我们给出一个适用于各种过程性高级语言的通用语法分析算法,同时考虑了语法错误的恢复和语义子程序的嵌入。  相似文献   

5.
将一个应用程序部署到给定的片上网络上执行时,需要将应用程序中的每一个子任务都指派给片上网络中的一个节点执行。该问题一般被建模成一组子任务作为顶点的有向无环图,任务在片上网络上的部署过程就等同于一个有向无环图的顶点向一个片上网络拓扑映射的过程。而随着应用程序和片上网络规模的增大,计算一个最优的映射方案是典型的难解问题。为了加速有向无环图到片上网络拓扑的映射过程,提出了有向无环图的归约算法,使归约后的图中的顶点数量尽可能地与给定片上网络中的节点数量相同。提出的图归约算法可以有效地识别出所有可归约子图,这些可归约子图可被归约为单一顶点。新算法的适用范围从嵌套图扩展到了任意图,并且拥有与原算法相同的复杂度量级。还提出了一种并行化的算法思想来加速可归约子图的搜索过程。  相似文献   

6.
本文讨论了上下文无关图文法的性质,并证明了图文法推导具有独立性.本文还给出了一种有效的上下文无关图文法分析算法,它具有多项式时间复杂性,并给出了算法的正确性证明.该算法已经用C语言实现.  相似文献   

7.
对数空间可构造的无向图遍历序列   总被引:1,自引:1,他引:0       下载免费PDF全文
研究了为无向连通子图设计环状遍历序列(TSC)的空间复杂性问题。通过定义对数空间的Cook归约,分析了TSC问题与无向图连接性问题及通用遍历序列构造问题的关系,证明了TSC问题以及无向图遍历问题是对数空间可解的,并给出了一个TSC一般性构造方法。最后还提出了一个更有效的针对树状图的TSC构造算法。  相似文献   

8.
一种基于边的上下文相关图文法形式化框架   总被引:3,自引:1,他引:2  
曾晓勤  韩秀清  邹阳 《软件学报》2008,19(8):1893-1901
围绕解决图文法中的主要问题——嵌入问题,提出了一种基于边的上下文相关图文法形式化框架,并对由此定义的文法的一些性质及相应的归约算法进行了讨论.对所提出的图文法与已有的文法进行了比较.同时,展望了今后值得进一步研究的一些问题和方向.  相似文献   

9.
王宏志  骆吉洲  李建中 《软件学报》2009,20(9):2436-2449
研究了图结构XML数据上子图查询处理,给出了一系列高效的处理算法.基于可达编码,首先提出基于哈希的结构连接算法(HGJoin)来处理图结构XML数据上的可达查询.然后,该算法被扩展来处理特殊的二分图查询.基于这些算法和所给出的代价模型,提出了一般DAG子图查询的处理算法和查询优化策略.这些算法经过简单修改即可有效地处理一般的子图查询.理论分析和实验结果表明,算法具有较高的效率.  相似文献   

10.
为减少频繁子图规范化检测的时间复杂度,对规范化邻接矩阵的相关性质进行分析。给出相关定理并证明其正确性,从而减少冗余候选子图的产生。在此基础上,提出一种频繁子图挖掘算法——FSM_CAM。实验结果证明,与现有频繁子图挖掘算法FSubGraphM相比,FSM_CAM算法的效率较高。  相似文献   

11.
A new approach to the problem of graph and subgraph isomorphism detection from an input graph to a database of model graphs is proposed in this paper. It is based on a preprocessing step in which the model graphs are used to create a decision tree. At run time, subgraph isomorphisms are detected by means of decision tree traversal. If we neglect the time needed for preprocessing, the computational complexity of the new graph algorithm is only polynomial in the number of input graph vertices. In particular, it is independent of the number of model graphs and the number of edges in any of the graphs. However, the decision tree is of exponential size. Several pruning techniques which aim at reducing the size of the decision tree are presented. A computational complexity analysis of the new method is given and its behavior is studied in a number of practical experiments with randomly generated graphs.  相似文献   

12.
子图查询返回图数据集合中所有包含查询图的数据图。在查询图和数据图同时为不确定性图的前提下,提出了不确定图间的期望子图同构定义和α-β子图同构匹配定义。不确定图间的期望子图同构是确定图上子图同构在概率图模型上的直接推广,不确定图间α-β子图同构利用两个限制阈值来衡量查询图和数据图间的匹配质量。文章详细阐述了α-β子图同构匹配的语义特点,分析了其和期望子图同构的联系和差别,设计实现α-β子图同构匹配判定算法。  相似文献   

13.
Given a set of points P, finding near neighbors among the points is an important problem in many applications in CAD/CAM, computer graphics, computational geometry, etc. In this paper, we propose an efficient algorithm for constructing the elliptic Gabriel graph (EGG), which is a generalization of the well-known Gabriel graph and parameterized by a non-negative value α. Our algorithm is based on the observation that a candidate point which may define an edge of an EGG with a given point pP is always in the scaled Voronoi region of p with a scale factor 2/α2 when the parameter α<1. From this observation, we can reduce the search space for locating neighbors of p in the EGG. For the case of α≥1, due to the fact that EGG is a subgraph of the Delaunay graph of P, EGG can be efficiently computed by watching the validity of each edge in the Delaunay graph. The proposed algorithm is shown to have its time complexity as O(n3) in the worst case and O(n) in the average case when α is moderately close to unity. The idea presented in this paper may similarly apply to other problems for the proximity search for point sets.  相似文献   

14.
Querying graph data is a fundamental problem that witnesses an increasing interest especially for massive graph databases which come as a promising alternative to relational databases for big data modeling. In this paper, we study the problem of subgraph isomorphism search which consists to enumerate the embedding of a query graph in a data graph. The most known solutions of this NP-complete problem are backtracking-based and result in a high computational cost when we deal with massive graph databases. We address this problem and its challenges via graph compression with modular decomposition. In our approach, subgraph isomorphism search is performed on compressed graphs without decompressing them yielding substantial reduction of the search space and consequently a significant saving in processing time as well as in storage space for the graphs. We evaluated our algorithms on nine real-word datasets. The experimental results show that our approach is efficient and scalable.  相似文献   

15.
本文介绍了基于图的频繁子图挖掘算法的研究情况,提出频繁子图挖掘算法的分类方法,对一些经典的算法进行了分析和评价,归纳出频繁子图挖掘的一般步骤以及实现这些步骤的方法,展望了频繁子图挖掘的未来研究方向.  相似文献   

16.
Inexact subgraph matching based on type-isomorphism was introduced by Berry et al. [J. Berry, B. Hendrickson, S. Kahan, P. Konecny, Software and algorithms for graph queries on multithreaded architectures, in: Proc. IEEE International Parallel and Distributed Computing Symposium, IEEE, 2007, pp. 1–14] as a generalization of the exact subgraph matching problem. Enumerating small subgraph patterns in very large graphs is a core problem in the analysis of social networks, bioinformatics data sets, and other applications. This paper describes a MapReduce algorithm for subgraph type-isomorphism matching. The MapReduce computing framework is designed for distributed computing on massive data sets, and the new algorithm leverages MapReduce techniques to enable processing of graphs with billions of vertices. The paper also introduces a new class of walk-level constraints for narrowing the set of matches. Constraints meeting criteria defined in the paper are useful for specifying more precise patterns and for improving algorithm performance. Results are provided on a variety of graphs, with size ranging up to billions of vertices and edges, including graphs that follow a power law degree distribution.  相似文献   

17.
由于旅客-航班异构网络仅有高度稀疏的民航旅客同行记录,现有子图抽取方法难以从旅客-航班异构网络中获得旅客同行子图。对此提出基于旅客-航班异构网络的旅客同行子图抽取算法。将旅客-航班异构网络转换为旅客-旅客同构网络,通过随机游走方法得到旅客间的潜在同行关系,使用标签传播算法进行子图抽取。在国内某航空公司的旅客订票数据集上的实验表明,相比于LPA、COPRA、CPM等基准算法,该算法在模块度和标准化互信息上具有更好效果。  相似文献   

18.
从图数据库中挖掘频繁跳跃模式   总被引:4,自引:0,他引:4  
刘勇  李建中  高宏 《软件学报》2010,21(10):2477-2493
很多频繁子图挖掘算法已被提出.然而,这些算法产生的频繁子图数量太多而不能被用户有效地利用.为此,提出了一个新的研究问题:挖掘图数据库中的频繁跳跃模式.挖掘频繁跳跃模式既可以大幅度地减少输出模式的数量,又能使有意义的图模式保留在挖掘结果中.此外,跳跃模式还具有抗噪声干扰能力强等优点.然而,由于跳跃模式不具有反单调性质,挖掘它们非常具有挑战性.通过研究跳跃模式自身的特性,提出了两种新的裁剪技术:基于内扩展的裁剪和基于外扩展的裁剪.在此基础上又给出了一种高效的挖掘算法GraphJP(an algorithm for mining jump patterns from graph databases).另外,还严格证明了裁剪技术和算法GraphJP的正确性.实验结果表明,所提出的裁剪技术能够有效地裁剪图模式搜索空间,算法GraphJP是高效、可扩展的.  相似文献   

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

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