首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
Locales are a module system for managing theory hierarchies in a theorem prover through theory interpretation. They are available for the theorem prover Isabelle. In this paper, their semantics is defined in terms of local theories and morphisms. Locales aim at providing flexible means of extension and reuse. Theory modules (which are called locales) may be extended by definitions and theorems. Interpretation to Isabelle’s global theories and proof contexts is possible via morphisms. Even the locale hierarchy may be changed if declared relations between locales do not adequately reflect logical relations, which are implied by the locales’ specifications. By discussing their design and relating it to more commonly known structuring mechanisms of programming languages and provers, locales are made accessible to a wider audience beyond the users of Isabelle. The discussed mechanisms include ML-style functors, type classes and mixins (the latter are found in modern object-oriented languages).  相似文献   

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

3.
Graph transformations for object-oriented refinement   总被引:2,自引:0,他引:2  
An object-oriented program consists of a section of class declarations and a main method. The class declaration section represents the structure of an object-oriented program, that is the data, the classes and relations among them. The execution of the main method realizes the application by invoking methods of objects of the classes defined in the class declarations. Class declarations define the general properties of objects and how they collaborate with each other in realizing the application task programmed as the main method. Note that for one class declaration section, different main methods can be programmed for different applications, and this is an important feature of reuse in object-oriented programming. On the other hand, different class declaration sections may support the same applications, but these different class declaration sections can make significant difference with regards to understanding, reuse and maintainability of the applications. With a UML-like modeling language, the class declaration section of a program is represented as a class diagram, and the instances of the class diagram are represented by object diagrams, that form the state space of the program. In this paper, we define a class diagram and its object diagrams as directed labeled graphs, and investigate what changes in the class structure maintain the capability of providing functionalities (or services). We formalize such a structure change by the notion of structure refinement. A structure refinement is a transformation from one graph to another that preserves the capability of providing services, that is, the resulting class graph should be able to provide at least as many, and as good, services (in terms of functional refinement) as the original graph. We then develop a calculus of object-oriented refinement, as an extension to the classical theory of data refinement, in which the refinement rules are classified into four categories according to their natures and uses in object-oriented software design. The soundness of the calculus is proved and the completeness of the refinement rules of each category is established with regard to normal forms defined for object-oriented programs. These completeness results show the power of the simple refinement rules. The normal forms and the completeness results together capture the essence of polymorphism, dynamic method binding and object sharing by references in object-oriented computation.  相似文献   

4.
This paper considers a class of lattice-based algebraic structures describing the semantics of type hierarchies in an object-oriented program system. Several properties of such structures (namely, completeness, equivalent transformations, and logical reduction) are studied. The suggested methodology serves the purpose of verification and upgrading of type hierarchies; an important direction concerns automatic elimination of code redundancy.  相似文献   

5.
基于面向对象框架的软件开发方法   总被引:15,自引:1,他引:15  
何昭  李传湘  崔巍 《计算机工程》2002,28(4):5-6,142
分析了框架的特征以及它与其它的一些常用的面向对象复用技术如类库、组件、设计模式的联系,给出了基于框架的软件开发方法BFD(Based-framework Development)的开发过程。并讨论了在BFD中目前的研究重点和BFD的最新的发展趋势。  相似文献   

6.
XTraQue: traceability for product line systems   总被引:1,自引:0,他引:1  
Product line engineering has been increasingly used to support the development and deployment of software systems that share a common set of features and are developed based on the reuse of core assets. The large number and heterogeneity of documents generated during the development of product line systems may cause difficulties to identify common and variable aspects among applications, and to reuse core assets that are available under the product line. In this paper, we present a traceability approach for product line systems. Traceability has been recognised as an important task in software system development. Traceability relations can improve the quality of the product being developed and reduce development time and cost. We present a rule-based approach to support automatic generation of traceability relations between feature-based object-oriented documents. We define a traceability reference model with nine different types of traceability relations for eight types of documents. The traceability rules used in our work are classified into two groups namely (a) direct rules, which support the creation of traceability relations that do not depend on the existence of other relations, and (b) indirect rules, which require the existence of previously generated relations. The documents are represented in XML and the rules are represented in an extension of XQuery. A prototype tool called XTraQue has been implemented. This tool, together with a mobile phone product line case study, has been used to demonstrate and evaluate our work in various experiments. The results of these experiments are encouraging and comparable with other approaches that support automatic generation of traceability relations. This work has been partially supported by Dhurakijpundit University, Thailand.  相似文献   

