共查询到20条相似文献,搜索用时 125 毫秒
1.
Monad作为构造纯函数式语言的工具,能构造出诸如错误处理、状态、I/O等非纯函数式语言的特征.本文通过组合状态转换Monad和异常处理Monad来定义纯函数式LazyI/O操作,既保持了纯函数式语言的特征,又融入了非纯函数式语言的特征. 相似文献
2.
Monad作为构造纯函数式语言的工具,能构造出诸如错误处理、状态、IO等非纯函数式语言的特征。该文通过组合状态转换Monad和异常处理Monad来定义纯函数式语言通道系统操作,给出了通道系统操作的操作语义。 相似文献
3.
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
从交通流状态的模糊特性出发,设计基于Sugeno型神经模糊系统的交通流状态预测算法.选择交通流状态的影响指标作为模糊推理系统的输入、交通流状态作为输出;据经验对输入、输出划分模糊子集,给出相应的隶属度函数并制定模糊规则;建立具有5层结构的神经模糊推理系统,利用神经网络优化调整模糊推理系统的隶属度函数和模糊规则.仿真实验表明,神经网络可直接优化模糊推理系统的隶属度函数,通过对连接权值的训练间接优化模糊规则,故Sugeno型神经模糊系统相比常规模糊系统具有更好的交通流状态预测性能. 相似文献
11.
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.
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.
15.
从软件需求定义到形式功能堆约的自动转换是需求工程的重要问题之一。文中以软件需求定义语言NDRDL和形式功能规给语言Z为基础,探讨了基间的自动转换技术,特别是从NDRDL需求定义自动获取Z形式规约中状态空间与操作定义的技术。 相似文献
16.
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.
David Carrington Ian MacColl Jason McDonald Leesa Murray Paul Strooper 《Software Testing, Verification and Reliability》2000,10(2):111-137
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.
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. 相似文献