Skip to main content

Meta-language Support for Type-Safe Access to External Resources

  • Conference paper
Software Language Engineering (SLE 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7745))

Included in the following conference series:

Abstract

Meta-programming applications often require access to heterogeneous sources of information, often from different technological spaces (grammars, models, ontologies, databases), that have specialized ways of defining their respective data schemas. Without direct language support, obtaining typed access to this external, potentially changing, information is a tedious and error-prone engineering task. The Rascal meta-programming language aims to support the import and manipulation of all of these kinds of data in a type-safe manner. The goal is to lower the engineering effort to build new meta programs that combine information about software in unforeseen ways. In this paper we describe built-in language support, so called resources, for incorporating external sources of data and their corresponding data-types while maintaining type safety. We demonstrate the applicability of Rascal resources by example, showing resources for RSF files, CSV files, JDBC-accessible SQL databases, and SDF2 grammars. For RSF and CSV files this requires a type inference step, allowing the data in the files to be loaded in a type-safe manner without requiring the type to be declared in advance. For SQL and SDF2 a direct translation from their respective schema languages into Rascal is instead constructed, providing a faithful translation of the declared types or sorts into equivalent types in the Rascal type system. An overview of related work and a discussion conclude the paper.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The Enhydra Project: The Zeus Java-to-XML Data Binding tool (2002), http://zeus.ow2.org/

  2. The ExoLab Group: Castor (2002), http://www.castor.org

  3. Bouwers, E., Bravenboer, M., Visser, E.: Grammar Engineering Support for Precedence Rule Recovery and Compatibility Checking. In: Proceedings of LDTA 2007. ENTCS, vol. 203, pp. 85–101. Elsevier (2008)

    Google Scholar 

  4. XML/Java Data Binding and Breeze XML Binder. Technical report, The Breeze Factor (2002), http://www.breezefactor.com/whitepapers.html

  5. Cook, W., Ibrahim, A.: Integrating Programming Languages and Databases: What is the Problem? ODBMS.ORG (September 2006) Expert Article

    Google Scholar 

  6. de Jong, H., Olivier, P.: Generation of abstract programming interfaces from syntax definitions. Journal of Logic and Algebraic Programming 59, 35–61 (2004)

    Article  MATH  Google Scholar 

  7. Heering, J., Hendriks, P., Klint, P., Rekers, J.: The syntax definition formalism SDF - reference manual. SIGPLAN Notices 24(11), 43–75 (1989)

    Article  Google Scholar 

  8. Hills, M., Klint, P., Vinju, J.J.: RLSRunner: Linking Rascal with K for Program Analysis. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 344–353. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  9. Klint, P., Lämmel, R., Verhoef, C.: Toward an engineering discipline for Grammarware. ACM TOSEM 14(3), 331–380 (2005)

    Article  Google Scholar 

  10. Klint, P., van der Storm, T., Vinju, J.: EASY Meta-programming with Rascal. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 222–289. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  11. Maier, D.: Representing Database Programs as Objects. In: Advances in Database Programming Languages, Papers from DBPL-1, Roscoff, France, pp. 377–386 (September 1987)

    Google Scholar 

  12. Melnik, S., Adya, A., Bernstein, P.A.: Compiling Mappings to Bridge Applications and Databases. In: Proceedings of SIGMOD 2007, pp. 461–472. ACM (2007)

    Google Scholar 

  13. Müller, H., Klashinsky, K.: Rigi - A System for Programming-in-the-Large. In: Proceedings of ICSE 10, pp. 80–86 (April 1988)

    Google Scholar 

  14. Ritchie, D., Thompson, K.: The UNIX Time-Sharing System. The Bell System Technical Journal 57(6) (July-August 1978)

    Google Scholar 

  15. van de Riet, R.P., Wasserman, A.I., Kersten, M.L., de Jonge, W.: High-Level Programming Features for Improving the Efficiency of a Relational Database System. ACM Trans. Database Syst. 6(3), 464–485 (1981)

    Article  Google Scholar 

  16. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (1997)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hills, M., Klint, P., Vinju, J.J. (2013). Meta-language Support for Type-Safe Access to External Resources. In: Czarnecki, K., Hedin, G. (eds) Software Language Engineering. SLE 2012. Lecture Notes in Computer Science, vol 7745. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-36089-3_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-36089-3_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-36088-6

  • Online ISBN: 978-3-642-36089-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics