首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
We propose a new model for flexible composition of objects from a set of features. Features are services of an object and are similar to classes in object‐oriented languages. In many cases, features have to be adapted in the presence of other features, which is also called the feature interaction problem. We introduce explicit interaction handlers which can adapt features to other features by overriding methods. When features are composed, the appropriate interaction handling is added in a way which generalizes inheritance and aggregation. For a set of features, an exponential number of different feature combinations is possible, based on a quadratic number of interaction resolutions. We present the feature model as an extension of Java and give two translations to Java, one via inheritance and the other via aggregation. We show that the feature model interacts nicely with several common language extensions such as type parameters, exceptions, and higher‐order functions. Copyright © 2001 John Wiley & Sons, Ltd.  相似文献   

2.
Filtering is an emerging abstraction in object‐oriented systems. Filtering can be characterized by an ability to filter messages in transit and perform intermediate actions. Filters can be used for carrying out intermediate tasks such as encryption, load balancing, caching, security checks and add‐on computations. A few filtering approaches have been proposed earlier and some commercial implementations with specialized filtering capabilities are available. This paper discusses a model for transparent and dynamically pluggable first class filter objects for object‐oriented systems based on the Java programming language. The filter object model is based on an interclass filter relationship. The model is realized through extensions to the Java programming language. Filter objects can be injected into message paths during execution time and they are transparent to both clients and servers. The properties of filter objects enable them to be employed as a mechanism for evolution promoting reuse of existing code. A method of evolution through filter objects is discussed. A translator for Java filters (TJF) has been designed and implemented. TJF translates an extended Java program involving filter constructs into an equivalent Java code. The translation scheme is presented and the performance of the translated code is analyzed. A brief survey of existing approaches related to filtering in object‐oriented systems has also been presented. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

3.
The recent emergence of object‐relational technology into the commercial database market has caused new challenges for the implementation of conceptual database designs. This paper presents our experience with using the Oracle 8 object‐relational data model in the implementation of an engineering application described using the EXPRESS conceptual modeling language. EXPRESS is part of the engineering community's Standard for the Exchange of Product Data and can be characterized as a structurally object‐oriented modeling language, supporting the notion of entities, entity hierarchies, complex constraints on entity hierarchies, relationships and inverse relationships between entities, and user‐defined types. As a result, EXPRESS provides an excellent framework for studying the mapping of conceptual modeling concepts into an object‐relational model. In this paper, we describe the way in which the features of EXPRESS can be mapped into object‐relational features such as object tables, object references, and nested tables. We also describe the manner in which features such as member functions on object types, triggers, and stored procedures can be used to support the implementation of constraints associated with a conceptual schema. Although the mappings presented are specific to EXPRESS and Oracle 8, the mappings are generalizable to conceptual modeling languages and object‐relational models with similar features. Our work defines how traditional mapping concepts must be revised in order to make adequate use of the features now found in object‐relational models. As part of this paper, we also compare our mapping approach using Oracle 8 to mapping issues for the PostgreSQL object‐relational model and the Objectivity/DB object‐oriented data model. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

4.
Modern systems for the analysis of image‐based biomedical data, such as functional magnetic resonance imaging (fMRI), require fast computational techniques and rapid, robust development. Object‐oriented programming languages such as Java and C++ provide the foundations for the development of complex data analysis applications. This case study explores the advantages and disadvantages of using these two programming environments for scientific computation as typified in the analysis of fMRI datasets. C++ is well suited for computational and memory optimization while Java is more compliant to the object‐oriented paradigm, supports cross‐platform development and has a rich set of application programming interface (API) classes. The same data model and algorithms were implemented in C++ and Java, and a user interface was developed with the Java API. Comparisons were made with respect to computational performance and ease of development. Benchmarks show that C++ generally outperforms Java, while Java is easier to use, leading to more robust code and shorter development times. However, with the advent of newer just‐in‐time compilers, Java performance is at times comparable to C++. The latest Java virtual machine technology is closing the gap and eventually Java should be a good compromise between efficient algorithm performance and effective application development. Copyright © 2004 John Wiley & Sons, Ltd.  相似文献   

