首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 500 毫秒
1.
本文先简要介绍了一种上下文无关文法的推断方法--逐步求精法,然后论述了递归概念在文法推断中的核心作用,并从递归概念的特殊性质出发提出了多条启发规则,能有效减少无效探求和与用户交互的次数,尤其适合于文法较复杂、例句集信息量较大的情况。这些启发规则同时也适用于对上下文无关文法的其它推断方法。  相似文献   

2.
在分析正规式、正规文法和上下文无关文法的基础上,着重讨论上下文无关文法中涉及到的一些重要的文法,例如二义文法、递归文法、LL(1)文法、LR(0)文法和SLR(1)文法,并以二义文法为主线,分析二义文法和递归文法、LL(1)文法、LR(0)文法和SLR(1)文法的关系,找出一些判定文法有无二义性的充分条件。  相似文献   

3.
一个上下文无关文法获取过程的设计和实现*   总被引:3,自引:1,他引:3  
张瑞岭 《软件学报》1998,9(8):601-605
文章介绍一个基于复用的上下文无关文法获取过程的设计和实现,该过程用于获取以上下文无关文法表示的概念.它从待获取概念的有限实例和句型以及可能复用的已知概念出发,通过一个交互式文法推断过程,最终得到概念的文法定义.  相似文献   

4.
逐步求精法获取上下文无关文法   总被引:3,自引:0,他引:3  
文法推断研究如何从语言的有限实例,通过归纳推断获取语言的文法定义。文中提出一个基于逐步求精的上下文无关文法推断方法,以尝试将文法推断用于替代或帮助传统手工的文法构造工作。文中的推断方法以Angluinh的交互式学习模型为框架,以逐步求精和复用为主要策略,具有增量式获取结构自然的文法的特点。  相似文献   

5.
岳小婷 《福建电脑》2011,27(10):204-206
本文将案例法引入了《编译原理》课程的教学,发挥案例法的优势,以二义文法为主线,探讨了二义文法和递归文法、LL(1)文法、LR(0)文法和SLR(1)文法的关系,找出了一些判定文法有无二义性的充分条件,同时研究了解决二义性的方法,加深了学生对二义文法的理解。  相似文献   

6.
陈冬火 《福建电脑》2014,(12):160-162
形式化文法是编译理论及程序语言理论重要的研究内容之一,同时也是编译原理课程本科教学中的基础内容。掌握系统化形式化文法分析方法是学生学习编译原理基础理论,自动及非自动构造各种编译器的重要基础。通过递归,各种类型复杂度的程序语言都可以用文法简洁地进行描述。递归既是一种静态的结构,同时也是一种动态的计算方法。提出基于递归的形式化文法分析方法,重点包括基于递归的语言定义及基于递归的文法语言计算。  相似文献   

7.
引入了格值下推自动机、格值上下文无关文法及它们的语言的概念,证明了格值下推自动机以两种不同方式接受的语言类的等价性,研究了格值Chomsky范式文法、格值上下文无关文法及其派生所产生的语言的等价条件,揭示了在一定条件下,格值下推自动机接受的语言类与格值上下文无关文法产生的语言类的等价性,证明了有理格值语言均被格值下推自动机识别。  相似文献   

8.
文法推断研究的历史和现状   总被引:5,自引:0,他引:5  
张瑞岭 《软件学报》1999,10(8):850-860
文法推断属于形式语言的归纳学习问题,它研究如何从语言的有限信息出发,通过归纳推断得到语言的语法定义.文章综述文法推断研究的历史和现状.首先阐述文法推断的理论模型,接着罗列上下文无关文法类及其非平凡子类、隐马尔可夫模型以及随机上下文无关文法的推断方法,最后简介文法推断的应用,并展望其发展趋势.  相似文献   

9.
郑黎晓  许智武  陈海明 《软件学报》2011,22(11):2564-2576
提出一种上下文无关文法的句子生成算法.对于给定文法,算法生成一个满足该文法分支覆盖准则的句子集.结合长度控制、冗余消除和句子集规模控制等策略,使得生成的句子较短、无冗余、句子集规模较小.考察了算法在基于文法的软件系统的测试数据生成方面的应用情况.实验结果表明,该算法生成的测试数据具有较强的程序揭错能力,并且能够帮助测试人员提高测试速度.  相似文献   

10.
用实时间回馈(RTRL)算法和实编码基因遗传(RCGA)算法训练二阶递归神经网络进行模糊文法推导,表现出了精度高的良好性能,但速度较慢。然而作为目前最快的递归神经网络算法Levenberg-Marquardt(LMBP)算法在模糊文法推导中的应用却很少引起学者们的关注。通过实验对 LMBP算法在正则模糊文法推导中的优势与缺陷等性能进行分析,实验显示了LMBP算法在模糊文法推导中的快速收敛能力。  相似文献   

11.
正则文法是研究自动机的重要工具。引入取值于赋值幺半群的加权正则文法、加权类正则文法的定义,讨论了赋值幺半群上加权正则文法、加权类正则文法和加权有限自动机(WFA)的关系。证明了在赋值幺半群上,已知一个加权正则文法或加权类正则文法,分别存在一个WFA与之等价。定义了可分配的赋值幺半群,证明了在可分配的赋值幺半群上已知一个WFA,存在一个加权正则文法和加权类正则文法与之等价,即证明了可分配的赋值幺半群上加权正则文法、加权类正则文法和WFA在生成语言上等价,并举例说明了赋值幺半群的可分配性不是已知WFA存在与之等价的加权正则文法或加权类正则文法的必要条件。  相似文献   

