this paper describes our experience using a functional language, Haskell, to build an embedded, domain-specific language (DSL) for component configuration in large-scale, real-time, embedded systems. Prior to the intr...
详细信息
ISBN:
(纸本)9781595939197
this paper describes our experience using a functional language, Haskell, to build an embedded, domain-specific language (DSL) for component configuration in large-scale, real-time, embedded systems. Prior to the introduction of the DSL, engineers would describe the steps needed to configure a particular system in a handwritten XML document. In this paper, we outline the application domain, give a brief overview of the DSL that we developed, and provide concrete data to demonstrate its effectiveness. In particular, we show that the DSL has several significant benefits over the original, XML-based approach including reduced code size, increased modularity and scalability, and detection and prevention of common defects. For example, using the DSL, we were able to produce clear and intuitive descriptions of component configurations that were sometimes less than 1/30 of the size of the original XML.
Severely resource-constrained devices present a confounding challenge to the functional programmer: we are used to having powerful abstraction facilities at our fingertips, but how can we make use of these tools on a ...
详细信息
ISBN:
(纸本)9781595939197
Severely resource-constrained devices present a confounding challenge to the functional programmer: we are used to having powerful abstraction facilities at our fingertips, but how can we make use of these tools on a device with an 8-or 16-bit CPU and at most tens of kilobytes of RAM? Motivated by this challenge, we have developed Flask, a domain specific language embedded in Haskell that brings the power of functionalprogramming to sensor networks, collections of highly resource-constrained devices. Flask consists of a staging mechanism that cleanly separates node-level code from the meta-language used to generate node-level code fragments;syntactic support for embedding standard sensor network code;a restricted subset of Haskell that runs on sensor networks and constrains program space and time consumption;a higher-level "data stream" combinator library for quickly constructing sensor network programs;and an extensible runtime that provides commonly-used services. We demonstrate Flask through several small code examples as well as a compiler that generates node-level code to execute a network-wide query specified in a SQL-like language. We show how using Flask ensures constraints on space and time behavior. through microbenchmarks and measurements on physical hardware, we demonstrate that Flask produces programs that are efficient in terms of CPU and memory usage and that can run effectively on existing sensor network hardware.
this document illustrates how functional implementations of formal semantics ( structural operational semantics, reduction semantics, small-step and big-step abstract machines, natural semantics, and denotational sema...
详细信息
ISBN:
(纸本)9781595939197
this document illustrates how functional implementations of formal semantics ( structural operational semantics, reduction semantics, small-step and big-step abstract machines, natural semantics, and denotational semantics) can be transformed into each other. these transformations were foreshadowed by Reynolds in "Definitional Interpreters for Higher-Order programming Languages" for functional implementations of denotational semantics, natural semantics, and big-step abstract machines using closure conversion, CPS transformation, and defunctionalization. Over the last few years, the author and his students have further observed that functional implementations of small-step and of big-step abstract machines are related using fusion by fixed-point promotion and that functional implementations of reduction semantics and of small-step abstract machines are related using refocusing and transition compression. It furthermore appears that functional implementations of structural operational semantics and of reduction semantics are related as well, also using CPS transformation and defunctionalization. this further relation provides an element of answer to Felleisen's conjecture that any structural operational semantics can be expressed as a reduction semantics: for deterministic languages, a reduction semantics is a structural operational semantics in continuation style, where the reduction context is a defunctionalized continuation. As the defunctionalized counterpart of the continuation of a one-step reduction function, a reduction context represents the rest of the reduction, just as an evaluation context represents the rest of the evaluation since it is the defunctionalized counterpart of the continuation of an evaluation function.
With features that include lightweight syntax, expressive type systems, and deep semantic foundations, functional languages are now being used to develop an increasingly broad range of complex, real-world applications...
详细信息
ISBN:
(纸本)9781595939197
With features that include lightweight syntax, expressive type systems, and deep semantic foundations, functional languages are now being used to develop an increasingly broad range of complex, real-world applications. In the area of systems software, however, where performance and interaction with low-level aspects of hardware are central concerns, many practitioners still eschew the advantages of higher-level languages for the potentially unsafe but predictable behavior of traditional imperative languages like C. It is ironic that critical applications such as operating systems kernels, device drivers, and VMMs-where a single bug could compromise the reliability or security of a whole system-are among the least likely to benefit from the abstractions and safety guarantees of modern language designs. Over the last few years, our group has been investigating the potential for using Haskell to develop realistic operating systems that can boot and run on bare metal. the House system, developed primarily by thomas Hallgren and Andrew Tolmach, demonstrates that it is indeed possible to construct systems software in a functional language. But House still relies on a layer of runtime support primitives-some written using unsafe Haskell primitives and others written in C-to provide services ranging from garbage collection to control of the page table structures used by the hardware memory management unit. We would like to replace as much of this layer as possible with code written in a functional language without compromising on type or memory safety. Our experiences with House have led us to believe that a new functional language is required to reflect the needs of the systems domain more directly. Interestingly, however, we have concluded that this does not require fundamental new language design. In this invited talk, I will give an update on the current status of our project and I will describe how we are leveraging familiar components of the Haskell type system-includ
the ICFP programming contest is a 72-hour contest, which attracts thousands of contestants from all over the world. In this report we describe what it takes to organise this contest, the main ideas behind the contest ...
详细信息
the Dynamic Factory pattern describes a factory that can create product instances based on concrete type definitions stored as external metadata. this facilitates adding new products to a system without having to modi...
详细信息
Operations on abstract data types can be classified as either queries or updates - those that either query the current state, or update it. Modern object-oriented programming languages require classes/interfaces to su...
详细信息
this paper describes two patterns, Scenario Monitor and Bind Completed Scenario to Event. the first allows scenarios to be monitored. the second uses scenario monitoring to address state based crosscutting concerns in...
详细信息
the proceedings contain 26 papers. the topics discussed include: patterns for data and metadata evolution in adaptive object-models;freeway patterns for SOA systems;enterprise architecture management patterns;patterns...
ISBN:
(纸本)9781605581514
the proceedings contain 26 papers. the topics discussed include: patterns for data and metadata evolution in adaptive object-models;freeway patterns for SOA systems;enterprise architecture management patterns;patterns for understanding frameworks;the dynamic factory pattern;a pattern language for developing analog to digital converter data sampling firmware;learning and studying interaction design through design patterns;continuous feedback pedagogical patterns;thoughts on weak links and alexandrian life in Scrum;additional patterns for fearless change;the relation between design patterns and schema theory;fundamental banking patterns;runtime Mix'n match design pattern;deferred cancellation. a behavioral pattern;a pattern for monitoring scenarios to handle state based crosscutting concerns;a catalogue of bug patterns for exception handling in aspect-oriented programs;and patterns for the secure and reliable execution of processess.
Object-oriented software quality models usually use metrics of classes or of relationships between classes to measure internal attributes of systems. However, the quality of these systems does not depend on classes so...
详细信息
暂无评论