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

2.
一个基于属性文法的分布式软件构架描述语言   总被引:2,自引:1,他引:1  
  相似文献   

3.
近年来协议工程支撑环境的研究得到了迅速的发展,正逐渐趋于工程化,规范化、形式化、属性文法是描述程序设计语言语义特性的工具,本文介绍了采用属性文法及增量式语法分析法构造ASN.1语法制导编辑环境的方法,本系统采用面向对象的语言JAVA实现。  相似文献   

4.
近年来,在增量式程序设计环境的领域中,许多工作在致力于开发各种各样的功能和特色。而在增量程序设计环境的形式化描述和自动生成方面所做的工作还很少。属性文法是用来表示程序设计语言语义的很好的工具,它已经被成功地应用于编译程序的自动生成。但当应用于增量程序设计环境时,遇到了一些特殊的困难。困难之一就是属性增量计值的效率问题。T.Reps在这方面做了一些工作,本文改进了他的工作。我们对应用于增量程序设计环境的属性文法作了一个修改,然后提出了一个针对修改后的属性文法的增量计值算法。这一算法在时间和空间上都优于Reps的算法,并且在时间上是最优的。  相似文献   

5.
目前的IDA不能支持所有处理器模型的反汇编。为此,给出一种适用于IDA处理器模块自动生成的反汇编描述语言,为IDA处理器模块插件的扩充提供支持。该描述语言采用基于上下文无关文法的属性文法表现形式,包括对处理器存储系统的声明以及对处理器指令集的语法和语义描述。应用结果表明,该方法适用于IDA处理器模块插件的扩充。  相似文献   

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

7.
孙淑玲  郑启龙 《软件学报》1996,7(Z1):199-204
本文构造的XYZ/NGAE系统是建立在属性文法基础上的前端编译程序自动生成系统.本文在概述了属性文法及其描述语言之后,简要地介绍该系统的体结构以及为减少空间开销而采用的优化措施.  相似文献   

8.
孙淑玲  郑启龙 《软件学报》1996,7(A00):199-204
本文构造的XYZ/NGAE系统是建立在属性文法基础上的前端编译程序自动生成系统。本文在概念了属性文法及其描述语言之后,简要地介绍该系统的体结构以及为减少空间开销而采用的优化措施。  相似文献   

9.
本文介绍了一个适合描述球类比赛战术特点的脚本描述语言,并把该语言作为实验题目进行实验教学,介绍了学生设计并实现的脚本描述语言编译器,该脚本描述语言的词法和文法描述定义,给出词法分析器和语法分析器的结构设计,最后介绍实现中采用的关键技术。  相似文献   

10.
软件体系结构的属性图文法描述及其约束验证*   总被引:5,自引:0,他引:5  
在前人工作的基础上,使用了一种利于约束检查和属性刻画的属性图文法,该方法形式地描述了体系结构及其演化;接着给出了一个算法检查演化动作是否会破坏体系结构约束.在对属性图文法系统AGG的图形解析器进行定制和改进的基础上,设计并实现了体系结构自动检查器.该检查器已应用于面向体系结构的服务集成开发平台Artemis-ARC系统中.  相似文献   

11.
A new approach to describing communication protocols is introduced. In the style of a formal language, the protocol is considered as the set of all legal sequences of symbols that can be exchanged by the communicating processes. Although context free grammars cannot adequately describe such sequences, it is shown that attribute grammars may be used. Examples are given which show that common protocol features such as interleaving, windowing and flow control can be described by attribute grammars.It is shown how deadlock-proneness of a protocol can be formalised as a property of its attribute grammar specification, and the undecidability of deadlock-proneness for arbitrary grammars is proved. An algorithm is given for determining whether a protocol is deadlock-prone in the decidable case.A method of automatically implementing protocols from their specifications is described. The implementation takes the form of a pair of communicating attributed pushdown automata. These are based on LR(0) parsers, with attribute evaluation being performed in parallel with the parse; attribute values are used to help direct the parse. Consideration is also given to the handling of errors.  相似文献   

