Skip to main content

Guaranteed Optimization for Domain-Specific Programming

  • Chapter

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3016))

Abstract

For software engineering reasons, it is often best to provide domain-specific programming environments in the context of a general-purpose language. In our view general-purpose languages are not yet general-purpose enough, and progress needs to be made before we can provide domain-specific languages that are both fast and safe. We outline some goals in this regard, and describe a possible implementation technology: guaranteed optimization, a technique for building compilers that provide proven guarantees of what optimizations they perform. Such optimizers can provide capabilities similar to staged languages, and thus provide the relevant performance improvements. They can also function as decision procedures, suggesting an approach of ‘optimizers as theorem provers,’ in which optimizing compilers can be used to check domain-specific safety properties and check proofs embedded in programs.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Fischer, B., Visser, E.: Retrofitting the autobayes program synthesis system with concrete syntax. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 239–253. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  2. Hudak, P.: Building domain-specific embedded languages. ACM Computing Surveys 28, 196–196 (1996)

    Article  Google Scholar 

  3. Thomas, W.: Logic for computer science: The engineering challenge. In: Wilhelm, R. (ed.) Informatics: 10 Years Back, 10 Years Ahead. LNCS, vol. 2000, pp. 257–267. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  4. Stepanov, A.: Abstraction penalty benchmark (1994)

    Google Scholar 

  5. Robison, A.D.: The abstraction penalty for small objects in C++. In: POOMA 1996: The Parallel Object-Oriented Methods and Applications Conference, Santa Fe, New Mexico (1996)

    Google Scholar 

  6. Müller, M.: Abstraction benchmarks and performance of C++ applications. In: Proceedings of the Fourth International Conference on Supercomputing in Nuclear Applications (2000)

    Google Scholar 

  7. Wolfe, M.J.: High Performance Compilers for Parallel Computing. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  8. Robison, A.D.: Impact of economics on compiler optimization. In: ISCOPE Conference on ACM 2001 Java Grande, pp. 1–10. ACM Press, New York (2001)

    Chapter  Google Scholar 

  9. Veldhuizen, T.L., Gannon, D.: Active libraries: Rethinking the roles of compilers and libraries. In: Proceedings of the SIAM Workshop on Object Oriented Methods for Inter-operable Scientific and Engineering Computing (OO 1998). SIAM Press, Philadelphia (1999)

    Google Scholar 

  10. Czarnecki, K., Eisenecker, U.W., Glück, R., Vandevoorde, D., Veldhuizen, T.L.: Generative programming and active libraries (extended abstract). In: Jazayeri, M., Musser, D.R., Loos, R.G.K. (eds.) Dagstuhl Seminar 1998. LNCS, vol. 1766, pp. 25–39. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  11. Botorog, G.H., Kuchen, H.: Efficient parallel programming with algorithmic skeletons. In: Fraigniaud, P., Mignotte, A., Bougé, L., Robert, Y. (eds.) Euro-Par 1996. LNCS, vol. 1123, pp. 718–731. Springer, Heidelberg (1996)

    Google Scholar 

  12. Küchen, H.: Optimizing sequences of skeleton calls. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 254–273. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  13. Lamping, J., Kiczales, G., Rodriguez, L., Ruf, E.: An architecture for an open compiler. In: Yonezawa, A., Smith, B.C. (eds.) Proceedings of the International Workshop on New Models for Software Architecture 1992: Reflection and Metalevel Architecture (1992)

    Google Scholar 

  14. Chiba, S.: A Metaobject Protocol for C++. In: OOPSLA 1995, pp. 285–299 (1995)

    Google Scholar 

  15. Ishikawa, Y., Hori, A., Sato, M., Matsuda, M., Nolte, J., Tezuka, H., Konaka, H., Maeda, M., Kubota, K.: Design and implementation of metalevel architecture in C++ – MPC++ approach. In: Reflection 1996 (1996)

    Google Scholar 

  16. Engler, D.R.: Incorporating application semantics and control into compilation. In: USENIX Conference on Domain-Specific Languages (DSL 1997), October 15- 17 (1997)

    Google Scholar 

  17. Guyer, S.Z., Lin, C.: An annotation language for optimizing software libraries. In: Domain-Specific Languages, pp. 39–52 (1999)

    Google Scholar 

  18. Visser, E., Benaissa, Z.e.A., Tolmach, A.: Building program optimizers with rewriting strategies. ACM SIGPLAN Notices 34, 13–26 (1999); Proceedings of the International Conference on Functional Programming (ICFP 1998)

    Article  Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Schupp, S., Gregor, D., Musser, D., Liu, S.M.: User-extensible simplification–typebased optimizer generators. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 86–101. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  21. Nielson, F., Neilson, H.R.: Two-Level Functional Languages. Cambridge University Press, Cambridge (1992)

    Book  MATH  Google Scholar 

  22. Taha, W., Sheard, T.: MetaML and multi-stage programming with explicit annotations. Theoretical Computer Science 248, 211–242 (2000)

    Article  MATH  Google Scholar 

  23. Jones, N.D., Nielson, F.: Abstract interpretation. In: Abramsky, S., Gabbay, D., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science, vol. 4. Oxford University Press, Oxford (1995) (to appear)

    Google Scholar 

  24. Kelsey, R., Clinger, W.: Revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices 33, 26–76 (1998)

    Google Scholar 

  25. Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1991)

    Google Scholar 

  26. Evans, D., Guttag, J., Horning, J., Tan, Y.: LCLint: a Tool for Using Specifications to Check Code. In: Wile, D. (ed.) Proc. 2nd ACM SIGSOFT Symp. on Foundations of Software Engineering, New Orleans, USA. ACM SIGSOFT Software Engineering Notes, vol. 19(5), pp. 87–96 (1994)

    Google Scholar 

  27. Engler, D., Chelf, B., Chou, A., Hallem, S.: Checking system rules using systemspecific, programmer-written compiler extensions. In: Proceedings of Operating Systems Design and Implementation, OSDI (2000)

    Google Scholar 

  28. Leino, K.R.M.: Extended static checking: A ten-year perspective. In: Wilhelm, R. (ed.) Informatics: 10 Years Back, 10 Years Ahead. LNCS, vol. 2000, pp. 157–175. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  29. Ball, T., Rajamani, S.K.: The SLAM project: debugging system software via static analysis. In: Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 1–3. ACM Press, New York (2002)

    Chapter  Google Scholar 

  30. Owre, S., Rushby, J., Shankar, N., Stringer-Calvert, D.: PVS: an experience report. In: Hutter, D., Stephan, W., Traverso, P., Ullman, M. (eds.) FM-Trends 1998. LNCS, vol. 1641, pp. 338–345. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  31. Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. International Series in Computer Sciences. Prentice-Hall, London (1992)

    Google Scholar 

  32. Jones, C.B.: Systematic Software Development Using VDM, 2nd edn. Prentice-Hall International, Englewood Cliffs (1990); ISBN 0-13-880733-7

    MATH  Google Scholar 

  33. Flanagan, C., Abadi, M.: Types for safe locking. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, p. 91. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  34. Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: Proceedings of the 17th ACM conference on Object-oriented programming, systems, languages, and applications, pp. 211–230. ACM Press, New York (2002)

    Chapter  Google Scholar 

  35. Xi, H., Pfenning, F.: Eliminating array bound checking through dependent types. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 249–257 (1998)

    Google Scholar 

  36. Volpano, D.M., Smith, G.: A type-based approach to program security. In: Bidoit, M., Dauchet, M. (eds.) TAPSOFT 1997. LNCS, vol. 1214, pp. 607–621. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  37. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: Proceeding of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pp. 234–245. ACM Press, New York (2002)

    Chapter  Google Scholar 

  38. Kennedy, A.: Dimension types. In: Sannella, D. (ed.) ESOP 1994. LNCS, vol. 788, pp. 348–362. Springer, Heidelberg (1994)

    Google Scholar 

  39. Veldhuizen, T.L.: C++ templates as partial evaluation. In: Danvy, O. (ed.) ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pp. 13–18. Technical report BRICS-NS-99-1, University of Aarhus, San Antonio, Texas, University of Aarhus, Dept. of Computer Science (1999)

    Google Scholar 

  40. Karmesin, S., Crotinger, J., Cummings, J., Haney, S., Humphrey, W., Reynders, J., Smith, S., Williams, T.: Array design and expression evaluation in POOMA II. In: Caromel, D., Oldehoeft, R.R., Tholburn, M. (eds.) ISCOPE 1998. LNCS, vol. 1505, pp. 231–238. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  41. Veldhuizen, T.L.: Arrays in Blitz++. In: Caromel, D., Oldehoeft, R.R., Tholburn, M. (eds.) ISCOPE 1998. LNCS, vol. 1505, pp. 223–230. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  42. Siek, J.G., Lumsdaine, A.: The Matrix Template Library: A generic programming approach to high performance numerical linear algebra. In: Caromel, D., Oldehoeft, R.R., Tholburn, M. (eds.) ISCOPE 1998. LNCS, vol. 1505, pp. 59–70. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  43. Neubert, T.: Anwendung von generativen programmiertechniken am beispiel der matrixalgebra. Master’s thesis, Technische Universität Chemnitz, Diplomarbeit (1998)

    Google Scholar 

  44. McNamara, B., Smaragdakis, Y.: Static interfaces in C++. In: First Workshop on C++ Template Programming, Erfurt, Germany (2000)

    Google Scholar 

  45. Siek, J., Lumsdaine, A.: Concept checking: Binding parametric polymorphism in C++. In: First Workshop on C++ Template Programming, Erfurt, Germany (2000)

    Google Scholar 

  46. Brown, W.E.: Applied template metaprogramming in SIUnits: The library of united-based computation. In: Second Workshop on C++ Template Programming (2001)

    Google Scholar 

  47. Horn, K.S.V.: Compile-time assertions in C++. C/C++ Users Journal (1997)

    Google Scholar 

  48. Järvi, J., Willcock, J., Hinnant, H., Lumsdaine, A.: Function overloading based on arbitrary properties of types. C/C++ Users Journal 21, 25–32 (2003)

    Google Scholar 

  49. Veldhuizen, T.L.: Active Libraries and Universal Languages. PhD thesis, Indiana University Computer Science (2004) (forthcoming)

    Google Scholar 

  50. Veldhuizen, T.L., Lumsdaine, A.: Guaranteed optimization: Proving nullspace properties of compilers. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 263–277. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  51. Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems 13, 181–210 (1991)

    Article  Google Scholar 

  52. Click, C., Cooper, K.D.: Combining analyses, combining optimizations. ACM Transactions on Programming Languages and Systems 17, 181–196 (1995)

    Article  Google Scholar 

  53. Wei, J.: Correctness of fixpoint transformations. Theoretical Computer Science 129, 123–142 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  54. Courcelle, B., Kahn, G., Vuillemin, J.: Algorithmes d’équivalence et de réduction à des expressions minimales dans une classe d’équations récursives simples. In: Loeckx, J. (ed.) ICALP 1974. LNCS, vol. 14, pp. 200–213. Springer, Heidelberg (1974)

    Google Scholar 

  55. Milner, R.: Communication and Concurrency. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1989)

    MATH  Google Scholar 

  56. Rutten, J.J.M.M.: Universal coalgebra: a theory of systems. Theoretical Computer Science 249, 3–80 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  57. Veldhuizen, T.L., Siek, J.G.: Combining optimizations, combining theories. Technical Report TR582, Indiana University Computer Science (2003)

    Google Scholar 

  58. Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Transactions on Programming Languages and Systems (TOPLAS) 1, 245–257 (1979)

    Article  MATH  Google Scholar 

  59. Sørensen, M.H., Urzyczyn, P.: Lectures on the Curry-Howard isomorphism. Technical report TOPPS D-368, Univ. of Copenhagen (1998)

    Google Scholar 

  60. Necula, G.C.: Proof-carrying code. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages, Paris, France (1997)

    Google Scholar 

  61. Veldhuizen, T.L.: Five compilation models for C++ templates. In: First Workshop on C++ Template Programming, Erfurt, Germany (2000)

    Google Scholar 

  62. Futamura, Y., Nogi, K.: Generalized partial computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Proceedings of the IFIP Workshop on Partial Evaluation and Mixed Computation. North-Holland, Amsterdam (1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Veldhuizen, T.L. (2004). Guaranteed Optimization for Domain-Specific Programming. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds) Domain-Specific Program Generation. Lecture Notes in Computer Science, vol 3016. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25935-0_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-25935-0_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22119-7

  • Online ISBN: 978-3-540-25935-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics