首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 540 毫秒
1.
本文提出了一个所谓的关系-属性-程序文法,用它作为知识表示模型。该文法具有各种知识表示方法的优点,能有效地表示上下文环境、专有知识和控制信息,可以描述产生式系统、语义网络、框架等使用最多的知识表示方法,并将上述知识表示方法统一起来,阐明了该文法表示知识所具有的能力。  相似文献   

2.
根据文献[2]中提出了的基于属性文法和语义网络的综合知识表示模型MAS,本文提出了关于实现该MAS推理机制的基本算法,并且通过实例对该算法进行了说明,最后,证明了基于MAS模板的属性文法是L-AG和IMAS的解是完全的结论。  相似文献   

3.
王珏  戴汝为 《自动化学报》1986,12(4):399-346
本文提出了一种语义网络.它是以模式识别中的语义句法方法[1,2]为基础,结合专家系 统研究中发展的专家工具网络(ETN)1],2]而形成的. 网络的基本单元是知识块(Course),每个知识块由上下文无关的属性文法描述.为了描 述整个网络,对属性文法作了如下的扩展:(1)将导出树的节点标号、"支"标号理解为可加以 描述的概念;(2)在属性文法中引入控制策略.这种网络结构不仅可用在模式识别的"模式描 述"中,而且可用于人工智能的知识表达.  相似文献   

4.
网络通信协议的属性文法规格说明   总被引:4,自引:0,他引:4  
房鼎益 《软件学报》1998,9(4):296-300
本文给出一个基于属性文法的网络通信协议的形式说明与自动生成的模型.首先引入了一个扩展的属性文法描述工具,讨论了用其描述协议的并行、同步、延时(时序)等特性的有关问题;然后研究了基于属性文法的网络通信协议自动生成环境及其核心算法——属性计算(即语义分析)算法.  相似文献   

5.
戴汝为 《自动化学报》1987,13(5):321-329
本文从模式的语义、句法描述着眼,分析了一个属性文法的产生式变元间的几种关系,把 这些关系作为语义部分的内容,从而推广了属性文法,以推广后的属性文法为基础,引入控制 连接图作为主要的限制条件,提出一种"语义程序文法",并把标准模式与畸变模式之间的联系 用限制条件描述.最后利用变元间的关系,把模式的描述与知识的表达联系起来.  相似文献   

6.
属性文法作为一种描述程序设计语言语义的工具在交互式环境中有着广泛的应用。相当多的一部分交互式环境是基于属性计值实现的。然而,传统的属性文法具有很大的局限性,它要引进大量的复制规则链,导致了很严重的时间和空间效率问题。为此,我们将属性文法扩充到非局部属性文法,它在程序的语义树中引进了非局部依赖关系,避免了通过复制规则链传递语义信息时所造成的时空效率问题。但是由于非局部依赖关系是动态的,从而使得属性的增量计值更加困难。本文描述了非局部依赖关系的表示方法,并针对程序开发过程中程序语义树中非局部依赖关系的维护问题提出了解决方法。最后,根据作者开发交互式环境的经验,讨论了非局部依赖关系的维护方法在环境中实现时的改进。  相似文献   

7.
传统词嵌入通常将词项的不同上下文编码至同一参数空间,造成词向量未能有效辨别多义词的语义;CNN网络极易关注文本局部特征而忽略文本时序语义,BiGRU网络善于学习文本时序整体语义,造成关键局部特征提取不足.针对上述问题,提出一种基于词性特征的CNN_BiGRU文本分类模型.引入词性特征构建具有词性属性的词性向量;将词性向量与词向量交叉组合形成增强词向量,以改善文本表示;采用CNN网络获取增强词向量的局部表示,利用BiGRU网络捕获增强词向量的全局上下文表示;融合两模型学习的表示形成深度语义特征;将该深度语义特征连接至Softmax分类器完成分类预测.实验结果表明,该模型提高了分类准确率,具有良好的文本语义建模和识别能力.  相似文献   

8.
一、引言属性文法被普遍用作为基于语言的环境中增量语义分析的基础。传统属性文法中,属性是局部的,即语义等式仅能引用相同产生式实例中属性的值。对于以属性文法为基础的增量语义分析,属性的局部性无法有效地传递语义树中符号定义点和引用点之间的语义信息。换言之,为了把符号的定义信息传送到引用点上,定义信息必须逐结点地经过许多中介属性;一个符号的定义和删  相似文献   

9.
本文详细讨论了有关属性文法的基本概念,属性文法的两种分类方法,两种分类之间的关系及属性文法的判定问题。本文还讨论了如何用属性文法定义编译程序的遍体制说明及与指称语义的关系。最后讨论了属性文法在编译程序中的应用与属性计算器的程序处理。  相似文献   

