首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 125 毫秒
1.
Monad作为构造纯函数式语言的工具,能构造出诸如错误处理、状态、I/O等非纯函数式语言的特征.本文通过组合状态转换Monad和异常处理Monad来定义纯函数式LazyI/O操作,既保持了纯函数式语言的特征,又融入了非纯函数式语言的特征.  相似文献   

2.
Monad作为构造纯函数式语言的工具,能构造出诸如错误处理、状态、IO等非纯函数式语言的特征。该文通过组合状态转换Monad和异常处理Monad来定义纯函数式语言通道系统操作,给出了通道系统操作的操作语义。  相似文献   

3.
吕江花  金成植 《软件学报》2003,14(12):1989-1995
Monad程序的核心是一组Monad定义.Monad定义分为MAP型和BIND型.如果在Monad库中已有所需要的Monad定义型,则可以直接使用,而不需要重新构造;否则,需要重新构造.但如果在Monad程序设计环境中增加从一类Monad构造另一类Monad的自动生成器,那么既方便了用户也扩充了1倍原有的Monad库.鉴于这种思想,用支持Monad程序设计的高阶函数语言Haskell实现了一个Monad的自动生成系统.另外,用户构造Monad不仅要花费较多的时间,而且写出的Monad多态函数往往不满足Monad所需满足的几条公理,因此,从这方面也可以看出,从一种类型的Monad自动产生另一种类型的Monad的重要意义.  相似文献   

4.
介绍一种多输入多输出单边逻辑函数补集算法,该算法通过对多输入多输出逻辑函数的分离,形成多输入单输出的分支逻辑函数,对多输入单输出分支逻辑函数求出其特征矩阵和状态矢量,根据特征矩阵的特性进行最小列覆盖的选取形成多输入单输出分支逻辑函数补集覆盖的特征矩阵、状态矢量和补集矩阵,最后对多输入单输出分支逻辑函数的补集矩阵进行合并形成多输入多输出逻辑函数的补集,通过测试结果表明性能良好.  相似文献   

5.
针对具有输入饱和和输出受限的纯反馈非线性系统,设计了神经网络自适应控制器.首先利用隐函数定理和中值定理将非仿射形式的纯反馈非线性系统转换成有显式输入的非线性系统,基于李雅普诺夫第二方法以及反推法并采用障碍型李雅普诺夫函数进行控制器的设计,最后通过稳定性分析证明了闭环控制系统是半全局一致最终有界的,利用仿真例子验证了控制...  相似文献   

6.
有限自动机〈X,S,Z,F,G〉的一种有效实现方法   总被引:1,自引:0,他引:1  
1.概述 有限自动机又称时序机是用来描述存储量有限的离散数字系统的抽象数学模型,它包括五个部分: 1)有限的输入符号集合X; 2)有限的内部状态集合S; 3)有限的输出符号集合Z; 4)从S×X到S的下一个状态函数  相似文献   

7.
单边多值逻辑函数是逻辑函数的一种特例,对于超大变量的逻辑函数优化,存储开销对输入变量呈2幂次方增长.针对多输入多输出单边逻辑函数的特性,通过引入特征矩阵和状态矢量的描述,求解多输出单边逻辑函数补集,以积项扩展为基础,完成多输出单边逻辑函数无冗余覆盖.通过编程实现了多输入多输出单边函数逻辑优化的算法,对影响单边函数逻辑优化效率的因素进行了分析,软件系统在奔腾1.8GHz,512MB RAM的计算机上通过了正确性验证与测试,测试结果表明性能良好,有效降低了系统的存储空间和时间开销.在相同输出变量数、积项数和无关项因子的情况下,随输入变量数的增长,优化效率随之下降;在相同输入变量数、输出变量数和积项数的情况下,随无关项因子值的增长,优化效率随之下降;在相同输入变量数、输出变量数、和无关项因子的情况下,随积项数的增长优化效率随之提高.  相似文献   

8.
研究多输入多输出非线性切换系统在任意切换律下的二次镇定问题.当非线性切换系统有一致规范型,且一致规范型的零动态在任意切换律是渐近稳定时,设计出状态反馈控制律,并构造出所有闭环子系统的共同二次Lyapunov函数,实现了这类多输入多输出非线性切换系统在任意切换策略下的二次可镇定性,所得结果也适用于线性切换系统。  相似文献   

9.
根据单边逻辑函数的特性,介绍了一种多输入多输出单边逻辑函数补集方法,该方法采用二进制特征矩阵B(F)和状态矢量R(F)来描述原函数,进行最小列覆盖的选择形成多输出补集函数的控制矩阵,由控制矩阵与补集函数的状态矢量形成单边单输出补集合逻辑函数,通过多输出逻辑函数分解与合并最终产生多输出单边逻辑函数的补集。我们设计的多输入多输出单边逻辑函数补集算法软件,在P-1.8GHz、512MBRAM的计算机上完成测试和运行,并通过测试检验程序,保证输出结果在逻辑上与输入条件求补等价。  相似文献   