5.
基于方法调用一般化模型的并行性分析   总被引:3,自引:0,他引:3  
该文给出了一种考虑了面向对象语言的多态和对象引用别名问题的对象方法间并行性的分析方法,这种方法用于面向对象语言并行化中的并行性分析,文中首先给出了一般化的方法调用模型,然后基于该模型给出了表达式化简,过程和过程间分析的算法,该算法可以求出变量的定义和使用集合,由于并行性分析,该文给出的简单例子即可以将该文的和相关的工作加以区别。其技术已经在作者研制的Java并行化编译器JAPS-Ⅱ中实现。  相似文献   

6.
At each program point, points-to analysis for statically typed object oriented programming languages (e.g., Java, C++) determines those objects to which a reference may refer (or a pointer may point) during execution. Points-to analysis is necessary for any semantics based software tools for object oriented systems. Our new complexity results for points-to analysis distinguish the difficulty of intraprocedural and interprocedural points-to analyses for languages with combinations of single-level types (i.e., types with data members only of primitive type), exceptions with or without subtyping, and dynamic dispatch. Our results include: 1) the first polynomial-time algorithm for points-to analysis in the presence of exceptions that handles a robust subset of Java without threads and can be applied to C++; 2) proof that the above algorithm is safe, in general, and provably precise on programs with single-level types and exceptions without subtyping, but not dynamic dispatch, thus, this case is in P; 3) proof that an interprocedural points-to analysis problem with single-level types and exceptions with subtyping, but without dynamic dispatch, is PSPACE-hard, while the intraprocedural problem is PSPACE-complete. Other complexity characterizations of points-to analysis in programs without exceptions are presented, including an algorithm with worst-case bound of O(n5 ), which improves over the O(n7) worst-case bound achievable from previous approaches of T. Reps et al. (1995) and W.A. Landi and B.G. Ryder (1991)  相似文献   

7.
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.  相似文献   

8.
Luca Ferrari  Haibin Zhu 《Software》2012,42(6):707-731
Role‐based collaboration is an emerging methodology to facilitate an organizational structure, provide orderly system behavior, and consolidate system security for both human and non‐human entities, like agents, that collaborate and coordinate their activities with or within systems. Interaction management must, however, be able to handle run‐time and dynamic scenarios. Hence, every role‐based collaboration system must provide a good level of dynamism, that is, provide an agent with the capability to assume, use, and release a role depending on run‐time conditions. Dynamism, however, does not suffice in adaptative scenarios: being able to use a role dynamically is important, but in order to enhance interagent communications, the capability to perceive a played role is important too. Role perceivability is the capability of an agent to autonomously recognize the role played by another entity without the need to ask a yellow‐page directory. Whereas dynamism has been achieved with different techniques and often through language support, role perceivability is more difficult to achieve and to some extent even more important because it can boost sociality among entities and agents. In object‐oriented programming languages, such as JAVA, role perceivability could be achieved with appropriate changes to the agent/entity class structure, but this requires compile time constraints that are, in their nature, not dynamic. This paper proposes an approach to remedy the above problems: maintaining an appropriate level of dynamism. The work presented here allows a JAVA agent to make its role perceivable to other entities as if it is applied at compile time. Copyright © 2011 John Wiley & Sons, Ltd.  相似文献   

9.
Dale Parson  Zhenyu Zhu 《Software》2000,30(15):1641-1660
The JavaTM Native Interface (JNI) provides a set of mechanisms for implementing Java methods in C or C++. JNI is useful for reusing C and C++ code repositories within Java frameworks. JNI is also useful for real‐time systems, where compiled C/C++ code executes performance‐critical tasks, while Java code executes system control and feature tasks. Available JNI literature concentrates on creating Java proxy classes that allow Java clients to interact with C++ classes. Current JNI literature does not discuss Java proxies for entire C++ inheritance hierarchies; that is the topic of this paper. Our experience in reusing C++ class hierarchies within a Java framework has uncovered a set of useful techniques for constructing Java proxy class hierarchies that mirror their C++ counterparts. This report gives both high level design guidelines and specific programming idioms for constructing Java class hierarchies that serve as proxies for C++ counterparts. We begin by discussing opportunities for reuse within a proxy class hierarchy, as well as problems caused by differences between the Java and C++ approaches to inheritance. The two most significant differences are due to C++ support for invocation of a member function based on the static type of its class, and C++ support for multiple implementation inheritance. Two example C++ class hierarchies provide the basis for a set of sections that present the design guidelines and that codify the programming idioms. This work could serve as the basis for an automatic generator of Java proxy class hierarchies. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

