首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 140 毫秒
1.
本文介绍了几种在软件测试中常用的基于控制流的测试充分性评价准则。这些测试充分性准则适用于用过程式语言、面向对象语言编写的程序。测试人员可用这些准则判断究竟测试了多少代码,还有多少代码未测试到。  相似文献   

2.
启发式教学在Java语言教学中的应用   总被引:2,自引:2,他引:0  
Java语言课程是一门重要的专业课程,它在计算机专业学生课程体系中起到承上启下的重要作用。教学中引入启发式教学模式,可调动学生积极参与的热情,实现学生主体性学习和教师主导性教学的有机结合,引导学生从面向过程编程过渡到面向对象编程,对提高课堂教学质量大有裨益。  相似文献   

3.
Object-oriented programming has become a widely used, important programming paradigm that is supported in many different languages. C++ has become the most widely used object-oriented language and many C++ programmers are unfamiliar with the different approaches taken by other languages in the paradigm. This paper is intended as an introduction to a broad range of ideas in object-oriented programming. Specifically, we introduce four modern programming languages that support object-oriented programming (Oberon-2, Modula-3, Sather and Self), and show how a simple application is coded in these languages. While each of these programming languages provide support for inheritance, dynamic dispatch, code reuse, and information hiding, they do so in very different ways and with varying levels of efficiency and simplicity. The use of a simple example, based on a common programming problem, facilitates our comparison. We have coded the application in all of these languages, including C++, and we compare the compile times, object code sizes, and run times of the available implementations. Implementations of all the languages compared and all of the programs we measure are available on the Internet. Ultimately, our goal is to encourage and facilitate programmers in understanding and exploring a variety of object-oriented programming languages.  相似文献   

4.
Object-oriented programming languages are noted for their ability to allow users quickly to construct large software systems. They achieve this ability by allowing the programmer to concentrate on what it is they want to do, ignoring details of how that functionality is achieved. Such characteristics should make the object-oriented style of programming attractive to casual or novice computer users, indeed one of the best known object-oriented programming languages, Smalltalk, was initially designed with just such novice users in mind. The Unix operating system is widely regarded as a good environment for doing software development. Nevertheless, its large number of often terse and cryptic commands make it difficult for novice or casual users to use. In this paper we argue that one solution is to create an object-oriented command interpreter, or shell, between the user and the underlying system. This paper reports on the construction of one such prototype shell, and the lessons we have learned from the use of this system.  相似文献   

5.
6.
支持多种并行计算模型的面向对象框架研究   总被引:1,自引:0,他引:1  
为了支持并行程序设计,几乎所有的程序设计语言均通过提供并行与同步通信机制来支持某一高级并行计算模型,如Ada语言的任务与会合机制以及Java语言的线程和同步方法.显然,这样的程序设计语言仅能支持一种高级并行计算模型.尽管单模型的途径对某些应用来说简单而有效,但由于现实世界中的问题往往较为繁杂而难以完全用单一模型来解决.文章采用面向对象的语言机制和框架技术来解决此问题.通过分析现有各种语言中高级并行计算模型的共性,提出了若干新的面向对象语言机制.以此为基础,提出了并行面向对象框架的概念,并讨论用其表达和使用  相似文献   

7.
Intelligent agent development has imposed new challenges on the necessary language support. Object-oriented languages have been proposed as an appropriate tool, although logic-oriented languages are more adequate for managing mental attitudes. Multi-paradigm languages supporting encapsulation of actions, hiding of private knowledge and flexible manipulation of knowledge are, certainly, a good alternative for programming agents. However, a unique language to support flexible and efficient development of multi-agent systems confronts with the tradeoffs imposed by expressive power, efficiency and support technology. An alternative to conciliate these tradeoffs is not to think about a single language but an incrementally compatible family of agent-oriented multi-paradigm languages. In this work we present an approach based on object-oriented framework technology for integrating object and logic paradigms in such a way that new language features can be incrementally added to the core language. This core language is based on logic modules integrated as object abstractions in the object paradigm. JavaLog is a materialization of this framework integrating Java and Prolog. This core was extended to provide multi-threading support, mobility and temporal-logic operators to Prolog. MoviLog, the mobile part of the family provides a novel mobility mechanism, reactive mobility by failure, which enables virtual Prolog databases distributed across Web sites.  相似文献   

