223 research outputs found

    Stream Fusion, to Completeness

    Full text link
    Stream processing is mainstream (again): Widely-used stream libraries are now available for virtually all modern OO and functional languages, from Java to C# to Scala to OCaml to Haskell. Yet expressivity and performance are still lacking. For instance, the popular, well-optimized Java 8 streams do not support the zip operator and are still an order of magnitude slower than hand-written loops. We present the first approach that represents the full generality of stream processing and eliminates overheads, via the use of staging. It is based on an unusually rich semantic model of stream interaction. We support any combination of zipping, nesting (or flat-mapping), sub-ranging, filtering, mapping-of finite or infinite streams. Our model captures idiosyncrasies that a programmer uses in optimizing stream pipelines, such as rate differences and the choice of a "for" vs. "while" loops. Our approach delivers hand-written-like code, but automatically. It explicitly avoids the reliance on black-box optimizers and sufficiently-smart compilers, offering highest, guaranteed and portable performance. Our approach relies on high-level concepts that are then readily mapped into an implementation. Accordingly, we have two distinct implementations: an OCaml stream library, staged via MetaOCaml, and a Scala library for the JVM, staged via LMS. In both cases, we derive libraries richer and simultaneously many tens of times faster than past work. We greatly exceed in performance the standard stream libraries available in Java, Scala and OCaml, including the well-optimized Java 8 streams

    Textured MoS 2 Thin Films Obtained on Tungsten: Electrical Properties of the W/MoS 2 Contact

    Get PDF
    Textured films of molybdenum disulfide have been obtained by solid state reaction between the constituents in thin films form when a (200) oriented tungsten sheet is used as substrate. The crystallites have their c axis perpendicular to the plane of the substrate. The annealing conditions are T=1073K and t=30 min. The films are stoichoimetric and p type. Such highly textured films are achieved without foreign atom addition (Ni, Co...). It appears, as shown by x-ray photoelectron spectroscopy, that a thin WS2 layer is present at the interface W/MoS2. The crystallization process is discussed by a van der Waals texturation (pseudoepitaxy) onto dangling bond sulfur terminated surfaces, these surfaces being ordered. After characterization of the W/MoS2 structure by x-ray diffraction and x-ray photoelectron spectroscopy, an upper electrode of tungsten was deposited by sputtering. The electrical properties of these W/MoS2/W structures have been investigated by analyzing the behavior of the current–voltage characteristics as a function of the measuring temperature. It is shown that an ohmic contact is obtained with a contact resistance smaller than the resistance of the MoS2 film

    Programming Languages For Hard Real-Time Embedded Systems

    Get PDF
    International audienceHard real-time embedded systems have traditionally been implemented using low level programming languages (such as ADA or C) at a level very close to the underlying operating system. However, for several years now the industry has started using higher level modelling languages, at least for early simulation and verification steps. The objective of this paper is to study existing formal languages including high level real-time primitives. Our review is built on the case study of an aerospace automated transfer vehicle, the particularity of which is to be composed of several multi-periodic communicating processes. In this paper, we emphasize the strengths and weaknesses of existing programming approaches when implementing this kind of system. As a result, the choice of the base rate of the program appears to have a major influence, not only on the difficulty to program the system correctly but also on the execution platform required to execute the program (operating system, scheduler, ...)

    The neighbouring genes <i>AvrLm10A</i> and <i>AvrLm10B</i> are part of a large multigene family of cooperating effector genes conserved in Dothideomycetes and Sordariomycetes

    Get PDF
    Fungal effectors (small-secreted proteins) have long been considered as species or even subpopulation-specific. The increasing availability of high-quality fungal genomes and annotations has allowed the identification of trans-species or trans-genera families of effectors. Two avirulence effectors, AvrLm10A and AvrLm10B, of Leptosphaeria maculans, the fungus causing stem canker of oilseed rape, are members of such a large family of effectors. AvrLm10A and AvrLm10B are neighbouring genes, organized in divergent transcriptional orientation. Sequence searches within the L. maculans genome showed that AvrLm10A/AvrLm10B belong to a multigene family comprising five pairs of genes with a similar tail-to-tail organization. The two genes, in a pair, always had the same expression pattern and two expression profiles were distinguished, associated with the biotrophic colonization of cotyledons and/or petioles and stems. Of the two protein pairs further investigated, AvrLm10A_like1/AvrLm10B_like1 and AvrLm10A_like2/AvrLm10B_like2, the second one had the ability to physically interact, similarly to what was previously described for the AvrLm10A/AvrLm10B pair, and cross-interactions were also detected for two pairs. AvrLm10A homologues were identified in more than 30 Dothideomycete and Sordariomycete plant-pathogenic fungi. One of them, SIX5, is an effector from Fusarium oxysporum f. sp. lycopersici physically interacting with the avirulence effector Avr2. We found that AvrLm10A/SIX5 homologues were associated with at least eight distinct putative effector families, suggesting that AvrLm10A/SIX5 is able to cooperate with different effectors. These results point to a general role of the AvrLm10A/SIX5 proteins as “cooperating proteins”, able to interact with diverse families of effectors whose encoding gene is co-regulated with the neighbouring AvrLm10A homologue

    A polychromatic Ramsey theory for ordinals

    Get PDF
    The Ramsey degree of an ordinal α is the least number n such that any colouring of the edges of the complete graph on α using finitely many colours contains an n-chromatic clique of order type α. The Ramsey degree exists for any ordinal α < ω ω . We provide an explicit expression for computing the Ramsey degree given α. We further establish a version of this result for automatic structures. In this version the ordinal and the colouring are presentable by finite automata and the clique is additionally required to be regular. The corresponding automatic Ramsey degree turns out to be greater than the set theoretic Ramsey degree. Finally, we demonstrate that a version for computable structures fails

    Safe functional reactive programming through dependent types

    Get PDF
    Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on signals. FRP is based on the synchronous dataflow paradigm and supports both continuous-time and discrete-time signals (hybrid systems).What sets FRP apart from most other languages for similar applications is its support for systems with dynamic structure and for higher-order reactive constructs. Statically guaranteeing correctness properties of programs is an attractive proposition. This is true in particular for typical application domains for reactive programming such as embedded systems. To that end, many existing reactive languages have type systems or other static checks that guarantee domain-specific properties, such as feedback loops always being well-formed. However, they are limited in their capabilities to support dynamism and higher-order data-flow compared with FRP. Thus, the onus of ensuring such properties of FRP programs has so far been on the programmer as established static techniques do not suffice. In this paper, we show how dependent types allow this concern to be addressed. We present an implementation of FRP embedded in the dependently-typed language Agda, leveraging the type system of the host language to craft a domain-specific (dependent) type system for FRP. The implementation constitutes a discrete, operational semantics of FRP, and as it passes the Agda type, coverage, and termination checks, we know the operational semantics is total, which means our type system is safe
    • …
    corecore