Abstract
When compiling Embedded Domain Specific Languages (EDSLs) into other languages, the compiler translates types in the source language into corresponding types in the target language. The translation is often driven by a small set of rules that map a single type in the source language into a single type in the target language. This simple approach is limiting when there are multiple possible mappings, and it may lead to poor interoperability and poor performance in the generated code. Instead of hard-wiring a single set of translation rules into a compiler, this paper introduces a small language that lets the programmer describe the mapping of each argument and function separately.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
Matlab Coder http://www.mathworks.com/products/matlab-coder.
- 6.
References
Axelsson, E., Dévai, G., Horváth, Z., Keijzer, K., Lyckegård, B., Persson, A., Sheeran, M., Svenningsson, J., Vajda, A.: Feldspar: a domain specific language for digital signal processing algorithms. In: Formal Methods and Models for Codesign, MemoCode. IEEE Computer Society (2010)
Axelsson, E., Claessen, K., Sheeran, M., Svenningsson, J., Engdal, D., Persson, A.: The design and implementation of Feldspar. In: Hage, J., Morazán, M.T. (eds.) IFL 2010. LNCS, vol. 6647, pp. 121–136. Springer, Heidelberg (2011)
Persson, A.: Towards a functional programming language for baseband signal processing. Thesis for the Degree of Licentiate of Engineering (2014). ISSN: 1652–876X
Svenningsson, J., Axelsson, E.: Combining deep and shallow embedding for EDSL. In: Loidl, H.-W., Peña, R. (eds.) TFP 2012. LNCS, vol. 7829, pp. 21–36. Springer, Heidelberg (2013)
Pfenning, F., Elliot, C.: Higher-order abstract syntax. In: Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, pp. 199–208. ACM, New York (1988)
Mainland, G.: Why it’s nice to be quoted: quasiquoting for Haskell. In: Proceedings of the ACM SIGPLAN Workshop on Haskell, pp. 73–82. ACM, New York (2007)
Chakravarty, M.M.: The Haskell 98 Foreign Function Interface 1.0 - An Addendum to the Haskell 98 Report (2003)
Chakravarty, M.M.: Foreign inline code: systems demonstration. In: Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell, pp. 119–120. ACM (2014)
MathWorks: MATLAB User’s Guide (MATLAB Coder), Version: 2011a. http://www.mathworks.com/help/toolbox/coder/index.html
Acknowledgements
This research is funded by the Swedish Foundation for Strategic Research (which funds the Resource Aware Functional Programming (RAW FP) Project) and the Swedish Research Council.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Persson, A., Axelsson, E. (2016). Programmable Signatures. In: Serrano, M., Hage, J. (eds) Trends in Functional Programming. TFP 2015. Lecture Notes in Computer Science(), vol 9547. Springer, Cham. https://doi.org/10.1007/978-3-319-39110-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-39110-6_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-39109-0
Online ISBN: 978-3-319-39110-6
eBook Packages: Computer ScienceComputer Science (R0)