Abstract
We present a domain-specific-language (DSL) for writing instances of a class of filter programs. The values in the language are symbolic and independent of a concrete precision. Efficient code generation is required to fit the program onto a target device limited in both memory and processing power. We construct an interpreter for the DSL in a language specific to the device which contains the semantics of the target instruction set embedded within a declarative meta-language. The compiler is automatically generated from the interpreter through specialisation. This extension of the instruction set allows the construction of an interpreter for the DSL that is both simple and clear. In particular it allows us to declare static representations of the symbolic values, and have the specialisation of the code produce operate upon these values in the instruction set of the target device.
This work was partially funded by the Information Society Technologies programme of the European Commission, Future and Emerging Technologies under the IST-2001-38059 ASAP project
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Microchip. PIC16F84 data sheet. Technical Report DS35007B, Microchip Technology Inc. (2001)
Willems, M., Bürsgens, V., Meyr, H.: FRIDGE: Floating-Point Programming of Fixed-Point Digital Signal Processors. In: Proc. Int. Conf. on Signal Processing Application and Technology (ICSPAT), San Diego, September 1997, pp. 1000–1005 (1997)
Kum, K.-I., Kang, J., Sung, W.: AUTOSCALER for C: An optimizing floating-point to integer C program converter for fixed-point digital signal processors. IEEE Transactions on Circuits and Systems-II: Analog and Digital Signal Processing 47(9), 840–848 (2000)
Cmar, R., Rijnders, L., Schaumont, P., Vernalde, S., Bolsens, I.: A methodology and design environment for DSP ASIC fixed-point refinement. In: DATE, p. 271 (1999)
Keding, H., Hürtgen, F., Willems, M., Coors, M.: Transformation of Floating-Point into Fixed-Point Algorithms by Interpolation Applying a Statistical Approach. In: Proc. Int. Conf. on Signal Processing Application and Technology (ICSPAT), Toronto (September 1998)
Hermenegildo, M., Bueno, F., Cabeza, D., de la Banda, M.G., López, P., Puebla, G.: The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems. In: Parallelism and Implementation of Logic and Constraint Logic Programming, pp. 65–85. Nova Science, USA (1999)
Hermenegildo, M.V., Bueno, F., Puebla, G., Lopez, P.: Program analysis, debugging, and optimization using the ciao system preprocessor. In: Proceedings of the 1999 international conference on Logic programming, Cambridge, MA, USA, pp. 52–66. Massachusetts Institute of Technology (1999)
Piumarta, I.: Delayed Code Generation in a Smalltalk-80 Compiler. PhD thesis, Department of Computer Science, University of Manchester (October 1992)
Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds.): DIKU 1998. LNCS, vol. 1706. Springer, Heidelberg (1999)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial evaluation and automatic program generation. Prentice-Hall, Inc., Upper Saddle River (1993)
Hudak, P.: Modular domain specific languages and tools. In: ICSR 1998: Proceedings of the 5th International Conference on Software Reuse, p. 134. IEEE Computer Society, Los Alamitos (1998)
Ganz, S.E., Sabry, A., Taha, W.: Macros as multi-stage computations: Type-safe, generative, binding macros in macroml. In: ICFP, pp. 74–85 (2001)
McCool, M., Toit, S.D., Popa, T., Chan, B., Moule, K.: Shader algebra. ACM Trans. Graph. 23(3), 787–795 (2004)
Elliott, C., Finne, S., de Moor, O.: Compiling embedded languages. In: Taha, W. (ed.) SAIG 2000. LNCS, vol. 1924, pp. 9–27. Springer, Heidelberg (2000)
Rhiger, M.: A foundation for embedded languages. ACM Trans. Program. Lang. Syst. 25(3), 291–315 (2003)
Langhammer, T., Herrmann, C.: Automatic staging for image processing. Number MIP-0410 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Moss, A., Muller, H. (2005). Efficient Code Generation for a Domain Specific Language. In: Glück, R., Lowry, M. (eds) Generative Programming and Component Engineering. GPCE 2005. Lecture Notes in Computer Science, vol 3676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561347_5
Download citation
DOI: https://doi.org/10.1007/11561347_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29138-1
Online ISBN: 978-3-540-31977-1
eBook Packages: Computer ScienceComputer Science (R0)