High-level languages for small devices: a case study

In this paper we study, through a concrete case, the feasibility of using a high-level, general-purpose logic language in the design and implementation of applications targeting wearable computers. The case study is a "sound spatializer" which, given real-time signals for monaural audio and heading, generates stereo sound which appears to come from a position in space. The use of advanced compile-time transformations and optimizations made it possible to execute code written in a clear style without efficiency or architectural concerns on the target device, while meeting strict existing time and memory constraints. The final executable compares favorably with a similar implementation written in C. We believe that this case is representative of a wider class of common pervasive computing applications, and that the techniques we show here can be put to good use in a range of scenarios. This points to the possibility of applying high-level languages, with their associated exibility, conciseness, ability to be automatically parallelized, sophisticated compile-time tools for analysis and verification, etc., to the embedded systems eld without paying an unnecessary performance penalty.

[1]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[2]  J. Blauert Spatial Hearing: The Psychophysics of Human Sound Localization , 1983 .

[3]  John Peterson Untagged data in tagged environments: choosing optimal representations at compile time , 1989, FPCA.

[4]  Peter Van Roy,et al.  Can Logic Programming Execute as Fast as Imperative Programming? , 1990 .

[5]  Simon L. Peyton Jones,et al.  Unboxed Values as First Class Citizens in a Non-Strict Functional Language , 1991, FPCA.

[6]  Xavier Leroy,et al.  Unboxed objects and polymorphic typing , 1992, POPL '92.

[7]  Greg Welch,et al.  Welch & Bishop , An Introduction to the Kalman Filter 2 1 The Discrete Kalman Filter In 1960 , 1994 .

[8]  Saumya K. Debray,et al.  A Simple Approach to Supporting Untagged Objects in Dynamically Typed Languages , 1997, J. Log. Program..

[9]  Malcolm Wallace,et al.  Functional programming and embedded systems , 1995 .

[10]  Manuel V. Hermenegildo,et al.  The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems , 1995, APPIA-GULP-PRODE.

[11]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[12]  Robert Stephens,et al.  A survey of stream processing , 1997, Acta Informatica.

[13]  Manuel V. Hermenegildo,et al.  Concurrency in Prolog Using Threads and a Shared Database , 1999, ICLP.

[14]  Paul Hudak,et al.  Lambda in Motion: Controlling Robots with Haskell , 1999, PADL.

[15]  Manuel V. Hermenegildo,et al.  An Assertion Language for Constraint Logic Programs , 2000, Analysis and Visualization Tools for Constraint Programming.

[16]  Cliff Randell,et al.  An Event-Driven Sensor Architecture for Low Power Wearables , 2000 .

[17]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.

[18]  Michael Leuschel,et al.  Design and Implementation of the High-Level Specification Language CSP(LP) in Prolog , 2001, PADL.

[19]  Michael Leuschel Design and Implementation of the High-Level Specification Language CSP(LP) , 2001 .

[20]  Edward A. Lee,et al.  Overview of the Ptolemy project , 2001 .

[21]  Mats Carlsson,et al.  Parallel execution of prolog programs: a survey , 2001, TOPL.

[22]  William Thies,et al.  StreamIt: A Language for Streaming Applications , 2002, CC.

[23]  Francisco Bueno,et al.  More Precise Yet Efficient Type Inference for Logic Programs , 2002, SAS.

[24]  Henk L. Muller,et al.  The Well Mannered Wearable Computer , 2002, Personal and Ubiquitous Computing.

[25]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[26]  Manuel V. Hermenegildo,et al.  Improved Compilation of Prolog to C Using Moded Types and Determinism Information , 2004, PADL.

[27]  Manuel V. Hermenegildo,et al.  Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor) , 2005, Sci. Comput. Program..

[28]  Michael Wolfe,et al.  How compilers and tools differ for embedded systems , 2005, CASES '05.

[29]  Manuel V. Hermenegildo,et al.  A Syntactic Approach to Combining Functional Notation, Lazy Evaluation, and Higher-Order in LP Systems , 2006, FLOPS.