The fundamental characteristic of service oriented computing is to bind services dynamically and replace failing service automatically at runtime. The challenge is to provide techniques which can support for programmi...
详细信息
ISBN:
(纸本)9781479962396
The fundamental characteristic of service oriented computing is to bind services dynamically and replace failing service automatically at runtime. The challenge is to provide techniques which can support for programming services in an alterable way. The distinct resources that can provide the same services are logically the identical computational entities. In this perspective, a novel service oriented programming mechanism is proposed through defining a high-level abstraction which involves a generic service signature representing those various resources. The novel service oriented programming mechanism focuses on the business process logic but do not care of the concrete technical implementation of resources, so the development of service oriented applications is more convenient. And the generic services are instantiated under the control of contracts, according to the actual execution status of all candidate resources that are invoked in parallel but not the historical QoS experience. Eventually, the suitable service is bound dynamically since the selection policies are executed according to the run-time context of resources. And how to alternate services that throw exceptions is avoided elaborately. The contract-based generic mechanism divides the service-based application development into two uncorrelated parts, and the concrete implementation of resources is separated from how to provide services or consume services. We also give a case study to illustrate the feasibility of the proposed language mechanism.
Datatype-generic programming is a widely used technique to define functions that work regularly over a class of datatypes. Examples include deriving serialization of data, equality or even functoriality. The state-of-...
详细信息
Janus is a conceptual framework and C++ template library that provides a flexible and extensible collection of efficient data structures and algorithms for a broad class of data-parallel applications. In particular, f...
详细信息
Janus is a conceptual framework and C++ template library that provides a flexible and extensible collection of efficient data structures and algorithms for a broad class of data-parallel applications. In particular, finite difference methods, (adaptive) finite element methods, and data-parallel graph algorithms are supported. An outstanding advantage of providing a generic C++ framework is that it provides application-oriented abstractions that achieve high performance without relying on language extension or non-standard compiler technology. The C++ template mechanism allows to plug user-defined types into the Janus data structures and algorithms. Moreover, Janus components can easily be combined with standard software packages of this field.
The emergence of generic programming brought a revolution to programming language. On the way of developing and perfecting generic programming, we need to analyze its advantages and disadvantages, as well as the space...
详细信息
The Performance of several containers, including the generic type containers simulated by object-oriented programming in FORTRAN language and the ordinary container also written in FORTRAN language, are investigated. ...
详细信息
The Performance of several containers, including the generic type containers simulated by object-oriented programming in FORTRAN language and the ordinary container also written in FORTRAN language, are investigated. The container of highest performance and the lowest performance is the ordinary container and the generic container by object-oriented programming, respectively. In order to achieve a high-performance generic container, a preprocessor is written used to translate the generic programming codes to the ordinary codes. With preprocessing, the abstract programming and high-performance codes are implemented at the same time.
generic programming has emerged as an important technique for the development of highly reusable and efficient software libraries. In C++, generic programming is enabled by the flexibility of templates, the C++ type p...
详细信息
generic programming has emerged as an important technique for the development of highly reusable and efficient software libraries. In C++, generic programming is enabled by the flexibility of templates, the C++ type parametrization mechanism. However, the power of templates comes with a price: generic (template) libraries can be more difficult to use and develop than non-template libraries and their misuse results in notoriously confusing error messages. As currently defined in C++ 98, templates are unconstrained, and type-checking of templates is performed late in the compilation process, i.e., after the use of a template has been combined with its definition. To improve the support for generic programming in C++, we introduce concepts to express the syntactic and semantic behavior of types and to constrain the type parameters in a C++ template. Using concepts, type-checking of template definitions is separated from their uses, thereby making templates easier to use and easier to compile. These improvements are achieved without limiting the flexibility of templates or decreasing their performance-in fact their expressive power is increased. This paper describes the language extensions supporting concepts, their use in the expression of the C++ Standard Template Library, and their implementation in the ConceptGCC compiler. Concepts are candidates for inclusion in the upcoming revision of the ISO C++ standard, C++0x.
generic programming has recently emerged as a paradigm for developing highly reusable software libraries, most notably in C++. We have designed and implemented a constrained generics extension for C++ to support modul...
详细信息
generic programming has recently emerged as a paradigm for developing highly reusable software libraries, most notably in C++. We have designed and implemented a constrained generics extension for C++ to support modular type checking of generic algorithms and to address other issues associated with unconstrained generics. To be as broadly applicable as possible, generic algorithms are defined with minimal requirements on their inputs. At the same time, to achieve a high degree of efficiency, generic algorithms may have multiple implementations that exploit features of specific classes of inputs. This process of algorithm specialization relies on non-local type information and conflicts directly with the local nature of modular type checking. In this paper, we review the design and implementation of our extensions for generic programming in C++, describe the issues of algorithm specialization and modular type checking in detail, and discuss the important design tradeoffs in trying to accomplish both. We present the particular design that we chose for our implementation, with the goal of hitting the sweet spot in this interesting design space.
We describe a design pattern for writing programs that traverse data structures built from rich mutually-recursive data types. Such programs often have a great deal of "boilerplate" code that simply walks th...
详细信息
We describe a design pattern for writing programs that traverse data structures built from rich mutually-recursive data types. Such programs often have a great deal of "boilerplate" code that simply walks the structure, hiding a small amount of "real" code that constitutes the reason for the traversal. Our technique allows most of this boilerplate to be written once and for all, or even generated mechanically, leaving the programmer free to concentrate on the important part of the algorithm. These generic programs are much more adaptive when faced with data structure evolution because they contain many fewer lines of type-specific code. Our approach is simple to understand, reasonably efficient, and it handles all the data types found in conventional functional programming languages. It makes essential use of rank-2 polymorphism, an extension found in some implementations of Haskell. Further it relies on a simple type-safe cast operator.
Concepts are an essential language feature for generic programming in the large. Concepts allow for succinct expression of constraints on type parameters of generic algorithms, enable systematic organization of proble...
详细信息
Concepts are an essential language feature for generic programming in the large. Concepts allow for succinct expression of constraints on type parameters of generic algorithms, enable systematic organization of problem domain abstractions, and make generic algorithms easier to use. In this paper we present the design of a type system and semantics for concepts that is suitable for non-type-inferencing languages. Our design shares much in common with the type classes of Haskell, though our primary influence is from best practices in the C++ community, where concepts are used to document type requirements for templates in generic libraries. Concepts include a novel combination of associated types and same-type constraints that do not appear in type classes, but that are similar to nested types and type sharing in ML.
Many modern programming languages support basic generic programming, sufficient to implement type-safe polymorphic containers. Some languages have moved beyond this basic support to a broader, more powerful interpreta...
详细信息
ISBN:
(纸本)9781581137125
Many modern programming languages support basic generic programming, sufficient to implement type-safe polymorphic containers. Some languages have moved beyond this basic support to a broader, more powerful interpretation of generic programming, and their extensions have proven valuable in practice. This paper reports on a comprehensive comparison of generics in six programming languages: C++, Standard ML, Haskell, Eiffel, Java (with its proposed generics extension), and generic C. By implementing a substantial example in each of these languages, we identify eight language features that support this broader view of generic programming. We find these features are necessary to avoid awkward designs, poor maintainability, unnecessary run-time checks, and painfully verbose code. As languages increasingly support generics, it is important that language designers understand the features necessary to provide powerful generics and that their absence causes serious difficulties for programmers.
暂无评论