skip to main content
10.1145/2746325.2746334acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiflConference Proceedingsconference-collections
research-article

Stream Processing for Embedded Domain Specific Languages

Published: 01 October 2014 Publication History

Abstract

We present a library for expressing digital signal processing (DSP) algorithms using a deeply embedded domain-specific language (EDSL) in Haskell. The library supports definitions in functional programming style, reducing the gap between the mathematical description of streaming algorithms and their implementation. The deep embedding makes it possible to generate efficient C code. The signal processing library is intended to be an extension of the Feldspar EDSL which, until now, has had a rather low-level interface for dealing with synchronous streams. However, the presented library is independent of the underlying expression language, and can be used to extend any pure EDSL for which a C code generator exists with efficient stream processing capabilities. The library is evaluated using example implementations of common DSP algorithms and the generated code is compared to its handwritten counterpart.

References

[1]
Cisco visual networking index: Forecast and methodology, 2012--2017, May 2013. URL http://www.cisco.com/c/en/us/solutions/collateral/service-provider/ip-ngn-ip-next-generation-network/white_paper_c11-481360.pdf.
[2]
H. Apfelmus. The operational package, version 0.2.3.2. URL https://hackage.haskell.org/package/operational.
[3]
M. Aronsson. Signal processing for embedded domain specific languages, March 2015. URL https://hackage.haskell.org/package/signals.
[4]
E. Axelsson. Functional programming enabling flexible hardware design at low levels of abstraction. PhD thesis, Chalmers University of Technology, 2008.
[5]
E. Axelsson, K. Claessen, G. Dèvai, Z. Horvàth, K. Keijzer, B. Lyckegård, A. Persson, M. Sheeran, J. Svenningsson, and A. Vajda. Feldspar: A Domain Specific Language for Digital Signal Processing algorithms. In Formal Methods and Models for Codesign (MEMOCODE), 2010 8th IEEE/ACM International Conference on, pages 169--178, July 2010.
[6]
D. Biernacki, J.-L. Colaco, G. Hamon, and M. Pouzet. Clock-directed Modular Code Generation of Synchronous Data-flow Languages. In ACM International Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), June 2008.
[7]
P. Bjesse, K. Claessen, M. Sheeran, and S. Singh. Lava: hardware design in Haskell. In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming, ICFP '98, pages 174--184. ACM, 1998. ISBN 1-58113-024-4. URL http://doi.acm.org/10.1145/289423.289440.
[8]
T. Bourke and M. Pouzet. Zélus: A Synchronous Language with ODEs. In 16th International Conference on Hybrid Systems: Computation and Control (HSCC'13), pages 113--118, Mar. 2013. URL http://www.di.ens.fr/~pouzet/bib/hscc13.pdf.
[9]
P. Caspi and M. Pouzet. A co-iterative characterization of synchronous stream functions. Electronic Notes in Theoretical Computer Science, 11(0):1 -- 21, 1998. ISSN 1571-0661. URL http://www.sciencedirect.com/science/article/pii/S1571066104000507.
[10]
P. Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice. Lustre: A declarative language for real-time programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL '87, pages 178--188. ACM, 1987. ISBN 0-89791-215-2. URL http://doi.acm.org/10.1145/41625.41641.
[11]
K. Claessen. Embedded Languages for Describing and Verifying Hardware. PhD thesis, Chalmers University of Technology, 2001.
[12]
K. Claessen and D. Sands. Observable sharing for functional circuit description. In P. Thiagarajan and R. Yap, editors, Advances in Computing Science --- ASIAN'99, volume 1742 of Lecture Notes in Computer Science, pages 62--73. Springer Berlin Heidelberg, 1999. ISBN 978-3-540-66856-5. URL http://dx.doi.org/10.1007/3-540-46674-6_7.
[13]
J.-L. Colaço, A. Girault, G. Hamon, and M. Pouzet. Towards a Higher-order Synchronous Data-flow Language. In Proceedings of the 4th ACM International Conference on Embedded Software, EMSOFT '04, pages 230--239. ACM, 2004. ISBN 1-58113-860-1. URL http://doi.acm.org/10.1145/1017753.1017792.
[14]
A. Courtney, H. Nilsson, and J. Peterson. The Yampa Arcade. In Proceedings of the 2003 ACM SIGPLAN Workshop on Haskell, Haskell '03, pages 7--18. ACM, 2003. ISBN 1-58113-758-3. URL http://doi.acm.org/10.1145/871895.871897.
[15]
A. Gill. Type-safe Observable Sharing in Haskell. In Proceedings of the second ACM SIGPLAN Symposium on Haskell, Haskell '09, pages 117--128. ACM, 2009. ISBN 978-1-60558-508-6. URL http://doi.acm.org/10.1145/1596638.1596653.
[16]
A. Gill, T. Bull, G. Kimmell, E. Perrins, E. Komp, and B. Werling. Introducing Kansas Lava. In M. Morazán and S.-B. Scholz, editors, Implementation and Application of Functional Languages, volume 6041 of Lecture Notes in Computer Science, pages 18--35. Springer Berlin Heidelberg, 2010. ISBN 978-3-642-16477-4. URL http://dx.doi.org/10.1007/978-3-642-16478-1_2.
[17]
N. Halbwachs. Synchronous Programming of Reactive Systems. Number 215 in International Series in Engineering and Computer Science. Springer, 1993.
[18]
P. C. Hickey, L. Pike, T. Elliott, J. Bielman, and J. Launchbury. Building embedded systems with embedded DSLs. In Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming, ICFP '14, pages 3--9. ACM, 2014. ISBN 978-1-4503-2873-9. URL http://doi.acm.org/10.1145/2628136.2628146.
[19]
J. Hughes. Generalising Monads to Arrows. Science of Computer Programming, 37(1--3):67 -- 111, 2000. ISSN 0167-6423. URL http://www.sciencedirect.com/science/article/pii/S0167642399000234.
[20]
ITU. Global ITC development, 2001-2014, 2014. URL http://www.itu.int/en/ITU-D/Statistics/Documents/statistics/2014/stat_page_all_charts_2014.xls.
[21]
E. Lee and D. Messerschmitt. Synchronous data flow. Proceedings of the IEEE, 75(9):1235--1245, Sept 1987. ISSN 0018-9219.
[22]
H. Nilsson, A. Courtney, and J. Peterson. Functional Reactive Programming, Continued. In Proceedings of the 2002 ACM SIGPLAN Workshop on Haskell, Haskell '02, pages 51--64. ACM, 2002. ISBN 1-58113-605-6. URL http://doi.acm.org/10.1145/581690.581695.
[23]
A. V. Oppenheim, R. W. Schafer, J. R. Buck, et al. Discrete-time signal processing, volume 2. Prentice-hall Englewood Cliffs, 1989.
[24]
M. Pouzet. Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI, 2006. URL http://www.di.ens.fr/~pouzet/lucid-synchrone/manual_html/.
[25]
I. Sander. System Modeling and Design Refinement in ForSyDe. PhD thesis, Royal Institute of Technology, Stockholm, Sweden, April 2003. URL http://web.it.kth.se/~ingo/Papers/Thesis_Sander_2003.pdf.
[26]
N. Sculthorpe, J. Bracker, G. Giorgidze, and A. Gill. The constrained-monad problem. In Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming, ICFP '13, pages 287--298. ACM, 2013. ISBN 978-1-4503-2326-0. URL http://doi.acm.org/10.1145/2500365.2500602.
[27]
J. D. Svenningsson and B. J. Svensson. Simple and Compositional Reification of Monadic Embedded Languages. In Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming, ICFP '13, pages 299--304. ACM, 2013. ISBN 978-1-4503-2326-0. URL http://doi.acm.org/10.1145/2500365.2500611.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
IFL '14: Proceedings of the 26nd 2014 International Symposium on Implementation and Application of Functional Languages
October 2014
124 pages
ISBN:9781450332842
DOI:10.1145/2746325
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Digital Signal Processing
  2. Embedded domain specific language
  3. Stream processing
  4. code generation
  5. dataflow
  6. observable sharing
  7. synchronous programming

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • SSF
  • VR

Conference

IFL '14

Acceptance Rates

IFL '14 Paper Acceptance Rate 10 of 20 submissions, 50%;
Overall Acceptance Rate 19 of 36 submissions, 53%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)1
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Automatic Heterogeneous Runtime Using Signal Processing Domain-Specific and Parallel PatternsInternational Journal of Parallel Programming10.1007/s10766-025-00790-753:2Online publication date: 25-Feb-2025
  • (2021)Practical normalization by evaluation for EDSLsProceedings of the 14th ACM SIGPLAN International Symposium on Haskell10.1145/3471874.3472983(56-70)Online publication date: 18-Aug-2021
  • (2017)Hardware software co-design in HaskellACM SIGPLAN Notices10.1145/3156695.312297052:10(162-173)Online publication date: 7-Sep-2017
  • (2017)Hardware software co-design in HaskellProceedings of the 10th ACM SIGPLAN International Symposium on Haskell10.1145/3122955.3122970(162-173)Online publication date: 7-Sep-2017
  • (2016)Arrp: a functional language with multi-dimensional signals and recurrence equationsProceedings of the 4th International Workshop on Functional Art, Music, Modelling, and Design10.1145/2975980.2975983(17-28)Online publication date: 10-Sep-2016
  • (2016)Improving Latency in a Signal Processing System on the Epiphany Architecture2016 24th Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP)10.1109/PDP.2016.51(796-800)Online publication date: Feb-2016

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media