10.
利用CORBA实现远程访问   总被引:3,自引:1,他引:2  
王磊  谢俊元 《计算机应用研究》2001,18(11):126-127,136
CORBA(Common Object Request Broker Architecture) 一种关于面向对象分布式程序开发的规范,利用这种技术设计出很稳定的Client/Server模式的应用程序,实现了不同高级语言(C++和Java)之间可以互相调用类,并可运行在不同的平台上。  相似文献   

11.
Double dispatch is the ability to dynamically select a method not only according to the run‐time type of the receiver (single dispatch), but also according to the run‐time type of the argument. This mechanism unleashes the power of dynamic binding in object‐oriented languages, so enhancing re‐usability and separation of responsibilities. However, many mainstream languages, such as, e.g., C++ and Java, do not provide it, resorting only to single dispatch. In this paper we propose an extension of C++ (also applicable to other object‐oriented languages) that enables double dispatch as a language feature. This yields dynamic overloading and covariant specialization of methods. We define a translation from the new constructs to standard C++ and we present the preprocessor implementing this translation, called doublecpp . The translated code enjoys static type safety and implements the semantics of double dispatch by using only standard mechanisms of static overloading and dynamic binding, with minimal impact on the performance of the program. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

12.
结合面向对象和函数式语言的概念   总被引:2,自引:0,他引:2  
考虑了结合面向对象和函数式程序风范的问题.与这一方向的大多数方法相比,这种结合方法有下面两个优点:首先,结合了在广泛流行的几种主语言中非常有名的一些重要概念.换言之,没有引入新的语言概念并试图以新的概念为基础解释众所周知的语言概念.其次,这种结合具有下面的性质:如果整个语言以传统方式使用则不受个别的语言概念的影响,这样,只有在使用一个语言概念的时候才需要关注它.具体地说,提出了一个具有简明操作语言的用于函数式面向对象程序设计的核心语言,它具有如上所述的性质.这个核心语言结合了Eiffel, Java, ML和Haskell语言中的下列核心语言概念:对象,类,多重继承,方法重定义,动态绑定,静态类型安全性,二元方法,代数数据类型,高阶函数,ML-多态性.  相似文献   

13.
Java RMI, Jini and CORBA provide effective mechanisms for implementing a distributed computing system. Recently many numeral libraries have been developed that take advantage of Java as an object‐oriented and portable language. The widely‐used client‐server method limits the extent to which the benefits of the object‐oriented approach can be exploited because of the difficulties arising when a remote object is the argument or return value of a remote or local method. In this paper this problem is solved by introducing a data object that stores the data structure of the remote object and related access methods. By using this data object, the client can easily instantiate a remote object, and use it as the argument or return value of either a local or remote method. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

14.
Collision detection is highly important in computer graphics and virtual reality. Most collision detection methods are object‐based, relying on testing the geometrical interference of objects, and their performance therefore depends on the geometrical complexity of the objects. Recently, image‐based methods have gained increasing acceptance for their simplicity in implementation, robustness with respect to the object geometry, and the potential to distribute the computational burden onto graphics hardware. However, all existing image‐based methods require direct calls to OpenGL, but so far there is no direct way to access OpenGL through the Java 3D API. Although Java 3D provides its own built‐in collision detection classes, they are either incorrect or inefficient. In this paper, we present a hybrid image‐based collision detection method in Java 3D, which incorporates the Java 3D built‐in collision detection and the image‐based collision detection in our specially devised scene graph. In addition, we take advantage of the fact that the 3D position of successive offscreen views (i.e. virtual views perceived by the probing object) does not change significantly and thereby reduce the occurrences of offscreen rendering, so that the collision detection becomes even faster (up to 50% in our case). Experimental results prove the correctness and efficiency of our method. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

15.
Roles and role models have received much attention as useful concepts for developing highly reusable and dynamically evolvable systems. Role models belong to the category of collaboration‐based development techniques, but most of the existing approaches to role models do not explicitly incorporate the core principle of collaboration‐based developments as an essential property of their primary design goals. Consequently, the existing approaches still suffer from a problematic phenomenon that the structural and behavioral constraints defined in a role system can be violated during the role‐binding stage. We call such a problematic phenomenon the role‐binding anomaly. In order to alleviate the role‐binding anomaly, we propose an enhanced role model, in which all role instances and core objects can exist by themselves, namely, they can be developed, executed, and tested independently. Roles and core classes can be bound to each other at the instance level. In addition, the role system describes and encapsulates the behavior for dynamic reconfigurations among role instances. The enhanced role model is designed so as to be meaningful with respect to software engineering principles, rather than dynamic evolution. It also facilitates role model implementation using general programming languages (i.e. not supporting dynamic specialization) such as Java. To illustrate how the proposed role model makes such benefits, we develop a set of Java classes necessary for implementing the enhanced role model in the form of a Java package role, and present a simplified automatic teller machine system as an example application. Copyright © 2002 John Wiley & Sons, Ltd.  相似文献   

