122 research outputs found
Energy efficient adaptation engines for android applications
Context The energy consumption of mobile devices is increasing due to the improvement in their components (e.g., better processors, larger screens). Although the hardware consumes the energy, the software is responsible for managing hardware resources such as the camera software and its functionality, and therefore, affects the energy consumption. Energy consumption not only depends on the installed code, but also on the execution context (environment, devices status) and how the user interacts with the application.
Objective In order to reduce the energy consumption based on user behavior, it is necessary to dynamically adapt the application. However, the adaptation mechanism also consumes a certain amount of energy in itself, which may lead to an important increase in the energy expenditure of the application in comparison with the benefits of the adaptation. Therefore, this footprint must be measured and compared with the benefit obtained.
Method In this paper, we (1) determine the benefits, in terms of energy consumption, of dynamically adapting mobile applications, based on user behavior; and (2) advocate the most energy-efficient adaptation mechanism. We provide four different implementations of a proposed adaptation model and measure their energy consumption.
Results The proposed adaptation engines do not increase the energy consumption when compared to the benefits of the adaptation, which can reduce the energy consumption by up to 20%.
Conclusion The adaptation engines proposed in this paper can decrease the energy consumption of the mobile devices based on user behavior. The overhead introduced by the adaptation engines is negligible in comparison with the benefits obtained by the adaptation.Junta de Andalucía MAGIC P12-TIC1814Ministerio de Economía y Competitividad TIN2015-64841-RMinisterio de Ciencia, Innovación y Universidades TIN2017-90644-REDTMinisterio de Ciencia, Innovación y Universidades RTI2018-099213-B-I00Universidad de Málaga LEIA UMA18-FEDERJA-15
LJGS: Gradual Security Types for Object-Oriented Languages
LJGS is a lightweight Java core calculus with a gradual security type system. The calculus guarantees secure information flow for
sequential, class-based, typed object-oriented programming with
mutable objects and virtual method calls. An LJGS program is
composed of fragments that are checked either statically or
dynamically. Statically checked fragments adhere to a security type
system so that they incur no run-time penalty whereas dynamically
checked fragments rely on run-time security labels. The programmer
marks the boundaries between static and dynamic checking with casts
so that it is always clear whether a program fragment requires
run-time checks. LJGS requires security annotations on fields and
methods. A field annotation either specifies a fixed static
security level or it prescribes dynamic checking. A method
annotation specifies a constrained polymorphic security signature.
The types of local variables in method bodies are analyzed
flow-sensitively and require no annotation. The dynamic checking of
fields relies on a static points-to analysis to approximate implicit
flows. We prove type soundness and non-interference for LJGS
Open Programming Language Interpreters
Context: This paper presents the concept of open programming language
interpreters and the implementation of a framework-level metaobject protocol
(MOP) to support them. Inquiry: We address the problem of dynamic interpreter
adaptation to tailor the interpreter's behavior on the task to be solved and to
introduce new features to fulfill unforeseen requirements. Many languages
provide a MOP that to some degree supports reflection. However, MOPs are
typically language-specific, their reflective functionality is often
restricted, and the adaptation and application logic are often mixed which
hardens the understanding and maintenance of the source code. Our system
overcomes these limitations. Approach: We designed and implemented a system to
support open programming language interpreters. The prototype implementation is
integrated in the Neverlang framework. The system exposes the structure,
behavior and the runtime state of any Neverlang-based interpreter with the
ability to modify it. Knowledge: Our system provides a complete control over
interpreter's structure, behavior and its runtime state. The approach is
applicable to every Neverlang-based interpreter. Adaptation code can
potentially be reused across different language implementations. Grounding:
Having a prototype implementation we focused on feasibility evaluation. The
paper shows that our approach well addresses problems commonly found in the
research literature. We have a demonstrative video and examples that illustrate
our approach on dynamic software adaptation, aspect-oriented programming,
debugging and context-aware interpreters. Importance: To our knowledge, our
paper presents the first reflective approach targeting a general framework for
language development. Our system provides full reflective support for free to
any Neverlang-based interpreter. We are not aware of any prior application of
open implementations to programming language interpreters in the sense defined
in this paper. Rather than substituting other approaches, we believe our system
can be used as a complementary technique in situations where other approaches
present serious limitations
Sub-method, partial behavioral reflection with Reflectivity: Looking back on 10 years of use
Context. Refining or altering existing behavior is the daily work of every
developer, but that cannot be always anticipated, and software sometimes cannot
be stopped. In such cases, unanticipated adaptation of running systems is of
interest for many scenarios, ranging from functional upgrades to on-the-fly
debugging or monitoring of critical applications.
Inquiry. A way of altering software at run time is using behavioral
reflection, which is particularly well-suited for unanticipated adaptation of
real-world systems. Partial behavioral reflection is not a new idea, and for
years many efforts have been made to propose a practical way of expressing it.
All these efforts resulted in practical solutions, but which introduced a
semantic gap between the code that requires adaptation and the expression of
the partial behavior. For example, in Aspect-Oriented Programming, a pointcut
description is expressed in another language, which introduces a new distance
between the behavior expression (the Advice) and the source code in itself.
Approach. Ten years ago, the idea of closing the gap between the code and the
expression of the partial behavior led to the implementation of the
Reflectivity framework. Using Reflectivity, developers annotate Abstract Syntax
Tree (AST) nodes with meta-behavior which is taken into account by the compiler
to produce behavioral variations. In this paper, we present Reflectivity, its
API, its implementation and its usage in Pharo. We reflect on ten years of use
of Reflectivity, and show how it has been used as a basic building block of
many innovative ideas.
Knowledge. Reflectivity brings a practical way of working at the AST level,
which is a high-level representation of the source code manipulated by software
developers. It enables a powerful way of dynamically add and modify behavior.
Reflectivity is also a flexible mean to bridge the gap between the expression
of the meta-behavior and the source code. This ability to apply unanticipated
adaptation and to provide behavioral reflection led to many experiments and
projects during this last decade by external users. Existing work use
Reflectivity to implement reflective libraries or languages extensions,
featherweight code instrumentation, dynamic software update, debugging tools
and visualization and software analysis tools.
Grounding. Reflectivity is actively used in research projects. During the
past ten years, it served as a support, either for implementation or as a
fundamental base, for many research work including PhD theses, conference,
journal and workshop papers. Reflectivity is now an important library of the
Pharo language, and is integrated at the heart of the platform.
Importance. Reflectivity exposes powerful abstractions to deal with partial
behavioral adaptation, while providing a mature framework for unanticipated,
non-intrusive and partial behavioral reflection based on AST annotation.
Furthermore, even if Reflectivity found its home inside Pharo, it is not a pure
Smalltalk-oriented solution. As validation over the practical use of
Reflectivity in dynamic object-oriented languages, the API has been ported to
Python. Finally, the AST annotation feature of Reflectivity opens new
experimentation opportunities about the control that developers could gain on
the behavior of their own software
Dynamic Virtual Join Point Dispatch
Conceptually, join points are points in the execution of a program and advice is late-bound to them. We propose the notion of virtual join points that makes this concept explicit not only at a conceptual, but also at implementation level. In current implementations of aspect-oriented languages, binding is performed early, at deploy-time, and only a limited residual dispatch is executed. Current implementations fall in the categories of modifying the application code, modifying the meta-level of an application, or interacting with the application by means of events—the latter two already realizing virtual join points to some degree. We provide an implementation of an aspect-oriented execution environment that supports truly virtual join points and discuss how this approach also favors optimizations in the execution environment
- …