7.
Justin O. Graver 《Software》1992,22(7):519-535
Increasing code reuse in software systems is an important way to decrease development and maintenance costs, reduce the time required to respond to new requirements, and significantly advance the feasible complexity limits for new systems. Object-oriented programming languages and environments provide fundamental support for truly reusable code through abstraction, inheritance, and polymorphism. Reusable code is a prerequisite for a significantly more powerful concept: reusable design. Frameworks of resuable design abstractions are difficult to create and typically evolve over a long period of use and refinement. Thus, it is important to understand how systems evolve and how this evolution can be directed to achieve the best results. This article illustrates some of the standard transformations, called refactorings, that occur in object-oriented systems as they evolve by describing the creation and evolution of a framework for building general-purpose string-to-object translators. It reflects our experiences with object-oriented compilers over a five year period while working on the Typed Smalltalk compiler project.  相似文献   

8.
Inheritance is a fundamental feature of the Object-Oriented (OO) paradigm. It is used to promote extensibility and reuse in OO systems. Understanding how systems evolve, and specifically, trends in the movement and re-location of classes in OO hierarchies can help us understand and predict future maintenance effort. In this paper, we explore how and where new classes were added as well as where existing classes were deleted or moved across inheritance hierarchies from multiple versions of four Java systems. We observed first, that in one of the studied systems the same set of classes was continuously moved across the inheritance hierarchy. Second, in the same system, the most frequent changes were restricted to just one sub-part of the overall system. Third, that a maximum of three levels may be a threshold when using inheritance in a system; beyond this level very little activity was observed, supporting earlier theories that, beyond three levels, complexity becomes overwhelming. We also found evidence of ‘collapsing’ hierarchies to bring classes up to shallower levels. Finally, we found that larger classes and highly coupled classes were more frequently moved than smaller and less coupled classes. Statistical evidence supported the view that larger classes and highly coupled classes were less cohesive than smaller classes and lowly coupled classes and were thus more suitable candidates for being moved (within an hierarchy).  相似文献   

9.
JDiff: A differencing technique and tool for object-oriented programs   总被引:2,自引:0,他引:2  
During software evolution, information about changes between different versions of a program is useful for a number of software engineering tasks. For example, configuration-management systems can use change information to assess possible conflicts among updates from different users. For another example, in regression testing, knowledge about which parts of a program are unchanged can help in identifying test cases that need not be rerun. For many of these tasks, a purely syntactic differencing may not provide enough information for the task to be performed effectively. This problem is especially relevant in the case of object-oriented software, for which a syntactic change can have subtle and unforeseen effects. In this paper, we present a technique for comparing object-oriented programs that identifies both differences and correspondences between two versions of a program. The technique is based on a representation that handles object-oriented features and, thus, can capture the behavior of object-oriented programs. We also present JDiff, a tool that implements the technique for Java programs. Finally, we present the results of four empirical studies, performed on many versions of two medium-sized subjects, that show the efficiency and effectiveness of the technique when used on real programs.
Mary Jean HarroldEmail:
  相似文献   

10.
UMLDiff is a heuristic algorithm for automatically detecting the changes that the logical design of an object-oriented software system has gone through, as the subject system evolved from one version to the next. UMLDiff requires as input two models of the logical design of the system, corresponding to two of its versions. It produces as output a set of change facts, reporting the differences between the two logical-design versions in terms of (a) additions, removals, moves, renamings of model elements, i.e., subsystems, packages, classes, interfaces, attributes and operations, (b) changes to their attributes, and (c) changes to the relations among these model elements. In this paper, we detail the underlying metamodel, the UMLDiff algorithm and its heuristics for establishing lexical and structural similarity. We report on our experimental evaluation of the correctness and robustness of UMLDiff through a real-world case study.  相似文献   

