Browsing by Author "Kaiabachev, Roumen"
Now showing 1 - 2 of 2
Results Per Page
Sort Options
Item E-FRP With Priorities(2009-07-15) Inoue, Jun; Kaiabachev, Roumen; Taha, Walid; Zhu, AngelaE-FRP is declarative language for programming resource-bounded, event-driven systems. Its original high-level semantics requires that each event handler execute atomically. This facilitates reasoning about E-FRP programs, and therefore is a desirable feature of the language. However, the original compilation strategy requires that each handler complete execution before another event can occur. This implementation treats all events equally; it forces the upper bound on the time needed to respond to any event to be the same. While acceptable for many applications, often some events are more urgent than others We show we can improve the compilation strategy without altering the high-level semantics. Thus, the programmer has more control over responsiveness without taking away the ability to reason about programs at a high level. The programmer controls responsiveness by declaring priorities for events, and the compilation strategy produces code that uses preemption to enforce these priorities. The compilation strategy enjoys the same properties as the original, with the change being that the programmer reasons modulo permutations on the order of event arrivals.Item Implicitly Heterogeneous Multi-stage Programming(2005-04-16) Eckhardt, Jason; Kaiabachev, Roumen; Pašalić, Emir; Swadi, Kedar; Taha, WalidPrevious work on semantics-based multi-stage programming (MSP) language design focused on homogeneous languages designs, where the generating and the generated languages are the same. Homogeneous designs simply add a hygienic quasi-quotation and evaluation mechanism to a base language. An apparent disadvantage of this approach is that the programmer is bound to both expressivity and performance characteristics of the base language. This paper proposes a practical means to show that this can be avoided by providing specialized translations from subsets of the base language to different target languages. This approach preserves the homogeneous "look" of multi-stage programs, and, more importantly, the static guarantees about the generated code. In addition, compared to an explicitly heterogeneous approach, it promotes reuse and systematic exploration of the performance characteristics of the target languages. To illustrate the proposed approach, we design and implement a translation to a subset of C suitable for numerical computation, and show that it preserves static typing. The translation is implemented, and evaluated with several benchmarks. The implementation is available in the online distribution of MetaOCaml.