Developing pervasive computing applications is a difficult task because it requires to deal with a wide range of issues: heterogeneous devices, entity distribution, entity coordination, low-level hardware knowledge......
详细信息
ISBN:
(纸本)9781605584942
Developing pervasive computing applications is a difficult task because it requires to deal with a wide range of issues: heterogeneous devices, entity distribution, entity coordination, low-level hardware knowledge... Besides requiring various areas of expertise, programming such applications involves writing a lot of administrative code to glue technologies together and to interface with both hardware and software components. this paper proposes a generativeprogramming approach to providing programming, execution and simulation support dedicated to the pervasive computing domain. this approach relies on a domain-specific language, named DiaSpec, dedicated to the description of pervasive computing systems. Our generative approach factors out features of distributed systems technologies, making DiaSpec-specified software systems portable. the DiaSpec compiler is implemented and has been used to generate dedicated programming frameworks for a variety of pervasive computing applications, including detailed ones to manage the building of an engineering school.
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 19 papers. the topics discussed include: reusable, generic program analyses and transformations;toward foundations for type-reflective metaprogramming;transactional pointcuts: designation reifi...
ISBN:
(纸本)9781605588629
the proceedings contain 19 papers. the topics discussed include: reusable, generic program analyses and transformations;toward foundations for type-reflective metaprogramming;transactional pointcuts: designation reification and advice of interrelated join points;extending aspectJ for separating regions;a language and framework for invariant-driven transformations;JavaGI in the battlefield: practical experience with generalized interfaces;classifying java class transformations for pervasive virtualized access;advanced runtime adaptation for java;hotwave: creating adaptive tools with dynamic aspect-oriented programming in java;generating safe template languages;abstract parsing for two-staged languages with concatenation;synthesis of fast programs for maximum segment sum problems;a generativeprogramming approach to developing pervasive computing systems;and algorithms for user interfaces.
Multiple dispatch - the selection of a function to be invoked based on the dynamic type of two or more arguments - is a solution to several classical problems in object-oriented programming. Open multi-methods general...
详细信息
Multiple dispatch - the selection of a function to be invoked based on the dynamic type of two or more arguments - is a solution to several classical problems in object-oriented programming. Open multi-methods generalize multiple dispatch towards open-class extensions, which improve separation of concerns and provisions for retroactive design. We present the rationale, design, implementation, performance, programming guidelines, and experiences of working with a language feature, called open multi-methods, for C++. Our open multi-methods support both repeated and virtual inheritance. Our call resolution rules generalize both virtual function dispatch and overload resolution semantics. After using all information from argument types, these rules can resolve further ambiguities by using covariant return types. Care was taken to integrate open multi-methods with existing C++ language features and rules. We describe a model implementation and compare its performance and space requirements to existing open multi-method extensions and work-around techniques for C++. Compared to these techniques, our approach is simpler to use, catches more user mistakes, and resolves more ambiguities through link-time analysis, is comparable in memory usage, and runs significantly faster. In particular, the runtime cost of calling an open multi-method is constant and less than the cost of a double dispatch (two virtual function calls). Finally, we provide a sketch of a design for open multi-methods in the presence of dynamic loading and linking of libraries. (C) 2009 Elsevier B.V. All rights reserved.
Programs can be composed from features. We want to verify automatically that all legal combinations of features can be composed safely without errors. Prior work on this problem assumed that features add code monotoni...
详细信息
ISBN:
(纸本)9781605584942
Programs can be composed from features. We want to verify automatically that all legal combinations of features can be composed safely without errors. Prior work on this problem assumed that features add code monotonically. We generalize prior work to enable features to add and remove code, describe our analyses and implementation, and review case studies. We observe that more expressive features increase the complexity of developed programs rapidly - up to the point where tools and automated concepts as presented in this paper are indispensable for verification.
Template languages are widely used within generativeprogramming, because they provide intuitive means to generate software artefacts expressed in a specific object language. However, most template languages perform t...
详细信息
ISBN:
(纸本)9781605584942
Template languages are widely used within generativeprogramming, because they provide intuitive means to generate software artefacts expressed in a specific object language. However, most template languages perform template instantiation on the level of string literals, which allows neither syntax checks nor semantics analysis. To make sure that generated artefacts always conform to the object language, we propose to perform static analysis at template design time. In addition, the increasing popularity of domain-specific languages (DSLs) demands an approach that allows to reuse boththe concepts of template languages and the corresponding tools. In this paper we address the issues mentioned above by presenting how existing languages can be automatically extended with generic template concepts (e.g., placeholders, loops, conditions) to obtain safe template languages. these languages provide means for syntax checking and static semantic analysis w.r.t. the object language at template design time. We discuss the prerequisites for this extension, analyse the types of correctness properties that can be assured at template design time, and exemplify the key benefits of this approach on a textual DSL and Java.
Dynamic aspect-oriented programming (AOP) enables runtime adaptation of aspects, which is important for building sophisticated, aspect-based software engineering tools, such as adaptive profilers or debuggers that dyn...
详细信息
ISBN:
(纸本)9781605584942
Dynamic aspect-oriented programming (AOP) enables runtime adaptation of aspects, which is important for building sophisticated, aspect-based software engineering tools, such as adaptive profilers or debuggers that dynamically modify instrumentation code in response to user interactions. Today, many AOP frameworks for Java, notably AspectJ, focus on aspect weaving at compile-time or at load-time, and offer only limited support for aspect adaptation and reweaving at runtime. In this paper, we introduce HotWave, an AOP framework based on AspectJ for standard Java Virtual Machines (JVMs). HotWave supports dynamic (re) weaving of previously loaded classes, and it ensures that all classes loaded in a JVM can be (re) woven, including the classes of the standard Java class library. HotWave features a novel mechanism for inter-advice communication, enabling efficient data passing between advices that are woven into the same method. We explain HotWave's programming model and discuss our implementation techniques. As case study, we present an adaptive, aspect-based profiler that leverages HotWave's distinguishing features.
Developing tools for profiling, debugging, testing, and reverse engineering is error-prone, time-consuming, and therefore costly when using low-level techniques, such as bytecode instrumentation. As a solution to thes...
详细信息
ISBN:
(纸本)9781605584942
Developing tools for profiling, debugging, testing, and reverse engineering is error-prone, time-consuming, and therefore costly when using low-level techniques, such as bytecode instrumentation. As a solution to these problems, we promote tool development in Java using high-level aspect-oriented programming (AOP). We demonstrate that the use of aspects yields compact tools that are easy to develop and extend. As enabling technology, we rely on HotWave, a new tool for dynamic and comprehensive aspect weaving. HotWave reconciles compatibility with existing virtual machine and AOP technologies. It provides support for runtime adaptation of aspects and reweaving of previously loaded code, as well as the ability to weave aspects into all methods executing in a Java Virtual Machine, including methods in the standard Java class library. HotWave also features a new mechanism for efficiently passing data between advices that are woven into the same method. We demonstrate the benefits of HotWave's distinguishing features with two case studies in the area of profiling.
Most large software applications rely on an external relational database for storing and managing persistent data. Typically, such applications interact withthe database by first constructing strings that represent S...
详细信息
Most large software applications rely on an external relational database for storing and managing persistent data. Typically, such applications interact withthe database by first constructing strings that represent SQL statements, and then submitting these for execution by the database engine. the fact that these statements are only checked for correctness at runtime is a source for many potential defects, including type and syntax errors and vulnerability to injection attacks. the ARARAT system presented here offers a method for dealing withthese difficulties by coercing the host C++ compiler to do the necessary checks of the generated strings. A library of templates and preprocessor directives is used to embed in C++ a little language representing an augmented relational algebra formalism. Type checking of this embedded language, carried out by our template library, assures, at compile-time, the correctness and safety of the generated SQL strings. All SQL statements constructed by ARARAT are guaranteed to be syntactically correct, and type safe with respect to the database schema. Moreover, ARARAT statically ensures that the generated statements are immune to all injection attacks. the standard techniques of "expression templates" and "compile-time symbolic derivation" for compile-time representation of symbolic structures, are enhanced in our system. We demonstrate the support of a type system and a symbol table lookup of the symbolic structure. A key observation of this work is that type equivalence of instantiated nominally typed generics in C++ (as well as other languages, e.g., JAVA) is structural rather than nominal. this makes it possible to embed the structural type system, characteristic to persistent data management, in the nominal type system of C++. For some of its advanced features, ARARAT relies on two small extensions to the standard C++ language: the typeof pseudo operator and the _COUNTER_ preprocessor macro. (C) 2010 Elsevier B.V. All rights re
Synchronization is a good candidate for an aspect in aspect-oriented programming (AOP) since programmers have to choose the best granularity of synchronization for the underlying hardware to obtain the best execution ...
详细信息
ISBN:
(纸本)9781605584942
Synchronization is a good candidate for an aspect in aspect-oriented programming (AOP) since programmers have to choose the best granularity of synchronization for the underlying hardware to obtain the best execution performance. If synchronization is an aspect, programmers can change the synchronization code independently of the rest of the program when the program runs on different hardware. However, existing AOP languages such as AspectJ have problems. they cannot select an arbitrary code region as a join point. Moreover, they cannot enforce weaving of a synchronization aspect. Since it is an alternative feature in feature modeling, at least one of available synchronization aspects must be woven. Otherwise, the program would be thread-unsafe. Since an aspect in AspectJ is inherently optional, programmers must be responsible for weaving it. To solve these problems, this paper proposes two new constructs for AspectJ, region cut and assertions for advice. Regioncut selects arbitrary code region as a join point and assertion for advice enforces weaving a mandatory advice. We implemented these constructs by extending the AspectBench compiler. We evaluated the design of our constructs by applying them to two open-source software products, Javassist and Hadoop.
暂无评论