8.
At a fundamental level, functional and object-oriented programming languages are all ‘higher-order’, in the sense that they support computing with values that are themselves pieces of program code encapsulated with a local environment. In functional languages these ‘active’ values are functions, while in object-oriented languages they are objects. Both styles of higher-order language claim to provide good support for writing adaptable programs, but functional and object-oriented languages achieve this adaptability in different ways: functional programs rely on parameterisation at the value, type and module level, while object-oriented languages rely primarily on subtyping and implementation inheritance. Here we compare these two approaches, mainly in terms of the features and properties of their type systems, and consider the benefits and disadvantages of unifying (or merging) the two paradigms by adding object-oriented features to ML as a base language. We argue that while some of the simpler aspects of object-oriented languages are compatible with ML, adding a full- edged class-based object system to ML leads to an excessively complex type system and relatively little expressive gain, especially if we aim to preserve that mostly functional style of programming that is a major advantage of ML. Received March 2002 / Accepted in revised form April 2002  相似文献   

9.
R++: adding path-based rules to C++   总被引:1,自引:0,他引:1  
Object-oriented languages and rule-based languages offer two distinct and useful programming abstractions. However, previous attempts to integrate data-driven rules into object-oriented languages have typically achieved an uneasy union at best. R++ is a new, closer integration of the rule-based and object-oriented paradigms that extends C++ with a single programming construct, the path-based rule, as a new kind of class member. Path-based rules-data-driven rules that are restricted to following pointers between objects-are like automatic methods that are triggered by changes to the objects they monitor. Path-based rules provide a useful level of abstraction that encourages a more declarative style of programming and are valuable in object-oriented designs as a means of modeling dynamic collections of interdependent objects. Unlike more traditional pattern-matching rules, path-based rules are not at odds with the object-oriented paradigm and offer performance advantages for many natural applications  相似文献   

10.
软件测试技术   总被引:2,自引:1,他引:2  
为了保证所提交的软件产品能够满足客户的需求,以及在使用中的可靠性,必须对所开发的软件产品进行系统而全面的测试。从保证软件质量的角度来说,软件测试是软件质量保证工程的一个重要组成部分,也是最重要的质量保证手段。无论是面向对象软件开发还是传统的面向过程软件开发,软件测试归根结底要通过一套比较成熟的测试技术和方法来实现。文中从错误避免、检错和容错三个方面阐述了软件测试技术,并介绍了通过测试和失败测试两种软件测试方法。  相似文献   

11.
The use of object-oriented programming to simplify the design and implementation of CAD systems is discussed. The three features common to all languages that support object-oriented programming data abstraction, inheritance, and runtime-function determination are examined. Examples are given to illustrate the advantages of object-oriented methods. How to build an embryonic CAD framework and when to use an object-oriented language are addressed. Object-oriented databases are defined  相似文献   

12.
尽管作为软件工程中面向对象的技术已逐步取代了面向过程的技术,但是测试和维护软件的费用并没有因此而减少。在面向对象软件的测试研究中,对如何减少面向对象软件的错误提出了许多方法,绝大多数人关注的是类测试而不是对面向对象规约的高级测试。该文提供了一个基于有穷自动机的测试框架来测试面向对象规约。该方法在一个可执行的有穷自动机上直接进行了测试,不用手动进行证明,并且可产生大量的状态空间。测试结果证明了该方法的有效性。  相似文献   

13.
Software developers utilize design methods that enable them to manipulate conceptual structures that correlate to programming language features. However, programming languages and the programming paradigms they embody co-evolve over time. Within industrial and academic circles, for example, object-oriented programming has evolved and effectively replaced imperative programming. More recently, many object-oriented languages have assimilated features from other programming paradigms, evolving into multiparadigm languages we refer to as ‘object-oriented plus–plus’ or OO++. This language evolution may weaken the interface between design and implementation, introducing what we call ‘design dysphasia’—a partial disability in the use of a programming language because of incongruous design methods. Software design patterns capture elements of reusable design within a specific context. When the programming languages that are part of pattern context evolve, patterns must adapt to the language change or they may reinforce design dysphasia in the practitioner. We assert that the current ‘capture/recapture’ pattern maintenance model is suboptimal for adapting patterns to language evolution and propose a new ‘capture/modify/recapture’ maintenance cycle as a more effective approach. We then suggest a concrete ‘modify’ phase for current patterns to be adapted to object-oriented based multiparadigm language trends. We present an OO++ Iterator pattern as an example throughout.  相似文献   

