首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
提出了一种基于时间抽象状态机(timed abstract state machine,简称TASM)的AADL(architecture analysis and design language)模型验证方法.分别给出了AADL子集和TASM的抽象语法,并基于语义函数和类ML的元语言形式定义转换规则.在此基础上,基于AADL开源建模环境OSATE(open source AADL tool environment)设计并实现了AADL模型验证与分析工具AADL2TASM,并基于航天器导航、制导与控制系统(guidance,navigation and control)进行了实例性验证.  相似文献   

2.
随着C++语言标准的不断演进,词法语法解析工具如JavaCC等对于很多扩充的新特性以及复杂的语法结构不能做到完全支持,这可能会导致抽象语法树生成错误且不完整;针对这一问题,提出一个针对抽象语法树生成错误的处理框架;首先,通过对JavaCC的扩充,实现一套可以解析C++语言的词法语法分析器,生成抽象语法树并记录报错行;其次,根据报错行寻找所在函数区间即不支持或不匹配的语法片段;最后,通过注释函数区间的方式来跳过不支持或不匹配的语法片段进行错误处理并迭代生成抽象语法树;实验结果表明,对抽象语法树生成进行错误处理后可以更全面的分析代码,抽象语法树完成率上升37.8%,分析行数提高3.9倍。  相似文献   

3.
Nominal abstract syntax, as pioneered by the 'FreshML' series of metalanguages, provides first-order tools for the representation and manipulation of syntax involving bound names, binding operations and α-equivalence. Fresh O'Caml fuses nominal abstract syntax with the full Objective Caml language to yield a functional programming language with powerful facilities for representing and manipulating syntax. In this paper, we first provide an examples-driven overview of the language and its functionality. Then we proceed to comment on some of the difficult issues involved in implementing nominal abstract syntax and explain how they have been addressed in the latest version of the compiler.  相似文献   

4.
This paper introduces a variant of nominal abstract syntax in which bindable names are represented by normal meta-variables as opposed to a separate class of globally fresh names. Distinct meta-variables can be instantiated with the same concrete name, which we call aliasing. The possible aliasing patterns are controlled by explicit constraints on the distinctness (freshness) of names. This approach has already been used in the nominal meta-programming language ??ML. We recap that language and develop a theory of contextual equivalence for it. The central result of the paper is that abstract syntax trees (ASTs) involving binders can be encoded into ??ML in such a way that ??-equivalence of ASTs corresponds with contextual equivalence of their encodings. This is novel because the encoding does not rely on the existence of globally fresh names and fresh name generation, which are fundamental to the correctness of the pre-existing encoding of abstract syntax into FreshML.  相似文献   

5.
随着实时嵌入式系统的功能越来越复杂,现有的软硬件分离、软硬件协调等实时系统设计方法已经无法满足其系统实现的要求.本文根据模型驱动开发架构MDA和模型集成开发MIC的核心思想,将时间语义结合服务体/执行流(Servant/Exe-Flow Model,简称SEFM)模型,提出了一种基于模型驱动的实时系统设计方法.首先,本文给出了SEFM模型的元模型表达系统的抽象语义,同时使用XML语言和框图语言来描述SEFM模型的具体语法.结合XML解析技术,根据同一抽象语法的不同具体语法能够相互转化,实现了框图语言的代码生成,最后以实时跟车系统设计方案表明该系统实现方法的可行性和正确性.  相似文献   

6.
符号执行技术在软件测试和程序验证中发挥着重要作用。如何抽象和处理程序中各种数据类型和语法成分是符号执行必须解决的问题。本文提出抽象符号表的概念,以及基于抽象符号表建模内存的方法。抽象符号表记录可寻址对象的名称、类型、抽象地址和符号值,是一种简单、精确的内存抽象机制。内存模型是所有使用符号执行的技术的前提,本文系统给出了一个面向符号执行的内存模型。基于抽象符号表的内存模型能够统一处理各种数据类型和语法成分,包括函数和类,能够直接处理指针别名问题,不需要额外的别名分析算法。经过一些性能优化处理,基于抽象符号表的内存模型具有较好的性能。  相似文献   