10.
基于Sugeno型神经模糊系统的交通流状态预测算法   总被引:1,自引:1,他引:0  
傅惠  许伦辉  胡刚  王勇 《控制理论与应用》2010,27(12):1637-1640
从交通流状态的模糊特性出发,设计基于Sugeno型神经模糊系统的交通流状态预测算法.选择交通流状态的影响指标作为模糊推理系统的输入、交通流状态作为输出;据经验对输入、输出划分模糊子集,给出相应的隶属度函数并制定模糊规则;建立具有5层结构的神经模糊推理系统,利用神经网络优化调整模糊推理系统的隶属度函数和模糊规则.仿真实验表明,神经网络可直接优化模糊推理系统的隶属度函数,通过对连接权值的训练间接优化模糊规则,故Sugeno型神经模糊系统相比常规模糊系统具有更好的交通流状态预测性能.  相似文献   

11.
State in Haskell     
Some algorithms make critical internal use of updatable state, even though their external specification is purely functional. Based on earlier work on monads, we present a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a non-strict, purely-functional language. The security of the encapsulation is assured by the type system, using parametricity. The same framework is also used to handle input/output operations (state changes on the external world) and calls to C.  相似文献   

12.
State in Haskell     
Some algorithms make critical internal use of updatable state, even though their external specification is purely functional. Based on earlier work on monads, we present a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a non-strict, purely-functional language. The security of the encapsulation is assured by the type system, using parametricity. The same framework is also used to handle input/output operations (state changes on the external world) and calls to C.  相似文献   

13.
14.
基于Z规格说明的软件测试用例自动生成   总被引:16,自引:1,他引:16  
提出了一种基于Z规格说明的软件测试用例自动生成方法,通过对软件Z规格说明的分析,找出描述软件输入、输出约束的线性谓词,经过经性谓词转换,线性谓词到线性不等式组的转换,找出区域边界顶点和边界附近的测试点等过程自动生成测试用例。同时还介绍了基于Z规格说明的软件测试用例自动生成方法的实例,并通过一个实例进一步加以说明。  相似文献   

15.
从软件需求定义到形式功能堆约的自动转换是需求工程的重要问题之一。文中以软件需求定义语言NDRDL和形式功能规给语言Z为基础,探讨了基间的自动转换技术,特别是从NDRDL需求定义自动获取Z形式规约中状态空间与操作定义的技术。  相似文献   

16.
一种从Z规约到并行程序的精化方法   总被引:3,自引:0,他引:3  
万剑怡  孙永强  薛锦云 《软件学报》2002,13(11):2106-2111
提出了一种通过对设计模式进行精化,从Z规约开发并行程序的方法.该方法对Z语言进行了并行扩充,从Z功能规约出发,通过使用扩展的设计模式逐步精化得到并行的设计规约,再通过保持语义的转换,得到可最后转换为并行代码的抽象并行程序.通过实例对这一方法进行了详细的描述.  相似文献   

17.
Object oriented techniques promote understanding of requirements leading to flexible and extendible designs. The use of formal specification techniques ensures a complete understanding of system requirements and provides sound foundations for subsequent testing and verification. This paper describes the use of the Z and Timed CSP formal specification techniques to support object modelling during real-time system development. Relationships between class attributes are specified within the corresponding Z schemas and inheritance relationships between classes are formally specified using the schema extension mechanism of Z. Z is used to specify the domain types of the attributes of classes identified during object oriented analysis and design. Z is also used to produce model based specifications of the methods within classes that are specified informally during functional analysis. Dynamic analysis identifies events, states and temporal relationships between events. Timed CSP is used to formally specify this information as well as timing information that is necessary during real-time system development.  相似文献   

18.
This paper describes a method for specification‐based class testing that incorporates test case generation, execution, and evaluation based on formal specifications. This work builds on previous achievements in the areas of specification‐based testing and class testing by integrating the two within a single framework. The initial step of the method is to generate test templates for individual operations from a specification written in the Object‐Z specification language. These test templates are combined to produce a finite state machine for the class that is used as the basis for test case execution using the ClassBench test execution framework. An oracle derived from the Object‐Z specification is used to evaluate the outputs. The method is explained using a simple example and its application to a more substantial case study is also discussed. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

19.
Z实时扩展及基于多视点的应用模式   总被引:7,自引:1,他引:7  
陈广明  陈生庆  张立臣 《计算机应用》2005,25(2):362-364,373
RT—Z是由Z和经实时扩展的通信顺序进程timed CSP集成的用以描述实时系统的规格说明语言,它将Z对状态描述的优点和timed CsP对时序关系和并发描述的优点相结合,具有强大的描述能力;而基于时序转化系统的Z扩展适合描述系统状态的转化。给出了Z实时扩展的分类原则并从讨论了其应用特点,最后在分析RT—Z的语义集成的基础上提出了Z实时扩展的多视点应用模式。  相似文献   

20.
Despite being widely known and accepted in industry, the Z formal specification language has not so far been well supported by automated verification tools, mostly because of the challenges in handling the abstraction of the language. In this paper we discuss a novel approach to building a model-checker for Z, which involves implementing a translation from Z into SAL, the input language for the Symbolic Analysis Laboratory, a toolset which includes a number of model-checkers and a simulator. The Z2SAL translation deals with a number of important issues, including: mapping unbounded, abstract specifications into bounded, finite models amenable to a BDD-based symbolic checker; converting a non-constructive and piecemeal style of functional specification into a deterministic, automaton-based style of specification; and supporting the rich set-based vocabulary of the Z mathematical toolkit. This paper discusses progress made towards implementing as complete and faithful a translation as possible, while highlighting certain assumptions, respecting certain limitations and making use of available optimisations. The translation is illustrated throughout with examples; and a complete working example is presented, together with performance data.  相似文献   

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

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