11.
基于复用技术的分布式Web软件开发方法的研究   总被引:4,自引:0,他引:4  
该文从软件工程的角度出发,将面向对象技术与软件复用技术相结合,针对分布式WEB软件设计中的复杂性过高提出了一种新的开发方法———主题库法。利用该方法开发的系统,不但可以使问题域能够良好地求解,而且可实现分析及设计结果、最终代码各个层面的复用,较易获取构件/构架库。文中详细描述了该方法的原理、具体实现过程及步骤。  相似文献   

12.
克隆代码研究与软件工程中的各类问题密切相关。现有的克隆代码稳定性研究主要集中于克隆代码与非克隆代码的比较以及不同克隆代码类型之间的比较,少有研究对克隆代码的稳定性与克隆群所分布的面向对象类进行相关分析。基于面向对象类的粒度进行了克隆群稳定性实证研究,设计了4项与克隆群稳定性相关的研究问题,围绕这些研究问题,将克隆群分为类内、类间和混合3组,并基于4种视角下的9个演化模式进行了克隆群稳定性的对比分析。首先,检测软件系统所有子版本中的克隆代码,识别并标注所有克隆代码片段所属的类信息;其次,基于克隆片段映射方法完成相邻版本间克隆群的演化映射和演化模式的识别与标注,并将映射和标注结果合并为克隆代码演化谱系;然后,在不同视角下,针对3组克隆群进行稳定性计算;最后,根据实验结果对比分析了3组克隆群的稳定性差异。在7款面向对象开源软件系统总共近7700个版本上进行的克隆群稳定性实验结果表明:约60%的类内克隆群的生命周期率达到50%及以上,类间克隆和混合克隆群的生命周期率达到50%及以上的占比均约为35%;类内克隆群发生变化的次数最少,类间克隆群发生合并、分枝和延迟修复演化模式的次数相对略多,混合克隆群发生片段减少、内容一致变化和不一致变化的次数最多。总体而言,类内克隆群的稳定性表现最佳,混合克隆群在演化中可能需要重点跟踪或优先重构。克隆代码稳定性分析方法及实验结论将为克隆代码的跟踪、维护以及重构等克隆管理相关软件活动提供有力的参考和支持。  相似文献   

13.
System F is a well-known typed λ-calculus with polymorphic types, which provides a basis for polymorphic programming languages. We study an extension of F, called F<: (pronounced ef-sub), that combines parametric polymorphism with subtyping. The main focus of the paper is the equational theory of F<:, which is related to PER models and the notion of parametricity. We study some categorical properties of the theory when restricted to closed terms, including interesting categorical isomorphisms. We also investigate proof-theoretical properties, such as the conservativity of typing judgments with respect to F. We demonstrate by a set of examples how a range of constructs may be encoded in F<:. These include record operations and subtyping hierarchies that are related to features of object-oriented languages.  相似文献   

14.
概念格的属性约简是知识处理的重要研究问题之一。提出了一种面向对象概念格的属性约简方法。首先介绍了求面向对象概念格中并不可约元的方法,进而给出了面向对象概念格的并不可约元的外延集与面向对象概念格的协调集和约简集之间的关系,在此基础上,给出面向对象概念格的属性特征、并不可约元的外延集、属性等价类三者间的关系,最后利用这三者间的关系给出了面向对象概念格的约简集的构造。  相似文献   

15.
Design data are assigned in geometric and non-geometric form in order to meet design requirements. These data and information must be encapsulated in a data structure that has significance for design applications in each design process phase. The main goal of this research is to find design data groups that represent each mechanical design phase, which will be called phase's design signature. In addition, current data should be an evolution of the geometric and non-geometric information of the previous design phase. In this paper, the purpose is to identify and model a set of design features that encapsulate the design data and their transformations which occurred during the mechanical design phases. This database must capture the designer's intents that can be modeled and implemented using feature-based model in the conventional CAD systems, object-oriented modeling, and Java classes.  相似文献   

