ABSTRACT
Applications that combine live data streams with embedded, parallel, and distributed processing are becoming more commonplace. WaveScript is a domain-specific language that brings high-level, type-safe, garbage-collected programming to these domains. This is made possible by three primary implementation techniques, each of which leverages characteristics of the streaming domain. First, we employ a novel evaluation strategy that uses a combination of interpretation and reification to partially evaluate programs into stream dataflow graphs. Second, we use profile-driven compilation to enable many optimizations that are normally only available in the synchronous (rather than asynchronous) dataflow domain. Finally, we incorporate an extensible system for rewrite rules to capture algebraic properties in specific domains (such as signal processing).
We have used our language to build and deploy a sensornetwork for the acoustic localization of wild animals, in particular, the Yellow-Bellied marmot. We evaluate WaveScript's performance on this application, showing that it yields good performance on both embedded and desktop-class machines, including distributed execution and substantial parallel speedups. Our language allowed us to implement the application rapidly, while outperforming a previous C implementation by over 35%, using fewer than half the lines of code. We evaluate the contribution of our optimizations to this success.
- Wavescript users manual, http://regiment.us/wsman/.Google Scholar
- Automatic derivation and implementation of signal processing algorithms. SIGSAM Bull., 35(2):1--19, 2001. Google Scholar
Digital Library
- A. M. Ali, T. Collier, L. Girod, K. Yao, C. Taylor, and D. T. Blumstein. An empirical study of acoustic source localization. In IPSN ?07: Proceedings of the sixth international conference on Information processing in sensor networks, New York, NY, USA, 2007. ACM Press. Google Scholar
Digital Library
- A. Arasu et al. Stream: the stanford stream data manager (demonstration description). In SIGMOD ?03: Proceedings of the 2003 ACM SIGMOD international conference on Management of data, pages 665--665, New York, NY, USA, 2003. ACM. Google Scholar
Digital Library
- I. Buck et al. Brook for gpus: stream computing on graphics hardware. In SIGGRAPH ?04: ACM SIGGRAPH 2004 Papers, pages 777--786, New York, NY, USA, 2004. ACM. Google Scholar
Digital Library
- D. Carney, U. Cetintemel, M. Cherniak, C. Convey, S. Lee, G. Seidman, M. Stonebraker, N. Tatbul, and S. Zdonik. Monitoring streams?a new class of data management applications. In VLDB, 2002. Google Scholar
Digital Library
- P. Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice. Lustre: a declarative language for real-time programming. In POPL ?87: Proc. of the 14th ACM SIGACT-SIGPLAN symposium on Principles of prog. lang., pages 178--188, New York, NY, USA, 1987. ACM. Google Scholar
Digital Library
- R. K. Dybvig. The development of chez scheme. In ICFP ?06: Proc. of the 11th ACM SIGPLAN intl. conf on Functional prog., pages 1--12, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- C. Elliott and P. Hudak. Functional reactive animation. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP ?97), volume 32(8), pages 263--273, 1997. Google Scholar
Digital Library
- L. Girod, M. Lukac, V. Trifa, and D. Estrin. The design and implementation of a self-calibrating distributed acoustic sensing platform. In ACM SenSys, Boulder, CO, Nov 2006. Google Scholar
Digital Library
- L. Girod, Y. Mei, R. Newton, S. Rost, A. Thiagarajan, H. Balakrishnan, and S. Madden. Xstream: A signal-oriented data stream management system. In ICDE, 2008. Google Scholar
Digital Library
- M. I. Gordon, W. Thies, and S. Amarasinghe. Exploiting coarsegrained task, data, and pipeline parallelism in stream programs. In ASPLOS-XII: Proc. of the 12th intl. conf. on Arch. support for prog. lang. and op. sys., pages 151--162, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- S. P. Jones et al. Playing by the rules: Rewriting as a practical optimisation technique in ghc. In Haskell Workshop, 2001.Google Scholar
- H. Pirahesh, J. M. Hellerstein, and W. Hasan. Extensible/rule based query rewrite optimization in Starburst. pages 39--48, 1992.Google Scholar
- P. Sewell et al. Acute: High-level programming language design for distributed computation. J. Funct. Program., 17(4-5):547--612, 2007. Google Scholar
Digital Library
- R. Stephens. A survey of stream processing. Acta Informatica, 34(7):491--541, 1997.Google Scholar
Cross Ref
- W. Taha and T. Sheard. Multi-stage programming with explicit annotations. In Partial Evaluation and Semantics-Based Program Manipulation, Amsterdam, The Netherlands, June 1997, pages 203--217. New York: ACM, 1997. Google Scholar
Digital Library
- S. Weeks. Whole-program compilation in mlton. In ML ?06: Proceedings of the 2006 workshop on ML, pages 1--1, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
Index Terms
Design and evaluation of a compiler for embedded stream programs
Recommendations
Design and evaluation of a compiler for embedded stream programs
LCTES '08Applications that combine live data streams with embedded, parallel, and distributed processing are becoming more commonplace. WaveScript is a domain-specific language that brings high-level, type-safe, garbage-collected programming to these domains. ...
Implementing an embedded compiler using program transformation rules
Domain-specific languages DSLs are well-recognized to ease programming and improve robustness for a specific domain, by providing high-level domain-specific notations and checks of domain-specific properties. The compiler of a DSL, however, is often ...
Compiling Embedded Programs to Byte Code
PADL '02: Proceedings of the 4th International Symposium on Practical Aspects of Declarative LanguagesFunctional languages have proven substantially useful for hosting embedded domain-specific languages. They provide an infrastructure rich enough to define both a convenient syntax for the embedded language, a type system for embedded programs, and an ...







Comments