10.
一个基于属性文法的用户界面规格说明   总被引:1,自引:1,他引:0  
华庆一 《计算机学报》1996,19(5):351-357
本文描述一种基于属性文法并结合事件模型的用户界面规格说明方法。主要强调如何在直接操作式用户界面中表示多线性对话模型。这种属性文法的规格说明可以用一个嵌套在支持通信、同步、和对话执行的运行时结构中的属性文法解释器来实现。  相似文献   

11.
Context-free hypergraph grammars and attribute grammars generate the same class of term languages. Extending the context-free hypergraph grammar with a context-free grammar and a semantic domain, a syntax-directed translation device is obtained that is equivalent to the attribute grammar.  相似文献   

12.
This paper investigates some methods for proving the equivalence of different language specifications that are given in terms of attribute grammars. Different specifications of the same language may be used for different purposes, such as language definition, program verification, or language implementation. The concept of syntactic coverings is extended to the semantic part of attribute grammars. Given two attribute grammars, the paper discusses several propositions that give sufficient conditions for one attribute grammar to be semantically covered by the other one. These tools are used for a comparison of two attribute grammars that specify syntax and semantics of mixed-type expressions. This example shows a trade-off between the complexity of syntactic and semantic specifications. Another example discussed is the equivalence of different attribute grammars for the translation of the while-statement, as used in compilers for top-down and bottom-up syntax analysis.This work was in part supported by the National Research Council of Canada.  相似文献   

13.
Summary An attribute grammar is one-visit if the attributes can be evaluated by walking through the derivation tree in such a way that each subtree is visited at most once. One-visit (1V) attribute grammars are compared with one-pass left-to-right (L) attribute grammars and with attribute grammars having only one synthesized attribute (1S).Every 1S attribute grammar can be made one-visit. One-visit attribute grammars are simply permutations of L attribute grammars; thus the classes of output sets of 1V and L attribute grammars coincide, and similarly for 1S and L-1S attribute grammars. In case all attribute values are trees, the translation realized by a 1V attribute grammar is the composition of the translation realized by a 1S attribute grammar with a deterministic top-down tree transduction, and vice versa; thus, using a result of Duske e.a., the class of output languages of 1V (or L) attribute grammars is the image of the class of IO macro tree languages under all deterministic top-down tree transductions.  相似文献   

14.
We propose a family of static evaluators for subclasses of the well-defined (i.e., noncircular) attribute grammars. These evaluators augment the evaluator for the absolutely noncircular attribute grammars with look-ahead behaviors. Because this family covers exactly the set of all well-defined attribute grammars, well-defined attribute grammars may be classified into a hierarchy, called the NC hierarchy, according to their evaluators in the family. The location of a noncircular attribute grammar in the NC hierarchy is an intrinsic property of the grammar. The NC hierarchy confirms a result of Riis and Skyum (1981), which says that all well-defined attribute grammars allow a (static) pure multivisit evaluator by actually constructing such an evaluator. We also show that, for any finite m, an NC(m) attribute grammar can be transformed to an equivalent NC(0) grammar  相似文献   

15.
16.
Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes on demand. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented and functional programming language. The result is a small, lightweight attribute grammar library that is part of our larger Kiama language processing library. Kiama’s attribute grammar library supports a range of advanced features including cached, uncached, higher order, parameterised and circular attributes. Forwarding is available to modularise higher order attributes and decorators abstract away from the details of attribute value propagation. Kiama also implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations, traits and mixins for composition and implicit parameters for forwarding. A benchmarking exercise shows that our approach is practical for realistic language processing.  相似文献   

17.
Attribute grammars (AG) allow the addition of context-sensitive properties into context free grammars, augmenting their expressional capabilities by using syntactic and semantic notations, making them in this way a really useful tool for a considerable number of applications. AGs have extensively been utilized in applications such as artificial intelligence, structural pattern recognition, compiler construction and even text editing. Obviously, the performance of an attribute evaluation system resides in the efficiency of the syntactic and semantic subsystems. In this paper, a hardware architecture for an attribute evaluation system is presented, which is based on an efficient combinatorial implementation of Earley's parallel parsing algorithm for the syntax part of the attribute grammar. The semantic part is managed by a special purpose module that traverses the parse tree and evaluates the attributes based on a proposed stack-based approach. The entire system is described in Verilog HDL (hardware design language), in a template form that given the specification of an arbitrary attribute grammar, the HDL synthesizable source code of the system is produced on the fly by a proposed automated tool. The generated code has been simulated for validation, synthesized and tested on an Xilinx FPGA (field programmable gate arrays) board for various AGs. Our method increases the performance up to three orders of magnitude compared to previous approaches, depending on the implementation, the size of the grammar and the input string length. This makes it particularly appealing for applications where attribute evaluation is a crucial aspect, like in real-time and embedded systems. Specifically, a natural language interface is presented, based on a question-answering application from the area of airline flights.  相似文献   

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

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

京公网安备 11010802026262号