共查询到20条相似文献,搜索用时 93 毫秒
1.
COOZ(complete object-oriented Z)的优势在于精确描述大型程序的规约.COOZ本身的结构 不支持精化演算,这限制了COOZ的应用能力,使COOZ难以作为完整的方法应用于软件的开发. 将精化演算引入COOZ,弥补了COOZ在设计和实现阶段的不足,同时也消除了规约与实现之间在 结构和表示方法上的完全分离,使程序开发在一个完整的框架下平滑进行.该文提出了基于CO OZ和精化演算的软件开发模型,通过实例讨论了数据精化和操作精化问题.在精化演算实现技 术方面构造了一种数据精化算子,提出一 相似文献
2.
为UML建模元素提供坚实的形式化语义基础是目前的研究热点之一,在这方面也有了不少探索。文章在过去的研究的基础上,给出了UML模型到COOZ规约的一种系统的转化方法。将UML模型转换到COOZ规约后,UML模型的推理验证就可以通过相应COOZ规约的推理验证实现。该方法不但为UML提供了精确的形式化语义基础,而且,提供了一种UML模型推理的合理的机制。 相似文献
3.
用C++中的子类型实现软件再用之探讨 总被引:4,自引:0,他引:4
本文讨论了 C++中通过公有继承实现的子类型关系。 阐述了通过对类型子类型化提高了程序的灵活性和软件的重用率,并结合例子说明了子类型化在程序设计中的应用。 相似文献
4.
Object-Z是形式规格说明语言Z的面向对象扩充,具有面向对象特点,适合描述大型面向对象软件规格说明.行为子类型继承是一种子类型继承,子类型对象拥有其超类对象的行为与属性,如果行为子类型对象替代其超类型对象时,运行时不会出错,经过验证过的形式规格说明不必再验证.本文对Object-Z定义了行为子类型继承,尤其我们系统地提出一个实现行为子类型继承和对规格说明产生相关证明责任的方法,其中这些证明责任可以判定形式规格说明是否按照其行为子类型方法进行开发的.最后,充分利用定理证明器Z/EVES来分析与验证所产生的证明责任. 相似文献
5.
运算构造和检验系统FC(function constructor)是形式规约获取系统SAQ(specification acquisition)的一个子系统.在SAQ系统中,运算用于表示规约的语义.FC提供了对运算的交互式归纳定义方式和运算的施用,支持运算的联立递归定义.详细介绍FC的功能、结构和实现技术,并讨论了下一步的改进方向. 相似文献
6.
通过分析B方法和软件体系结构描述语言ABC/ADL各自的特点,提出了一种两者结合的形式化方法。该方法利用B方法扩充的事件机制,定义软件体系结构描述语言的构件和连接子观察模型、行为规约和约束规约,并给出了规约实例,从而使得基于B方法的ABC/ADL能够形式化描述软件体系结构的结构和行为。 相似文献
7.
8.
Z的面向对象扩充COOZ的设计 总被引:11,自引:0,他引:11
为了使Z规格说明与面向对象开发方法相结合,本文在Z中扩充了对象类型和模块描述机制,使之成为面向对象的形式化规格说明语言COOZ(completeobject-orientedZ).内容包括COOZ的设计思想、语法定义及说明、形式化语义、实例以及与相关研究工作的比较. 相似文献
9.
DOL: 一个演绎对象库语言 总被引:2,自引:0,他引:2
演绎对象数据库是对象数据模型和演绎数据库集合的产物.它集成演绎数据库的查询能力和对象数据库的强大建模能力.DOL(deductive object base language)是作者设计的一种演绎对象库语言,它支持类、类层次、继承、集合、部分集、方法及重载和否定.文章着重研究继承、重载和复杂结构化值的交互关系.定义了压缩操作子和重载操作子.基于这两个操作子,定义了与经典逻辑程序类似的直接后承操作子,并研究其不定点性质. 相似文献
10.
行为继承是面向对象领域的重要概念,UML是面向对象设计中重要的建模语言。本文以一种抽象状态机为模型,给出了UML行为继承关系的形式化定义,同时证明了该定义的合理性。文章最后说明了该行为继承定义方法在UML中的具体实现。所讨论的行为继承与Harel,Sourrioulle等人的定义相比,具有更精确的含义。 相似文献
11.
如果不考虑继承性,并发性与对象技术的结合是很自然的.继承反常(又称继承异常)现象是继承性和并发性不相容的主要原因之一.现阶段人们对继承反常现象的认识有许多模糊之处,出发点不尽相同,形式化的工作也很少.对不同的subtyping关系考虑其特有的渐增式继承方法有利于把握继承反常现象的实质,也丰富了"在并发面向对象语言中应将inheritance层次和subtyping层次区别对待"这一认识的内涵.在阐述基本观点之后,采用范畴论的术语对相关的概念和定义做了形式化工作.一些观点和结论适用于区分和解释相关工作的出发点和贡献,并对并发面向对象技术中继承性的建模问题有所启示. 相似文献
12.
13.
Johan Dovland Einar Broch Johnsen Olaf Owe Martin Steffen 《Science of Computer Programming》2011,76(10):915-941
Object-orientation supports code reuse and incremental programming. Multiple inheritance increases the possibilities for code reuse, but complicates the binding of method calls and thereby program analysis. Behavioral subtyping allows program analysis under an open world assumption; i.e., under the assumption that class hierarchies are extensible. However, method redefinition is severely restricted by behavioral subtyping, and multiple inheritance may lead to conflicting restrictions from independently designed superclasses. This paper presents a more liberal approach to incremental reasoning for multiple inheritance under an open world assumption. The approach, based on lazy behavioral subtyping, is well-suited for multiple inheritance, as it incrementally imposes context-dependent behavioral constraints on new subclasses. We first present the approach for a simple language and show how incremental reasoning can be combined with flexible code reuse. Then this language is extended with a hierarchy of interface types which is independent of the class hierarchy. In this setting, flexible code reuse can be combined with modular reasoning about external calls in the sense that each class is analyzed only once. We formalize the approach as a calculus and show soundness for both languages. 相似文献
14.
文中主要介绍面向对象逻辑语言LKO中基于声明和推理的有序类型系统,在谓词声明中,类型由有序的构子构造而成,子句中变量类型由类型推理决定,对象类型由方法声明决定,独立于便于代码复用,它可作为基类型参与项类型构造。 相似文献
15.
《Theoretical computer science》2005,343(3):413-442
This paper describes a proof outline logic that covers most typical object-oriented language constructs in the presence of inheritance and subtyping. The logic is based on a weakest precondition calculus for assignments and object allocation which takes field shadowing into account. Dynamically bound method calls are tackled with a variant of Hoare's rule of adaptation that deals with the dynamic allocation of objects in object-oriented programs. The logic is based on an assertion language that is closely tailored to the abstraction level of the programming language. 相似文献
16.
17.
《Information and Computation》2002,172(1):2-28
We describe an object calculus allowing object extension and structural subtyping. Each object has a “dictionary” to mediate the connection between names and components. This extra indirection yields the first object calculus combining both object extension and full width subtyping in a type-safe manner. If class inheritance is modeled with object extension, private fields and methods can be achieved directly by scoping restrictions: private fields or methods are those hidden by subsumption. We prove that the type system is sound, discuss a variant allowing covariant self types, and give some examples of the expressiveness of the calculus. 相似文献
18.
Late binding and subtyping create run‐time overhead for object‐oriented languages, especially in the context of both multiple inheritance and dynamic loading, for instance for JAVA interfaces. In a previous article, we proposed a novel approach based on perfect hashing and truly constant‐time hashtables for implementing subtype testing and method invocation in a dynamic loading setting. In this first study, we based our efficiency assessment on Driesen's abstract computational model for the time aspect, and on large‐scale benchmarks for the space aspect. The conclusions were that the technique was promising but required further research in order to assess its scalability. This article presents some new results on perfect class hashing that enhance its interest. We propose and test both new hashing functions and an inverse problem that amounts to selecting the best class identifiers in order to minimize the overall hashtable size. This optimizing approach is proven to be optimal for single‐inheritance hierarchies. Experiments within an extended testbed with random class loading and under cautious assumptions about what should be a sensible class‐loading order show that perfect class hashing scales up gracefully, especially on JAVA ‐like multiple‐subtyping hierarchies. Furthermore, perfect class hashing is implemented in the PRM compiler testbed, and compared here with the coloring technique, which amounts to maintaining the single‐inheritance implementation in multiple inheritance. The overall conclusion is that the approach is efficient from both time and space standpoints with the bit‐wise and hashing function. In contrast, the poor time efficiency of modulus hashing function on most processors is confirmed. Copyright © 2010 John Wiley & Sons, Ltd. 相似文献
19.
Roland Ducournau 《Software》2011,41(6):627-659
Late binding and subtyping create run‐time overhead for object‐oriented languages. Dynamic typing and multiple inheritance create even more overhead. Static typing and single inheritance lead to two major invariants, of reference and position, that make the implementation as efficient as possible. Coloring is a technique that preserves these invariants for dynamic typing or multiple inheritance at minimal spatial cost. Coloring has been independently proposed for method invocation under the name of selector coloring, for subtype tests under the name of pack encoding, and for attribute access and object layout. This paper reviews a number of uses of coloring for optimizing object‐oriented programming, generalizes them, and specifies several variations, such as bidirectional and n‐directional coloring. Coloring is NP‐hard, hence compilers that use it depend on heuristics. The paper describes two families of heuristics and presents some experimental results which indicate that coloring is both efficient and tractable and that bidirectional coloring gives the best results. Copyright © 2010 John Wiley & Sons, Ltd. 相似文献
20.
Krzysztof R. Apt Frank S. de Boer Ernst-Rüdiger Olderog Stijn de Gouw 《Journal of Computer and System Sciences》2012,78(3):823-852
We show that verification of object-oriented programs by means of the assertional method can be achieved in a simple way by exploiting a syntax-directed transformation from object-oriented programs to recursive programs. This transformation suggests natural proofs rules and its correctness helps us to establish soundness and relative completeness of the proposed proof system. One of the difficulties is how to properly deal in the assertion language with the instance variables and aliasing. The discussed programming language supports arrays, instance variables, failures and recursive methods with parameters. We also explain how the transformational approach can be extended to deal with other features of object-oriented programming, like classes, inheritance, subtyping and dynamic binding. 相似文献