Advertisement

Resource-Safe Systems Programming with Embedded Domain Specific Languages

  • Edwin Brady
  • Kevin Hammond
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7149)

Abstract

We introduce a new overloading notation that facilitates programming, modularity and reuse in Embedded Domain Specific Languages (EDSLs), and use it to reason about safe resource usage and state management. We separate the structural language constructs from our primitive operations, and show how precisely-typed functions can be lifted into the EDSL. In this way, we implement a generic framework for constructing state-aware EDSLs for systems programming.

Keywords

Dependent Types Resource Usage (Embedded) Domain-Specific Languages Program Verification 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Augustsson, L., Carlsson, M.: An exercise in dependent types: A well-typed interpreter (1999)Google Scholar
  2. 2.
    Bhatti, S., Brady, E., Hammond, K., McKinna, J.: Domain specific languages (DSLs) for network protocols. In: International Workshop on Next Generation Network Architecture, NGNA 2009 (2009)Google Scholar
  3. 3.
    Brady, E.: Ivor, a Proof Engine. In: Horváth, Z., Zsók, V., Butterfield, A. (eds.) IFL 2006. LNCS, vol. 4449, pp. 145–162. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Brady, E.: Epic — a library for generating compilers. In: Trends in Functional Programming, TFP 2011 (to appear, 2011)Google Scholar
  5. 5.
    Brady, E.: Idris — systems programming meets full dependent types. In: Programming Languages meets Program Verification (PLPV 2011), pp. 43–54 (2011)Google Scholar
  6. 6.
    Brady, E., Hammond, K.: A Verified Staged Interpreter is a Verified Compiler. In: Proc. GPCE 2006: Conf. on Generative Prog. and Component Eng. (2006)Google Scholar
  7. 7.
    Brady, E., Hammond, K.: Correct-by-construction concurrency: Using dependent types to verify implementations of effectful resource usage protocols. Fundamenta Informaticae 102(2), 145–176 (2010)MathSciNetzbMATHGoogle Scholar
  8. 8.
    Brady, E., Hammond, K.: Scrapping your Inefficient Engine: using Partial Evaluation to Improve Domain-Specific Language Implementation. In: Proc. ICFP 2010: ACM Intl. Conf. on Functional Programming, pp. 297–308 (2010)Google Scholar
  9. 9.
    Chapman, J., Dagand, P.-E., McBride, C., Morris, P.: The Gentle Art of Levitation. In: Proc. ICFP 2010: ACM Intl. Conf. on Funct. Prog., pp. 3–14 (2010)Google Scholar
  10. 10.
    Hawblitzel, C.: Linear types for aliased resources. Technical Report MSR-TR-2005-141, Microsoft Research (2005)Google Scholar
  11. 11.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order function al programs. In: Proc. POPL 2003 — 2003 ACM Symp. on Principles of Programming La nguages, pp. 185–197. ACM (2003)Google Scholar
  12. 12.
    Hudak, P.: Building domain-specific embedded languages. ACM Computing Surveys 28A(4) (December 1996)Google Scholar
  13. 13.
    Igarashi, A., Kobayashi, N.: Resource usage analysis. ACM Trans. Program. Lang. Syst. 27, 264–313 (2005)CrossRefzbMATHGoogle Scholar
  14. 14.
    Landin, P.: The next 700 programming languages. Communications of the ACM 9(3) (March 1966)Google Scholar
  15. 15.
    Marriott, K., Stuckey, P., Sulzmann, M.: Resource Usage Verification. In: Ohori, A. (ed.) APLAS 2003. LNCS, vol. 2895, pp. 212–229. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1), 69–111 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18, 1–13 (2008)CrossRefzbMATHGoogle Scholar
  18. 18.
    Nanevski, A., Morrisett, G., Shinnar, A., Govereau, P., Birkedal, L.: Ynot: Reasoning with the Awkward Squad. In: Proc. ICFP 2008: 2008 ACM Intl. Conf. on Functional Programming, pp. 229–240. ACM (2008)Google Scholar
  19. 19.
    Norell, U.: Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology (September 2007)Google Scholar
  20. 20.
    Pašalíc, E., Taha, W., Sheard, T.: Tagless Staged Interpreters for Typed Languages. In: Proc. ICFP 2002: Intl. Conf. on Functional Programming. ACM (2002)Google Scholar
  21. 21.
    Walker, D.: A Type System for Expressive Security Policies. In: Proc. POPL 2000: ACM Intl. Symp. on Principles of Programming Languages, pp. 254–267 (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Edwin Brady
    • 1
  • Kevin Hammond
    • 1
  1. 1.University of St AndrewsScotland, UK

Personalised recommendations