12.
Attribute grammar specification languages, like many domain specific languages, offer significant advantages to their users, such as high-level declarative constructs and domain-specific analyses. Despite these advantages, attribute grammars are often not adopted to the degree that their proponents envision. One practical obstacle to their adoption is a perceived lack of both domain-specific and general purpose language features needed to address the many different aspects of a problem. Here we describe Silver, an extensible attribute grammar specification language, and show how it can be extended with general purpose features such as pattern matching and domain specific features such as collection attributes and constructs for supporting data-flow analysis of imperative programs. The result is an attribute grammar specification language with a rich set of language features. Silver is implemented in itself by a Silver attribute grammar and utilizes forwarding to implement the extensions in a cost-effective manner.  相似文献   

13.
Attribute grammar specification languages, like many domain-specific languages, offer significant advantages to their users, such as high-level declarative constructs and domain-specific analyses. Despite these advantages, attribute grammars are often not adopted to the degree that their proponents envision. One practical obstacle to their adoption is a perceived lack of both domain-specific and general purpose language features needed to address the many different aspects of a problem. Here we describe Silver, an extensible attribute grammar specification system, and show how it can be extended with general purpose features such as pattern matching and domain-specific features such as collection attributes and constructs for supporting data-flow analysis of imperative programs. The result is an attribute grammar specification language with a rich set of language features. Silver is implemented in itself by a Silver attribute grammar and utilizes forwarding to implement the extensions in a cost-effective manner.  相似文献   

14.
The RTAG (real-time asynchronous grammars) programming language is discussed. The language is based on an attribute grammar notation for specifying protocols. Its main design goals are: (1) to support concise and easily understood expression of complex real-world protocols; and (2) to serve as the basis of a portable software system for automated protocol implementation. The algorithms used in generating implementations from given specifications are sketched, and a Unix-based automated implementation system for RTAG is described  相似文献   

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

16.
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.  相似文献   

17.
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.  相似文献   

18.
提出了一种通信协议的实体描述语言CPEBSDL.CPEBSDL语言是一种描述能力很强的语言,它可以对协议实体的状态、行为及协议实体对资源的控制和访问进行形式化的描述,同以往的描述语言不同,CPEBSDL语言把协议实体之间复杂的交互行为看做是实体对协议中共同使用到的资源的控制和访问,从而简化了交互行为描述的复杂性,便于对协议进行分析和测试.给出CPEBSDL语言规则对应的上下文无关文法G(CPEBSDL),并给出了G(CPEBSDL)的乔姆斯基范式,在此基础上给出了一个判定协议行为的CPEBSDL语言描述是否合法的判定算法——CYK协议行为序列的合法性验证算法.作为一个实例,用CPEBSDL语言对ISDN数据链路层协议LAPD的链接过程进行了完整的描述,并给出了一个判定协议行为序列是否合法的例子.  相似文献   

19.
A communication protocol is a set of rules shared by two or more communicating parties on the sequence of operations and the format of messages to be exchanged. Standardization organizations define protocols in the form of recommendations (e.g., RFC) written in technical English, which requires a manual translation of the specification into the protocol implementation. This human translation is error-prone due in part to the ambiguities of natural language and in part due to the complexity of some protocols. To mitigate these problems, we divided the expression of a protocol specification into two parts. First, we designed an XML-based protocol specification language (XPSL) that allows for the high-level specification of a protocol—expressed as a Finite State Machine (FSM)—using Component-Based Software Engineering (CBSE) principles. Then, the components required by the protocol are specified in any suitable technical language (formal or informal). In addition, we developed the multi-layer Meta-Protocol framework, which allows for on-the-fly protocol discovery and negotiation, distribution of protocol specifications and components, and automatic protocol implementation in any programming language.  相似文献   

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

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