12,230 research outputs found
Model-Based Development of Distributed Embedded Systems by the Example of the Scicos/SynDEx Framework
The embedded systems engineering industry faces increasing demands for more
functionality, rapidly evolving components, and shrinking schedules. Abilities
to quickly adapt to changes, develop products with safe design, minimize
project costs, and deliver timely are needed. Model-based development (MBD)
follows a separation of concerns by abstracting systems with an appropriate
intensity. MBD promises higher comprehension by modeling on several
abstraction-levels, formal verification, and automated code generation. This
thesis demonstrates MBD with the Scicos/SynDEx framework on a distributed
embedded system. Scicos is a modeling and simulation environment for hybrid
systems. SynDEx is a rapid prototyping integrated development environment for
distributed systems. Performed examples implement well-known control algorithms
on a target system containing several networked microcontrollers, sensors, and
actuators. The addressed research question tackles the feasibility of MBD for
medium-sized embedded systems. In the case of single-processor applications
experiments show that the comforts of tool-provided simulation, verification,
and code-generation have to be weighed against an additional memory consumption
in dynamic and static memory compared to a hand-written approach. Establishing
a near-seamless modeling-framework with Scicos/SynDEx is expensive. An
increased development effort indicates a high price for developing single
applications, but might pay off for product families. A further drawback was
that the distributed code generated with SynDEx could not be adapted to
microcontrollers without a significant alteration of the scheduling tables. The
Scicos/SynDEx framework forms a valuable tool set that, however, still needs
many improvements. Therefore, its usage is only recommended for experimental
purposes.Comment: 146 pages, Master's Thesi
Retargetable Compilers for Embedded DSPs
Programmable devices are a key technology for the design of embedded systems, such as in the consumer electronics market. Processor cores are used as building blocks for more and more embedded system designs, since they provide a unique combination of features: flexibility and reusability. Processor-based design implies that compilers capable of generating efficient machine code are necessary. However, highly efficient compilers for embedded processors are hardly available. In particular, this holds for digital signal processors (DSPs). This contribution is intended to outline different aspects of DSP compiler technology. First, we cover demands on compilers for embedded DSPs, which are partially in sharp contrast to traditional compiler construction. Secondly, we present recent advances in DSP code optimization techniques, which explore a comparatively large search space in order to achieve high code quality. Finally, we discuss the different approaches to retargetability of compilers, that is, techniques for automatic generation of compilers from processor models
Survey on Instruction Selection: An Extensive and Modern Literature Review
Instruction selection is one of three optimisation problems involved in the
code generator backend of a compiler. The instruction selector is responsible
of transforming an input program from its target-independent representation
into a target-specific form by making best use of the available machine
instructions. Hence instruction selection is a crucial part of efficient code
generation.
Despite on-going research since the late 1960s, the last, comprehensive
survey on the field was written more than 30 years ago. As new approaches and
techniques have appeared since its publication, this brings forth a need for a
new, up-to-date review of the current body of literature. This report addresses
that need by performing an extensive review and categorisation of existing
research. The report therefore supersedes and extends the previous surveys, and
also attempts to identify where future research should be directed.Comment: Major changes: - Merged simulation chapter with macro expansion
chapter - Addressed misunderstandings of several approaches - Completely
rewrote many parts of the chapters; strengthened the discussion of many
approaches - Revised the drawing of all trees and graphs to put the root at
the top instead of at the bottom - Added appendix for listing the approaches
in a table See doc for more inf
MELT - a Translated Domain Specific Language Embedded in the GCC Compiler
The GCC free compiler is a very large software, compiling source in several
languages for many targets on various systems. It can be extended by plugins,
which may take advantage of its power to provide extra specific functionality
(warnings, optimizations, source refactoring or navigation) by processing
various GCC internal representations (Gimple, Tree, ...). Writing plugins in C
is a complex and time-consuming task, but customizing GCC by using an existing
scripting language inside is impractical. We describe MELT, a specific
Lisp-like DSL which fits well into existing GCC technology and offers
high-level features (functional, object or reflexive programming, pattern
matching). MELT is translated to C fitted for GCC internals and provides
various features to facilitate this. This work shows that even huge, legacy,
software can be a posteriori extended by specifically tailored and translated
high-level DSLs.Comment: In Proceedings DSL 2011, arXiv:1109.032
Retrofitting Typestates into Rust
As software becomes more prevalent in our lives, bugs are able to cause significant disruption.
Thus, preventing them becomes a priority when trying to develop dependable
systems. While reducing their occurrence possibility to zero is infeasible, existing approaches
are able to eliminate certain subsets of bugs.
Rust is a systems programming language that addresses memory-related bugs by
design, eliminating bugs like use-after-free. To achieve this, Rust leverages the type system
along with information about object lifetimes, allowing the compiler to keep track of
objects throughout the program and checking for memory misusage. While preventing
memory-related bugs goes a long way in software security, other categories of bugs remain
in Rust. One of which would be Application Programming Interface (API) misusage,
where the developer does not respect constraints put in place by an API, thus resulting
in the program crashing.
Typestates elevate state to the type level, allowing for the enforcement of API constraints
at compile-time, relieving the developer from the burden that is keeping track
of the possible computation states at runtime, and preventing possible API misusage
during development. While Rust does not support typestates by design, the type system
is powerful enough to express and validate typestates.
I propose a new macro-based approach to deal with typestates in Rust; this approach
provides an embedded Domain-Specific Language (DSL) which allows developers to
express typestates using only existing Rust syntax. Furthermore, Rust’s macro system is
leveraged to extract a state machine out of the typestate specification and then perform
compile-time checks over the specification. Afterwards we leverage Rust’s type system to
check protocol-compliance. The DSL avoids workflow-bloat by requiring nothing but a
Rust compiler and the library itself.À medida que as nossas vidas estão cada vez mais dependentes de software, os erros do
mesmo têm o potencial de causar problemas significativos. Prevenir estes erros torna-se
uma tarefa prioritária durante o desenvolvimento de sistemas confiáveis. Erradicar erros
por completo é impossÃvel, mas é possÃvel eliminar certos conjuntos.
Rust é uma linguagem de programação de sistemas que, por desenho, endereça erros
de gestão de memória. Para o conseguir, a linguagem inclui no sistema de tipos informação
sobre o tempo de vida dos objetos, permitindo assim que o compilador conheça a
utilização dos mesmos e detecte erros de utilização de memória. Apesar da prevenção
de erros de memória ter um papel importante na segurança de software, existem ainda
outras categorias de erros em Rust, como o uso incorrecto de interfaces de programação,
em que o programador não respeita as restrições impostas pela mesma, o que resulta
numa falha do programa.
Typestates elevam o conceito de estado para o sistema de tipos, permitindo a aplicação
das restrições da interface durante a fase de compilação. Este conceito permite assim
aliviar o programador da responsabilidade que é conceptualizar e manter o estado do
programa em mente durante o desenvolvimento, prevenindo o mau uso das interfaces.
Apesar de Rust não suportar typestates de uma forma natural, o sistema de tipos permite
expressar e validar typestates.
Proponho uma nova abordagem de modo a lidar com typestates em Rust, tal abordagem
é baseada numa DSL embebida na linguagem, permitindo assim a descrição de
typestates usando apenas a sintaxe existente. A DSL vai mais além e providencia ainda
verificações estáticas sobre a especificação, tirando proveito do sistema de macros, extrai
uma máquina de estados que é depois verificada, por fim, a verificação de conformidade
é feita pelo compilador, tirando proveito do sistema de tipos. A DSL evita poluição do
ambiente trabalho, requerendo apenas um compilador de Rust e a sua própria biblioteca
Developing and applying heterogeneous phylogenetic models with XRate
Modeling sequence evolution on phylogenetic trees is a useful technique in
computational biology. Especially powerful are models which take account of the
heterogeneous nature of sequence evolution according to the "grammar" of the
encoded gene features. However, beyond a modest level of model complexity,
manual coding of models becomes prohibitively labor-intensive. We demonstrate,
via a set of case studies, the new built-in model-prototyping capabilities of
XRate (macros and Scheme extensions). These features allow rapid implementation
of phylogenetic models which would have previously been far more
labor-intensive. XRate's new capabilities for lineage-specific models,
ancestral sequence reconstruction, and improved annotation output are also
discussed. XRate's flexible model-specification capabilities and computational
efficiency make it well-suited to developing and prototyping phylogenetic
grammar models. XRate is available as part of the DART software package:
http://biowiki.org/DART .Comment: 34 pages, 3 figures, glossary of XRate model terminolog
When and how to develop domain-specific languages
Domain-specific languages (DSLs) are languages tailored to a specific application domain. They offer substantial gains in expressiveness and ease of use compared with general purpose programming languages in their domain of application. DSL development is hard, requiring both domain knowledge and language development expertise. Few people have both. Not surprisingly, the decision to develop a DSL is often postponed indefinitely, if considered at all, and most DSLs never get beyond the application library stage. While many articles have been written on the development of particular DSLs, there is very limited literature on DSL development methodologies and many questions remain regarding when and how to develop a DSL. To aid the DSL developer, we identify patterns in the decision, analysis, design, and implementation phases of DSL development. Our patterns try to improve on and extend earlier work on DSL design patterns, in particular by Spinellis (2001). We also discuss domain analysis tools and language development systems that may help to speed up DSL development. Finally, we state a number of open problems
- …