14.
The formalisation of object-oriented languages is essential for describing the implementation details of specific programming languages or for developing program verification techniques. However there has been relatively little formalisation work aimed at abstractly describing the fundamental concepts of object-oriented programming, separate from specific language considerations or suitability for a particular verification style. In this paper we address this issue by formalising a language that includes the core object-oriented programming language concepts of field tests and updates, methods, constructors, subclassing, multithreading, and synchronisation, built on top of standard sequential programming constructs. The abstract syntax is relatively close to the core of typical object-oriented programming languages such as Java. A novel aspect of the syntax is that objects and classes are encapsulated within a single syntactic term, including their fields and methods. Furthermore, class terms are structured according to the class hierarchy, and objects appear as subterms of their class (and method instances as subterms of the relevant object). This helps to narrow the gap between how a programmer thinks about their code and the underlying mathematical objects in the semantics. The semantics is defined operationally, so that all actions a program may take, such as testing or setting local variables and fields, or invoking methods on other objects, appear on the labels of the transitions. A process-algebraic style of interprocess communication is used for object and class interactions. A benefit of this label-based approach to the semantics is that a separation of concerns can be made when defining the rules of the different constructs, and the rules tend to be more concise. The basic rules for individual commands may be composed into more powerful rules that operate at the level of classes and objects. The traces generated by the operational semantics are used as the basis for establishing equivalence between classes.  相似文献   

15.
A significant current software engineering problem is the conceptual mismatch between the abstract concept of an association as found in modelling languages such as UML and the lower level expressive facilities available in object-oriented languages such as Java. This paper introduces some code generation patterns that aid the production of Java based implementations from UML models. The work is motivated by a project to construct model driven development tools in support of the construction of embedded systems. This involves the specification and implementation of a number of meta-models (or models of languages). Many current UML oriented tools provide code generation facilities, in particular the generation of object-oriented code from class diagrams. However, many of the more complex aspects of class diagrams, such as qualified associations are not supported. In addition, several concepts introduced in UML version 2.0 are also not supported.The aim of the work presented in this paper is to develop a number of code generation patterns that allow us to support the automatic generation of Java code from UML class diagrams that support these new and complex association concepts. These patterns significantly improve the code generation abilities of UML tools, providing a useful automation facility that bridges the gap between the concept of an association and lower level object-oriented programming languages.  相似文献   

16.
Controlled sharing of information is needed for many applications. Access-control mechanisms exist in operating systems to provide such controlled sharing. However, programming languages currently do not support such a facility. This paper illustrates how an access-control facility could be incorporated in a programming language. The mechanism described is suitable for incorporation in object-oriented languages that permit the definition of abstract data types, and is defmed in a way that enables compile-time checking of access control.  相似文献   

17.
On complementary principles of object-oriented constraint programming   总被引:1,自引:0,他引:1  
The paper is devoted to the implementation of the paradigm of the object-oriented constraint programming (OOCP), which combines complementary ideas and principles of the object-oriented programming (OOP) and constraint logical programming (CLP). Although the idea looks attractive and there have been attempts to implement it with the use of logical and functional languages, its future outline is still not clear. In the paper, a survey of the existing technologies of the constraint programming is given, and a new systematic approach to the implementation of the object-oriented constraint programming based on the use of declarative data modeling languages is discussed. The advantages of the approach related to the expressiveness and generality of the constraint problem declarations are demonstrated on the example of the classical mathematical queen problem. A general algorithmic strategy of solving the constraint problems is also discussed.  相似文献   

18.
A categorical semantics of multiple inheritance is presented, in which the inheritance relations between program entities are represented as commutative diagrams in a suitable category, and multiple inheritance is then modelled with colimits of such diagrams. It is shown that the informal semantics of multiple inheritance used in existing object-oriented programming languages conforms to, or is consistent with, this model.  相似文献   

19.
Knowledge programming, which makes use of the explicit representation and interpretation of knowledge to create intelligent programs, requires specialized languages and tools to help programmers. Prolog, an implementation of a logic programing language, provides some of these tools; it and other languages have been argued to be the "best" way to do such knowledge programming. This paper raises questions which suggest that any single paradigm of programming (e.g., logic programming or object-oriented programming) benefits by being integrated in a single environment with other paradigms of programming. Integration of these paradigms with each other, and within a flexible, user-friendly computing environment is also necessary. Such an environment must provide source level debugging and monitoring facilities, analysis and performance tuning tools, and an extended set of user communication programs.  相似文献   

20.
In this article, an ongoing research project held in the Computer Science department of the University of Vigo is described. Its main objective is to develop an interactive object-oriented environment, serving as a vehicle for learning object-oriented programming. It currently consists of a virtual machine, an assembler, compilers for two high-level programming languages, and an educational visual programming environment. Its main characteristics are (a) the support of prototype-based object orientation, which is a model of object orientation that actually wraps the class-based model; (b) the support for object persistence, which simplifies all input/output issues to the minimum, and (c) the availability of a new visual programming environment is an invaluable help. We the authors think that the combination of all of these possibilities, will lead to an interesting, useful tool that would be recommended for object-oriented teaching. The whole system has been successfully employed in a number of different courses, allowing students to concentrate on objects and their relationships from the very beginning, and thus helping them to achieve a high degree of knowledge about the object-oriented programming paradigm.  相似文献   

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

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

京公网安备 11010802026262号