7.
SLAN-4 (``Software Language-4') was developed to meet the need for a formal tool for specifying and designing large software systems. It provides language constructs for algebraic and axiomatic specifications and also pseudocode constructs for the design step. A major design goal was to ease subsequent refinements of a (given) specification. The design can start with a very informal specification, which can be implemented later using lower level concepts. This paper gives an overview of the SLAN-4 syntax and semantics. It concentrates on the most important aspects of: ? abstract data types, ? algebraic specification of abstract data types, and ? axiomatic specification of modules. Because the pseudocode part of SLAN-4 consists mainly of control structures similar to those in modern high-level programming languages, this element of the language is not separately described. The paper includes an example of how to use SLAN-4, and also the experiences gained in using the language to formally specify a real-world software product of about 18 000 lines of code written in an IBM internal high-level language.  相似文献   

8.
面向方面软件体系结构描述语言AspectualACME虽引入了切点指示器PCD(Pointcut Designator)的语法成分,但仍未给出其语义的形式化描述。针对这一问题,基于AspectualACME语言抽象语法树,设计了一阶逻辑语言LIAPCD(Logic Language forPCD)。在此基础上提出了AspectualACME语言PCD的形式化描述方法。该方法能精确定义软件体系结构层PCD的语义,可为形式化分析软件体系结构层方面编织提供支持。  相似文献   

9.
动态模糊问题是普遍存在的,但是现存的程序设计语言中适合解决动态模糊问题的极少,本文试图作这方面的研究,设计一种适合解决动态模糊性问题的程序设计语言.本文仿照监督命令的程序结构,给出动态模糊逻辑程序设计语言的一个抽象模型,其内容包括:动态模糊逻辑程序设计语言的抽象语法、动态模糊语义.  相似文献   

10.
管笑笑  葛宁  阮方 《微计算机信息》2006,22(34):248-250
介绍一种应用于数字系统设计中的基于函数式语言的代码解析方案,主要包括该函数式语言和解析工具的介绍,该语言的词法与语法分析程序的结构介绍,由语法树到语法规则到抽象语法树的生成过程,以及具体的应用实例。该解析方案已经成功应用于数字系统的设计中。  相似文献   

11.
黄晓伟  范贵生  虞慧群  杨星光 《计算机工程》2021,47(12):230-235,248
在实际软件项目开发过程中,软件缺陷预测能辅助测试人员找到项目中可能存在缺陷的位置,并通过抽象语法树(AST)获取项目模块中隐藏的结构和语义信息,此类信息有助于提高缺陷预测精度。提出基于重子节点抽象语法树的缺陷预测方法,在提取节点信息时保留节点的类型信息和对应代码语义的值信息,并使用特殊字符串代替没有值信息的节点。通过树链剖分思想将AST分割为重子节点和轻子节点,优先选择重子节点作为序列化向量中的节点,同时利用深度学习网络学习节点序列中的源代码结构和语言实现软件缺陷预测。实验结果表明,与DFS方法相比,该方法在基于注意力机制的循环神经网络深度学习模型上的F1值和AUC值平均提升约3%和4%,具有更好的缺陷预测效果。  相似文献   

12.
软件体系结构层切点指示器是在软件体系结构层次上实现量化机制和描述方面编织的基础。一些面向方面软件体系结构的描述语言虽然引入了切点指示器(Pointcut Designator)的语法成分,但仍未给出其语义的形式化描述,因而难以精确刻画软件体系结构层方面的注入位置。针对这一问题,基于面向方面软件体系结构描述语言AC2-ADL的抽象语法树形式,设计了一种一阶逻辑语言LL4PCD(Logic Language for PCD)。在此基础上,提出AC2-ADL语言PCD的形式化描述方法。该方法能精确定义软件体系结构层PCD的语义,可为形式化分析软件体系结构层方面编织提供支持。  相似文献   

13.
Domain specific languages (DSLs) are increasingly used today. Coping with complex language definitions, evolving them in a structured way, and ensuring their error freeness are the main challenges of DSL design and implementation. The use of modular language definitions and composition operators are therefore inevitable in the independent development of language components. In this article, we discuss these arising issues by describing a framework for the compositional development of textual DSLs and their supporting tools. We use a redundance-free definition of a readable concrete syntax and a comprehensible abstract syntax as both representations significantly overlap in their structure. For enhancing the usability of the abstract syntax, we added concepts like associations and inheritance to a grammar-based definition in order to build up arbitrary graphs (as known from metamodeling). Two modularity concepts, grammar inheritance and embedding, are discussed. They permit compositional language definition and thus simplify the extension of languages based on already existing ones. We demonstrate that compositional engineering of new languages is a useful concept when project-individual DSLs with appropriate tool support are defined.  相似文献   

14.
The abstract (or semantic) syntax of the Pascal language is identified, and a linear representation for the trees so formed within the framework of the concrete syntax for that language is imposed. The indentation scheme so formed, augmented with a small number of pragmatic considerations, is compared with several previously proposed formatting schemes for Pascal and an example of the use of this new method is given.  相似文献   

15.
The design of procedural and object-oriented programming languages is considered with respect to how easily programs written in those languages can be formally manipulated. Current procedural languages such as Pascal, Modula-2 and Ada; generally support such program manipulations, except for some annoying anomalies and special cases. Three main areas of language design are identified as being of concern from a manipulation viewpoint: the interface between concrete and abstract syntax; the relationship between the abstract syntax and static semantics naming, scoping and typing; and the ability to express basic transformations (folding and unfolding). Design principles are suggested so that the problems identified for current languages can be avoided in the future  相似文献   

16.
An approach to software design representation which is consistent with the concept of engineering blueprints is presented. The main criteria for software engineering blueprints are defined and a network scheme of graphical representation is considered through an overview of Petri net techniques. The concept of an abstract process (AP) is introduced as the basic element of system representation. An abstract process network schema of software design representation is developed and supported by an algebraic system of notation. Methods of AP-net construction are presented and illustrated by examples. The advantages of using the proposed approach in different phases of software engineering are pointed out and the main directions for further research have been identified.  相似文献   

17.
Smalltalk—80是原型的面向对象程序设计语言和环境,其中所体现的面向对象方法学已广泛应用于计算机科学的各个领域。我们已经完成除进程之外的所有Smalltalk成份的指称语义描述。作为系列文章的首篇,本文简要介绍Smalltalk的基本概念,并给出其完整的抽象文法,从而为准确地理解Smalltalk,正确地描述其形式语义奠定良好的基础。  相似文献   

18.
Named graphs     
The Semantic Web consists of many RDF graphs nameable by URIs. This paper extends the syntax and semantics of RDF to cover such named graphs. This enables RDF statements that describe graphs, which is beneficial in many Semantic Web application areas. Named graphs are given an abstract syntax, a formal semantics, an XML syntax, and a syntax based on N3. SPARQL is a query language applicable to named graphs. A specific application area discussed in detail is that of describing provenance information. This paper provides a formally defined framework suited to being a foundation for the Semantic Web trust layer.  相似文献   

19.
在软件同源性检测方法中,基于抽象语法树的比对方法能够有效地检测出基于代码全文拷贝、修改变量名、调整代码顺序等的抄袭手段,被广泛用于抄袭检测工具中。但基于抽象语法树的比对方法对于修改变量类型和添加无意义变量的抄袭手段束手无策。针对这种情况,提出了一种基于抽象语法树的改进思想,该思想通过剪去语法树中影响判断的叶子节点的手段来还原检测原文抄袭,能够达到有效检测修改变量类型和添加无意义变量等抄袭的目的。  相似文献   

20.
研究的目标:为Ada并发软件的设计提供一种图形化的方法和支撑工具,以便用图形表达并发软件的设计,并生成并发程序的框架(并发程序单元的划分和它们之间的通信)。这样做的好处在于提高软件的生产率,改善软件质量。在提出用于并发软件理解的会合次序图的基础上,给出了并发设计语言CONDL的语法、语义描述和图形化表示(泳道),并简单介绍了所研制的一个工具CONDLAS(生成Ada代码框架)。  相似文献   

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

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