The need for multimethods is preeminent in the domain of object-oriented programming. However, multimethods are far from universally acknowledged. Commonly used languages - C++, Java & C# - are single dispatching ...
详细信息
The need for multimethods is preeminent in the domain of object-oriented programming. However, multimethods are far from universally acknowledged. Commonly used languages - C++, Java & C# - are single dispatching languages. In this paper, we demonstrate the alternatives for multimethods in such languages. The techniques discussed, in this paper, include double dispatching (a well known technique), technique of message dispatching using RTTI (explored in detail by us in this paper), and reflection (a feature provided by some compilers). We implement these techniques for C++, Java and C# languages and discuss issues associated with encapsulating multimethods in single dispatch languages. We also compare techniques in terms of their efficiency, ease of (re)use and type safety.
The non-executable language T belongs to the class of open languages initially defined in [Sunik 1,2]. Open languages are artificial human languages with the grammar of OO programming languages. Similar to a natural l...
详细信息
The non-executable language T belongs to the class of open languages initially defined in [Sunik 1,2]. Open languages are artificial human languages with the grammar of OO programming languages. Similar to a natural language, an open language is not confined to any particular representation domain and may be applied in any tasks requiring explicit informing. T can be used for producing OO specifications of various entities representing software, hardware, technical appliances, biology systems, knowledge representation systems, etc. It also allows explicit representation of semantics of programming languages and produces executable code compliant with the semantics represented.
Combinatorial methods bring about enormous data not only in size but also in dimension. To handle multi-dimensional data easily, the concept of a virtual container for combinatorially acquired data is demonstrated whi...
详细信息
Combinatorial methods bring about enormous data not only in size but also in dimension. To handle multi-dimensional data easily, the concept of a virtual container for combinatorially acquired data is demonstrated which is called 'virtual sample library' (VSL). VSL stores the data hierarchically in the order of (1) coordinates in the sample library, (2) names of the measurements performed and (3) data obtained from each measurement. Thus, the stored data are accessed intuitively just by tracing this tree-like structure and are provided for Visualization and sharing with others. This framework is constructed with the aid of an object-oriented scripting language which is good at abstracting complicated data structure. In this paper, after summarizing the problems of handling data acquired from combinatorially integrated samples and the availability of software tools to solve them, the concept of VSL is proposed and its structure and functions are demonstrated on the basis of one set of specific experimental data. Its extensibility as a platform for numerical simulation is also discussed.
A new object-oriented C + + library (SolidEOS) for calculating the thermoelastic properties of solids is presented. The implementation is based on the Mie-Gruneisen-Debye equation of state (EOS) augmented by lowest or...
详细信息
A new object-oriented C + + library (SolidEOS) for calculating the thermoelastic properties of solids is presented. The implementation is based on the Mie-Gruneisen-Debye equation of state (EOS) augmented by lowest order correction for anharmonicity. Several commonly used static EOS like Birch Murnaghan and Vinet models are available. Although some widely used approximation for the Debye-Gruneisen parameter and static EOS are implemented, the final behaviour of the EOS can be easily modified by overloading predefined virtual functions. The article provides a basic physical background of the modern theory of high-pressure EOS. The detailed documentation of the class hierarchy is summarized in the appendix, which accompanies the source. Several examples of practical use are given in the appendix as well. The library is appropriate for applications in geophysics, petrology, material science or any other field where thermodynamic and elastic properties of solids are relevant. The source code is available from the Computers & Geoscience software archive. (c) 2005 Elsevier Ltd. All rights reserved.
Understanding source code is an important task in the maintenance of software systems. Legacy systems are not only limited to procedural languages, but are also written in object-oriented languages. In such a context,...
详细信息
Understanding source code is an important task in the maintenance of software systems. Legacy systems are not only limited to procedural languages, but are also written in object-oriented languages. In such a context, understanding classes is a key activity as they are the cornerstone of the object-oriented paradigm and the primary abstraction from which applications are built. Such an understanding is however difficult to obtain because of reasons such as the presence of late binding and inheritance. A first level of class understanding consists of the understanding of its overall structure, the control flow among its methods, and the accesses on its attributes. We propose a novel visualization of classes called class blueprint that is based on a semantically enriched visualization of the internal structure of classes. This visualization allows a software engineer to build a first mental model of a class that he validates via opportunistic code-reading. Furthermore, we have identified visual patterns that represent recurrent situations and as such convey additional information to the viewer. The contributions of this article are the class blueprint, a novel visualization of the internal structure of classes, the identification of visual patterns, and the definition of a vocabulary based on these visual patterns. We have performed several case studies of which one is presented in depth, and validated the usefulness of the approach in a controlled experiment.
Multimedia is an art form that uses computers as a means of personal expression. However, much multimedia content is unattractive, and many applications have poor user interfaces because many developers don't have...
详细信息
Multimedia is an art form that uses computers as a means of personal expression. However, much multimedia content is unattractive, and many applications have poor user interfaces because many developers don't have training in both programming and content creation. To counteract this, we teach students QuickTime for Java, which provides a rich library for manipulating media. Our students reported an increased understanding of multimedia programming and developed creative skills.
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 la...
详细信息
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 (C) 2004 John Wiley Sons, Ltd.
Of all merits of the object-oriented paradigm, flexibility is probably the most important in a world of constantly changing requirements and the most striking difference compared to previous approaches. However, it is...
详细信息
Of all merits of the object-oriented paradigm, flexibility is probably the most important in a world of constantly changing requirements and the most striking difference compared to previous approaches. However, it is rather difficult to quantify this aspect of quality: This paper describes a probabilistic approach to estimate the change proneness of an object-oriented design by evaluating the probability that each class of the system will be affected when new functionality is added or when existing functionality is modified. It is obvious that when a system exhibits a large sensitivity to changes, the corresponding design quality is questionable. The extracted probabilities of change can be used to assist maintenance and to observe the evolution of stability through successive generations and identify a possible "saturation" level beyond which any attempt to improve the design without major refactoring is impossible. The proposed model has been evaluated on two multiversion open source projects. The process has been fully automated by a Java program, while statistical analysis has proved improved correlation between the extracted probabilities and actual changes in each of the classes in comparison to a prediction model that relies simply on past data.
Micro patterns are similar to design patterns, except that micro patterns stand at a lower. closer to the implementation, level of abstraction. Micro patterns are also unique in that they are mechanically recognizable...
详细信息
Micro patterns are similar to design patterns, except that micro patterns stand at a lower. closer to the implementation, level of abstraction. Micro patterns are also unique in that they are mechanically recognizable, since each such pattern can be expressed as a formal condition on the structure of a class. This paper presents a catalog of 27 micro-patterns defined on JAVA classes and interfaces. The catalog captures a wide spectrum of common programming practices, including a particular and (intentionally restricted) use of inheritance, immutability I data management and wrapping, restricted creation, and emulation of procedural-, modular-, and even functional- programming paradigms with objectoriented constructs. Together, the patterns present a set of prototypes after which a large portion Of all JAVA classes and interfaces are modeled. We provide empirical indication that this portion is as high as 75%. A statistical analysis of occurrences of micro patterns in a large software corpus, spanning some 70,000 JAVA classes drawn from a rich set of application domains, shows, with high confidence level that the use of these patterns is not random. These results indicate consciousness and discernible design decisions, which are sustained in the software evolution. With high confidence level, we can also show that the use of these patterns is tied to the specification, or the purpose, that the software realizes. The traceability, abundance and the statistical significance of micro pattern occurrence raise the hope of using the classification of software into these patterns for a more founded appreciation of its design and code quality.
Component-based software development (CBD) is based on building software systems from previously-existing software components. In CBD, reuse of common parts in component form can reduce the development cost of new sys...
详细信息
Component-based software development (CBD) is based on building software systems from previously-existing software components. In CBD, reuse of common parts in component form can reduce the development cost of new systems, and reduce the maintenance cost associated with the support of these systems. However, existing programs have usually been built using another paradigm, such as the object-oriented (00) paradigm. 00 programs cannot be reused rapidly or effectively in the CBD paradigm even if they contain reusable functions. In this paper, we propose a technique for extracting components from existing 00 programs by our new refactoring "Extract Component". Our technique of refactoring can identify and extract reusable components composed of classes from 00 programs, and modify the surrounding parts of extracted components in original programs. We have developed a system that performs our refactoring automatically and extracts Java-Beans components from Java programs. As a result of evaluation experiments, it is found that our system is useful for extracting reusable components along with usage examples from Java programs. (c) 2004 Elsevier B.V. All rights reserved.
暂无评论