16.
Software design, development and evolution commonly require programmers to model design decisions, visualize implemented programs, and detect conflicts between design and implementation. However, common design notations rarely reconcile theoretical concerns for rigor and minimality with the practical concerns for abstraction, scalability and automated verifiability. The language of Codecharts was designed to overcome these challenges by narrowing its scope to visual specifications that articulate automatically-verifiable statements about the structure and organization of object-oriented programs. The tokens in its visual vocabulary stand for the building-blocks of object-oriented design, such as inheritance class hierarchies, sets of dynamically-bound methods, and their correlations. The formalism was tailored for those pragmatic concerns which arise from modeling class libraries and design patterns, and for visualizing programs of any size at any level of abstraction. We describe design verification, a process of proving or refuting that a Java program (i.e. its native code) conforms to the Codechart specifying it. We also describe a toolkit which supports modeling and visualization with Codecharts, as well as a fully-automated design verification tool. We conclude with empirical results which suggest gains in both speed and accuracy when using Codecharts in software design, development and evolution.  相似文献   

17.
The design and implementation of a software system is often governed by a variety of coding conventions, design patterns, architectural guidelines, design rules, and other so-called structural regularities. To prevent a deterioration of the system’s source code, it is important that these regularities are verified and enforced upon evolution of the system. The Intensional Views Environment (IntensiVE), presented in this article, is a tool suite for specifying relevant structural regularities in an (object-oriented) software system and verifying them against the current and later versions of the system. At the heart of the IntensiVE tool suite are (logic) program queries and the model of intensional views and relations, through which regularities are expressed. Upon verification of these regularities in the source code of the system, IntensiVE reports the code entities (i.e. classes, methods, variables, statements, etc.) that violate these constraints. We present IntensiVE and illustrate its application to the verification of an Abstract Factory design pattern in the implementation of a software system.  相似文献   

18.
传统的Rough集理论在数据挖掘中的应用大多是通过结构化的方法来实现的,但是这种方法存在着以下不足:数据模型结构性不强、软件复用率低、可扩展性差等。为了解决这些问题,将面向对象技术引入到Rough集理论的研究中。首先,提出了一种面向对象的属性约简系统框架;其次,设计了一种属性约简的对象模型;最后,基于该框架对UCI数据进行了验证。实验结果表明,该框架能有效地对数据集进行约筒。此外,该框架结构简单、具有良好的扩展性。提出的对象模型同样适用于其它的数据挖掘系统。  相似文献   

19.
Evolving Object-Oriented Designs with Refactorings   总被引:1,自引:0,他引:1  
Refactorings are behavior-preserving program transformations that automate design evolution in object-oriented applications. Three kinds of design evolution are: schema transformations, design pattern microarchitectures, and the hot-spot-driven-approach. This research shows that all three are automatable with refactorings. A comprehensive list of refactorings for design evolution is provided and an analysis of supported schema transformations, design patterns, and hot-spot meta patterns is presented. Further, we evaluate whether refactoring technology can be transferred to the mainstream by restructuring non-trivial C++ applications. The applications that we examine were evolved manually by software engineers. We show that an equivalent evolution could be reproduced significantly faster and cheaper by applying a handful of general-purpose refactorings. In one application, over 14K lines of code were transformed automatically that otherwise would have been coded by hand. Our experiments identify benefits, limitations, and topics of further research related to the transfer of refactoring technology to a production environment.  相似文献   

20.
Object-Z是形式规格说明语言Z的面向对象扩充,基于严格的集合论与数理逻辑,具有面向对象的特点:类、对象、继承、封装与多态等。用它可以精确描述大型软件需求规格说明,且能够进行严密的逻辑推理与验证。本文主要探讨了它的多态性推理,给出了相应的推理规则与方法,可以推理出Object-Z的多态行为,并着重体现推理的重用。  相似文献   

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

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