12.
In this paper we provide an implementation strategy to map a functional specification of an utterance into a syntactically well-formed sentence. We do this by integrating the functional and the syntactic perspectives on language, which we take to be exemplified by systemic grammars and tree adjoining grammars (TAGs) respectively. From systemic grammars we borrow the use of networks of choices to classify the set of possible constructions. The choices expressed in an input are mapped by our generator to a syntactic structure as defined by a TAG. We argue that the TAG structures can be appropriate structural units of realization in an implementation of a generator based on systemic grammar and also that a systemic grammar provides an effective means of deciding between various syntactic possibilities expressed in a TAG grammar. We have developed a generation strategy which takes advantage of what both paradigms offer to generation, without compromising either.  相似文献   

13.
一种特殊的上下文无关文法及其语法分析   总被引:4,自引:0,他引:4  
张瑞岭 《软件学报》1998,9(12):904-910
SAQ系统是一个进行软件规约获取、检验和复用的实验系统,其中以上下文无关文法表示的概念是规约的一部分.SAQ要求将概念的词法和句法定义结合在一个上下文无关文法中.如果用常规的上下文无关文法描述诸如程序设计语言和自然语言等一些复杂概念的语法,则需要把诸如空格和回车等没有实质意义的分隔符包含到语法中去(这种描述方法称为朴素表示法),使得语法描述很累赘.为此,作者设计了一种特殊的上下文无关文法,它把通常上下文无关文法定义中的非终极符集合和终极符集合进行细化.用这种文法可以相对简洁地描述程序语言和自然语言等复杂概  相似文献   

14.
XML模式的扩展研究   总被引:1,自引:0,他引:1  
XML是目前已被广泛采用的WWW上信息交换和表示的技术之一,被称为Internet时代的通用数据格式。首先针对现有的XML语法进行了抽象及封闭性分析,得到了扩展XML语法,然后开发了一个分析器,对由此扩展语法生成的对象进行分析,实验表明,扩展后的XML语法具有较W3C规范的XML语法有更一般的表现力。  相似文献   

15.
LR(k)文法能描述所有确定型上下文无关语言,广泛应用于各类分析器生成器中.传统的LR(k)文法断点调试方法仅支持在产生式右部末尾设置断点(后文简称尾部断点),不支持在产生式右部中间位置设置断点(后文简称中间断点),这给分析器的开发和调试带来了不便.文中提出了一种新颖的LR(k)文法断点调试方法,不但支持传统的尾部断点,还支持中间断点.该方法可显著增加可利用的断点数量,可以跟踪到更细粒度的文法成分,从而帮助用户更好地进行文法调试,降低分析器的开发难度.  相似文献   

16.
基于属性文法和语义网络的综合知识表示模型   总被引:4,自引:1,他引:3  
本文提出了一个属性文法计算模型与语义网络表示模型相结合的综合知识表示模型.根据形式化的语义网络表示模型和属性文法的特点,该模型使用属性文法的符号建立了一些适合于语义网络表示模型的语法和语义规则模式,并且可通过扩充的属性文法的解释器来实现推理.  相似文献   

17.
In this paper we describe a sound, but not complete, analysis to prove the termination of higher-order attribute grammar evaluation caused by the creation of an unbounded number of (finite) trees as local tree-valued attributes, which are then themselves decorated with attributes. The analysis extracts a set of term-rewriting rules from the grammar that model creation of new syntax trees during the evaluation of higher-order attributes. If this term rewriting system terminates, then only a finite number of trees will be created during attribute grammar evaluation. The analysis places an ordering on nonterminals to handle the cases in which higher-order inherited attributes are used to ensure that a finite number of trees are created using such attributes. When paired with the traditional completeness and circularity analyses for attribute grammars and the assumption that each attribute equation defines a terminating computation, this analysis can be used to show that attribute grammar evaluation will terminate normally. This analysis can be applied to a wide range of common attribute grammar idioms and has been used to show that evaluation of our specification of Java 1.4 terminates. We also describe a modular version of the analysis that is performed on independently developed language extension grammars and the host language being extended. If the extensions individually pass the modular analysis then their composition is also guaranteed to terminate.  相似文献   

18.
A graph grammar programming style for recognition of music notation   总被引:1,自引:0,他引:1  
Graph grammars are a promising tool for solving picture processing problems. However, the application of graph grammars to diagram recognition has been limited to rather simple analysis of local symbol configurations. This paper introduces the Build-Weed-Incorporate programming style for graph grammars and shows its application in determining the meaning of complex diagrams, where the interaction among physically distant symbols is semantically important. Diagram recognition can be divided into two stages: symbol recognition and high-level recognition. Symbol recognition has been studied extensively in the literature. In this work we assume the existence of a symbol recognizer and use a graph grammar to assemble the diagram's information content from the symbols and their spatial relationships. The Build-Weed-Incorporate approach is demonstrated by a detailed discussion of a graph grammar for high-level recognition of music notation. See Appendix A for an illustration of the terms for musical symbols used in this paper.  相似文献   

19.
This paper deals with the concepts of a matrix form and strict interpretation. By a matrix form we mean a context-free matrix grammar. Via an interpretation mechanism it generates a family of structurally related grammars and these generate a family of languages. We study here the properties of matrix forms as generators for the families of regular, linear and context-free languages. It is for instance shown that an arbitrary matrix form with only one nonterminal symbol does not generate the family of context-free languages if it contains a matrix with at least two productions.  相似文献   

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

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

京公网安备 11010802026262号