Smooth integration of domain-specific languages into a general purpose host language requires absorbing of domain code written in arbitrary syntax. The integration should cause minimal syntactical and semantic overhea...
详细信息
ISBN:
(纸本)9781450301541
Smooth integration of domain-specific languages into a general purpose host language requires absorbing of domain code written in arbitrary syntax. The integration should cause minimal syntactical and semantic overhead and introduce minimal dependency on external tools. In this paper we discuss a DSL integration technique for the C++ programming language. The solution is based on compile-time parsing of the DSL code. The parser generator is a C++ template metaprogram reimplementation of a runtime Haskell parser generator library. The full parsing phase is executed when the host program is compiled. The library uses only standard C++ language features, thus our solution is highly portable. As a demonstration of the power of this approach, we present a highly efficient and type-safe version of printf and the way it can be constructed using our library. Despite the well known syntactical difficulties of C++ template metaprograms, building embedded languages using our library leads to self-documenting C++ source code.
The Quadratic Assignment Problem (QAP) has important application areas, for example, facility layout (Dickey and Hopkins, 1972) and electronic component placement (Rabak and Sichman, 2003). The NP-hard problem already...
详细信息
ISBN:
(纸本)9789898425782
The Quadratic Assignment Problem (QAP) has important application areas, for example, facility layout (Dickey and Hopkins, 1972) and electronic component placement (Rabak and Sichman, 2003). The NP-hard problem already becomes difficult and time consuming to solve satisfactorily for small applications. It is therefore of interest to investigate how well standard MINLP methods can provide good solutions within a reasonable time, even though global optimality can not be guaranteed. In this study we focus on solving a subset of 50 problems in the QAP library (Burkard et al., 1997). We use a standard Mixed-Integer NonLinear programming (MINLP) formulation modelled in the General Algebraic Modeling System (GAMS) (Rosenthal, 2010). The solution quality and solution time is evaluated for the solvers AlphaECP, Bonmin, DICOPT and SBB. We compare the solvers when a 1 hour time limit per problem is used, where the solvers are started from 3 random start points, i.e. initial variable levels. Furthermore, we investigate how well the most promising solver DICOPT performs when started from 50 random start points for 22 problems for which the global optimal solution is known.
Some limitations of object-oriented mechanisms are known to cause code clones (e. g., extension using inheritance). Novel programming paradigms such as feature-oriented programming (FOP) aim at alleviating these limit...
详细信息
Some limitations of object-oriented mechanisms are known to cause code clones (e. g., extension using inheritance). Novel programming paradigms such as feature-oriented programming (FOP) aim at alleviating these limitations. However, it is an open issue whether FOP is really able to avoid code clones or whether it even facilitates (FOP-related) clones. To address this issue, we conduct an empirical analysis on ten feature-oriented software product lines with respect to code cloning. We found that there is a considerable number of clones in feature-oriented software product lines and that a large fraction of these clones is FOP-related (i.e., caused by limitations of feature-oriented mechanisms). Based on our results, we initiate a discussion on the reasons for FOP-related clones and on how to cope with them. We show by means of examples how such clones can be removed by applying refactorings.
Smooth integration of domain-specific languages into a general purpose host language requires absorbing of domain code written in arbitrary syntax. The integration should cause minimal syntactical and semantic overhea...
详细信息
Smooth integration of domain-specific languages into a general purpose host language requires absorbing of domain code written in arbitrary syntax. The integration should cause minimal syntactical and semantic overhead and introduce minimal dependency on external tools. In this paper we discuss a DSL integration technique for the C++ programming language. The solution is based on compile-time parsing of the DSL code. The parser generator is a C++ template metaprogram reimplementation of a runtime Haskell parser generator library. The full parsing phase is executed when the host program is compiled. The library uses only standard C++ language features, thus our solution is highly portable. As a demonstration of the power of this approach, we present a highly efficient and type-safe version of printf and the way it can be constructed using our library. Despite the well known syntactical difficulties of C++ template metaprograms, building embedded languages using our library leads to self-documenting C++ source code.
Manually implementing equals (for object comparisons) and hashCode (for object hashing) methods in large software projects is tedious and error-prone. This is due to many special cases, such as field shadowing, compar...
详细信息
Manually implementing equals (for object comparisons) and hashCode (for object hashing) methods in large software projects is tedious and error-prone. This is due to many special cases, such as field shadowing, comparison between different types, or cyclic object graphs. Here, we present JEqualityGen, a source code generator that automatically derives implementations of these methods. JEqualityGen proceeds in two states: it first uses source code reflection in MetaAspectJ to generate aspects that contain the method implementations, before it uses weaving on the bytecode level to insert these into the target application. JEqualityGen generates not only correct, but efficient source code that on a typical large-scale Java application exhibits a performance improvement of more than two orders of magnitude in the equality operations generated, compared to an existing system based on runtime reflection. JEqualityGen achieves this by generating runtime profiling code that collects data. This enables it to generate optimised method implementations in a second round.
Maintaining integrity and consistency, and effecting conformance in architectures of large-scale systems require specification and enforcement of many different forms of structural constraints. While type systems have...
详细信息
Maintaining integrity and consistency, and effecting conformance in architectures of large-scale systems require specification and enforcement of many different forms of structural constraints. While type systems have proved effective for enforcing structural constraints in programs and data structures, most architectural modeling frameworks include only weak notions of typing or rely on first order logic constraint languages that have steep learning curves associated with them and that become unwieldy when scaling to large systems. We present the CADENA Architecture Language with Meta-modeling (CALM) - that uses multi-level type systems to specify and enforce a variety of architectural constraints relevant to the development of large-scale component-based systems. CADENA is a robust and extensible tool that has been used to specify a number of industrial strength component models and applied in multiple industrial research projects on model-driven development and software product lines. (C) 2009 Elsevier B.V. All rights reserved.
We propose a domain-specific aspect language to prevent denial of service caused by resource management. Our aspects specify availability policies by enforcing time limits in the allocation of resources. In our langua...
详细信息
We propose a domain-specific aspect language to prevent denial of service caused by resource management. Our aspects specify availability policies by enforcing time limits in the allocation of resources. In our language, aspects can be seen as formal timed properties on execution traces. Programs and aspects are specified as timed automata and the weaving process as an automata product. The benefit of this formal approach is two-fold: the user keeps the semantic impact of weaving under control and (s)he can use a model-checker to optimize the woven program and verify availability properties. This article presents the main approach (programs, aspects, weaving) formally using timed safety automata. The specification of resources, optimizations and verification are sketched in a more intuitive fashion. Even if a concrete implementation remains as future work, we address some high-level implementation issues and illustrate the approach by small examples and a case study. (C) 2009 Elsevier B.V. All rights reserved.
The proceedings contain 33 papers. The topics discussed include: the mission and history of WOSP: workshop on software and performance;software knows best: portable parallelism requires standardized measurements of tr...
ISBN:
(纸本)9781605585635
The proceedings contain 33 papers. The topics discussed include: the mission and history of WOSP: workshop on software and performance;software knows best: portable parallelism requires standardized measurements of transparent hardware;BAP: a benchmark-driven algebraic method for the performance engineering of customized services;modeling and simulating flash based solid-state disks for operating systems;a framework for utility-based service oriented design in sassy;state dependence in performance evaluation of component-based software systems;performance aware open-world software in a 3-layer architecture;rapid development of extensible profilers for the java virtual machine with aspect-oriented programming;analytical modeling of lock-based concurrency control with arbitrary transaction data access patterns;and workload-intensity-sensitive timing behavior analysis for distributed multi-user software systems.
暂无评论