this paper presents a new solution to the expression problem (EP) that works in OO languages with simple generics (including Java or C#). A key novelty of this solution is that advanced typing features, including F-bo...
详细信息
ISBN:
(纸本)9783642310577;9783642310560
this paper presents a new solution to the expression problem (EP) that works in OO languages with simple generics (including Java or C#). A key novelty of this solution is that advanced typing features, including F-bounded quantification, wildcards and variance annotations, are not needed. the solution is based on object algebras, which are an abstraction closely related to algebraic datatypes and Church encodings. object algebras also have much in common withthe traditional forms of the Visitor pattern, but without many of its drawbacks: they are extensible, remove the need for accept methods, and do not compromise encapsulation. We show applications of object algebras that go beyond toy examples usually presented in solutions for the expression problem. In the paper we develop an increasingly more complex set of features for a mini-imperative language, and we discuss a real-world application of object algebras in an implementation of remote batches. We believe that object algebras bring extensibility to the masses: object algebras work in mainstream OO languages, and they significantly reduce the conceptual overhead by using only features that are used by everyday programmers.
As software evolves, data types have to be extended, possibly with new data variants or new operations. object-oriented design is well-known to support data extensions well. In fact, most popular books showcase data e...
详细信息
Relationships capture the interplay between classes in object-oriented programs, and various extensions of object-orientedprogramming languages allow the programmer to explicitly express relationships. this paper dis...
详细信息
ISBN:
(纸本)9783642226557;9783642226540
Relationships capture the interplay between classes in object-oriented programs, and various extensions of object-orientedprogramming languages allow the programmer to explicitly express relationships. this paper discusses how relationships facilitate the verification of multi-object invariants. We develop a visible states verification technique for Rumer, a relationship-based programming language, and demonstrate our technique on the Composite pattern. the verification technique leverages the "Matryoshka Principle" embodied in the Rumer language: relationships impose a stratification of classes and relationships (with corresponding restrictions on writes to fields, the expression of invariants, and method invocations). the Matryoshka Principle guarantees the absence of transitive call-backs and restores a visible states semantics for multi-object invariants. As a consequence, the modular verification of multi-object invariants is possible.
As software evolves, so does the interaction between its components. But how can we check if components are updated consistently? By abstracting object usage into temporal properties, we can learn evolution patterns t...
详细信息
ISBN:
(纸本)9783642226557;9783642226540
As software evolves, so does the interaction between its components. But how can we check if components are updated consistently? By abstracting object usage into temporal properties, we can learn evolution patterns that express how object usage evolves over time. Software can then be checked against these patterns, revealing code that is in need of update: "Your check for isValidWidget() is now superseded by checkWidget()." In an evaluation of seven different versions of three open source projects, our LAMARCK tool was able to detect existing code issues with a precision of 33%-64% and to prevent such issues with a precision of 90%-100%.
While object diagrams (ODs) are widely used as a means to document object-oriented systems, they are expressively weak, as they are limited to describe specific possible snapshots of the system at hand. In this paper ...
详细信息
ISBN:
(纸本)9783642226557;9783642226540
While object diagrams (ODs) are widely used as a means to document object-oriented systems, they are expressively weak, as they are limited to describe specific possible snapshots of the system at hand. In this paper we introduce modal object diagrams (MODs), which extend the classical OD language with positive/negative and example/invariant modalities. the extended language allows the designer to specify not only positive example models but also negative examples, ones that the system should not allow, positive invariants, ones that all system's snapshots should include, and negative invariants, ones that no system snapshot is allowed to include. Moreover, as a primary application of the extended language we provide a formal verification technique that decides whether a given class diagram satisfies (i.e., models) a multi-modal object diagrams specification. In case of a negative answer, the technique outputs relevant counterexample object models, as applicable. the verification is based on a reduction to Alloy. the ideas are implemented in a prototype Eclipse plug-in. Examples show the usefulness of the extended language in specifying structural requirements of object-oriented systems in an intuitive yet expressive way.
An active area of research in computer science is the prevention of violations of object protocols, i.e., restrictions on temporal orderings of method calls on an object. However, little is understood about object pro...
详细信息
ISBN:
(纸本)9783642226557;9783642226540
An active area of research in computer science is the prevention of violations of object protocols, i.e., restrictions on temporal orderings of method calls on an object. However, little is understood about object protocols in practice. this paper describes an empirical study of object protocols in some popular open-source Java programs. In our study, we have attempted to determine how often object protocols are defined, and how often they are used, while also developing a taxonomy of similar protocols. In the open-source projects in our study, comprising almost two million lines of code, approximately 7.2% of all types defined protocols, while 13% of classes were clients of types defining protocols. (For comparison, 2.5% of the types in the Java library define type parameters using Java Generics.) this suggests that protocol checking tools are widely applicable.
the information of execution frequencies of virtual call targets is valuable for program analyses and optimizations of object-oriented programs. However, to obtain this information, most of the existing approaches rel...
详细信息
ISBN:
(纸本)9783642226557;9783642226540
the information of execution frequencies of virtual call targets is valuable for program analyses and optimizations of object-oriented programs. However, to obtain this information, most of the existing approaches rely on dynamic profiling. they usually require running the programs with representative workloads, which are often absent in practice. Additionally, some kinds of programs are very sensitive to run-time disturbance, thus are generally not suitable for dynamic profiling. therefore, a technique which can statically estimate the execution frequencies of virtual call targets will be very useful. In this paper we propose an evidence-based approach to frequency estimation of virtual call targets. By applying machine learning algorithms on the data collected from a group of selected programs, our approach builds an estimation model to capture the relations between static features and run-time program behaviors. then, for a new program, the approach estimates the relative frequency for each virtual call target by applying the model to the static features of the program. Once the model has been built, the estimation step is purely static, thus does not suffer the shortcomings of existing dynamic techniques. We have performed a number of experiments on real-world large-scale programs to evaluate our approach. the results show that our approach can estimate frequency distributions which are much more informative than the commonly used uniform distribution.
Framework as a term is very frequently used in software engineering, especially in relation to object-oriented software design and implementation. In general, a framework could be defined as an application generator f...
详细信息
Framework as a term is very frequently used in software engineering, especially in relation to object-oriented software design and implementation. In general, a framework could be defined as an application generator f...
详细信息
Framework as a term is very frequently used in software engineering, especially in relation to object-oriented software design and implementation. In general, a framework could be defined as an application generator for one particular domain, or more to the point, it represents a skeleton of an application, that includes the complete code for the basic functions of a system, which can be conformed to the needs of one specific application. In this paper, the definitions and properties of frameworks development process are presented. the second part of the paper will present guidelines for design and implementation of framework for developing desktop applications based on relationship meta-data. the framework should, on the basis of an arbitrary problem domain represented by a meta model, generate application skeleton using three-tier architecture and then implement basic CRUD database operations for the defined problem domain. Finally, conclusion summarizes all done and notes guidelines for further improvements of the implemented framework.
While object-orientedprogramming has been embraced in industry, particularly in the form of C++, Java, and Python, its acceptance by the parallel scientific programming community is for various reasons incomplete. No...
详细信息
ISBN:
(纸本)9783642020469
While object-orientedprogramming has been embraced in industry, particularly in the form of C++, Java, and Python, its acceptance by the parallel scientific programming community is for various reasons incomplete. Nonetheless, various factors practically dictate the rise of language features that provide higher level abstractions than do C or older FORTRAN standards. these include increasingly complex physics models, numerical algorithms, and hardware (e.g. deep memory hierarchies, ever-increasing numbers of processors, and the advent of multi- and manycore processors and heterogeneous architectures). Our emphases are oil identifying specific problems impeding greater acceptance and widespread use of object-orientedprogramming in scientific computing;proposed and implemented solutions to these problems;and new or novel frameworks, approaches, techniques, or idioms for parallel/high-performance object-oriented scientific computing.
暂无评论