16.
Complex graphical user interfaces (GUIs) that support a large amount of user interaction require a fast response time, a rich set of building blocks for an esthetic look‐and‐feel, and a development environment that supports ongoing change. On the World Wide Web, client‐side technologies offer more of these features than do server‐side solutions. Java and JavaScript are the two most popular languages used for client‐side GUI implementations. Java implementations require a user to download a plug‐in that contains a virtual machine to execute the Java byte‐code. The installation and maintenance of this plug‐in is sometimes an unsurmountable barrier to using Java. JavaScript lacks some of the desirable features of Java, such as easy to use object‐oriented features and having a GUI class library, but does not require a plug‐in. We have enhanced JavaScript by implementing a new language Object‐JavaScript (OJS) and by providing an OJS library of GUI components, thus making it a viable alternative to Java. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

17.
Some object oriented programming languages allow inner classes. All of them admit inheritance. This combination of inner classes and inheritance is very fruitful however less known. On the other hand it creates a serious problem: how to determine the direct superclass of a given class C, i.e. the class which class C directly inherits from. For there may be several classes of the same name in one program. A specification of the problem and a non-deterministic algorithm are provided. We prove that the algorithm is correct w.r.t. the specification and complete, i.e. if the algorithm signals an error then no solution exists. We show that the specification itself has at most one solution, in other words, it is a complete specification. This proves also that the corresponding parts of Java Language Specification are consistent and define uniquely a fragment of Java semantics.  相似文献   

18.
Task parallelism is an approach to parallel programming that has recently gained traction because of its compatibility with the predominant object‐oriented languages and its low overhead compared to threading approaches. Parallel Task is an Open Source task‐parallel compiler and runtime system for object‐oriented languages, in particular Java. It is very flexible and expressive, demonstrated by the fact that it can be directly employed to implement most parallel computing patterns. The only notable exception has been the pipeline pattern where many data items are streamed through a number of processing stages. This is not surprising, as task parallelism is generally not compatible with the pipeline pattern. In this paper, we investigate how the pipeline pattern can be elegantly and efficiently implemented in a task‐parallel environment. To do so, we extend Parallel Task with the concept of implicit futures to allow creating pipelines in an intuitive and object‐oriented manner. Our experimental evaluation uses the extended Parallel Task to implement pipelines of different lengths and characteristics and compares with manual implementations. The evaluation demonstrates very good performance and scalability of the proposed task‐parallel pipeline approach. Copyright © 2014 John Wiley & Sons, Ltd.  相似文献   

19.
In object‐oriented programming (OOP), proxies are entities that act as an intermediary between client objects and target objects. Dynamic proxies can be used to construct distributed systems that support the open implementation approach and promote code reuse. The OO paradigm supports code reuse through various ways including inheritance, polymorphism and aggregation. In this paper, we adopt a definition of software reuse restricted to reuse of code components and address the question of constructing distributed systems based on dynamic proxies. Different networking techniques and programming paradigms such as Java's Remote Method Invocation (RMI), the Common Object Request Broker Architecture (CORBA) and Java Servlets are used to implement the distributed client/server architecture. Copyright © 2004 John Wiley & Sons, Ltd.  相似文献   

20.
With the advent of object‐oriented languages and the portability of Java, the development and use of class libraries has become widespread. Effective class reuse depends on class reliability which in turn depends on thorough testing. This paper describes a class testing approach based on modeling each test case with a tuple and then generating large numbers of tuples to thoroughly cover an input space with many interesting combinations of values. The testing approach is supported by the Roast framework for the testing of Java classes. Roast provides automated tuple generation based on boundary values, unit operations that support driver standardization, and test case templates used for code generation. Roast produces thorough, compact test drivers with low development and maintenance cost. The framework and tool support are illustrated on a number of non‐trivial classes, including a graphical user interface policy manager. Quantitative results are presented to substantiate the practicality and effectiveness of the approach. Copyright © 2002 John Wiley & Sons, Ltd.  相似文献   

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

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