Skip to main content

Grammars as Contracts

  • Conference paper
  • First Online:
Generative and Component-Based Software Engineering (GCSE 2000)

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

Abstract

Component-based development of language tools stands in need of meta-tool support. This support can be offered by generation of code — libraries or full-fledged components — from syntax definitions. We develop a comprehensive architecture for such syntax-driven meta-tooling in which grammars serve as contracts between components. This architecture addresses exchange and processing both of full parse trees and of abstract syntax trees, and it caters for the integration of generated parse and pretty-print components with tree processing components.

We discuss an instantiation of the architecture for the syntax definition formalism SDF, integrating both existing and newly developed meta-tools that support SDF. The ATerm format is adopted as exchange format. This instantiation gives special attention to adaptability, scalability, reusability, and maintainability issues surrounding language tool development.

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. J. Baeten and W. Weijland. Process Algebra. Cambridge Tracts in Theoretical Computer in Science18. Cambridge University Press, 1990.

    Google Scholar 

  2. J.A. Bergstra, J. Heering, and P. Klint. The algebraic specification formalism ASF. In J. Bergstra, J. Heering, and P. Klint, editors, Algebraic Specification, ACM Press Frontier Series, pages 1–66. The ACM Press in co-operation with Addison-Wesley, 1989.

    Google Scholar 

  3. J.A. Bergstra and P. Klint. The ToolBus coordination architecture. In P. Ciancarini and C. Hankin, editors, Coordination Languages and Models (COORDINATION’96), volume 1061 of Lecture Notes in Computer Science, pages 75–88. Springer-Verlag, 1996.

    Google Scholar 

  4. R.J. Boulton. SYN: A single language for specifying abstract syntax trees, lexical analysis, parsing and pretty-printing. Technical report, Computer laboratory, University of Cambridge, 1996.

    Google Scholar 

  5. M.G.J. van den Brand, H. A. de Jong, P. Klint, and P. A. Olivier. Effficient annotated terms. Software, Practice & Experience, 30(3):259–291, 2000.

    Article  Google Scholar 

  6. M.G.J. van den Brand, M. P. A. Sellink, and C. Verhoef. Generation of components for software renovation factories from context-free grammars. In Proceedings Fourth Working Conference on Reverse Engineering, pages 144–153. IEEE, 1997.

    Google Scholar 

  7. M.G.J. van den Brand, M. P. A. Sellink, and C. Verhoef. Current parsing techniques in software renovation considered harmful. In Proceedings of the sixth International Workshop on Program Comprehension, pages 108–117. IEEE, 1998.

    Google Scholar 

  8. T. Bray, J. Paoli, and C. M. Sperberg-McQueen. Extensible Markup Language (XML) 1. 0. Technical ReportREC-xml-19980210, World Wide Web Consortium, 1998.

    Google Scholar 

  9. A. van Deursen, J. Heering, and P. Klint, editors. Language Prototyping: An Algebraic Specification Approach, volume 5 of AMAST Series in Computing. World Scientific, 1996.

    Google Scholar 

  10. A. van Deursen and T. Kuipers. Building documentation generators. In Proceedings; IEEE International Conference on Software Maintenance, pages 40–49. IEEE Computer Society Press, 1999.

    Google Scholar 

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

    Article  Google Scholar 

  12. S. C. Johnson. YACC-Yet Another Compiler-Compiler. Technical Report Computer Science No. 32, Bell Laboratories, Murray Hill, New Jersey, 1975.

    Google Scholar 

  13. M. de Jonge. A Pretty-Printer for Every Occasion. In I. Ferguson, J. Gray, and L. Scott, editors, Proceedings of the 2nd International Symposium on Constructing Software Engineering Tools (CoSET2000). University of Wollongong, Australia, 2000.

    Google Scholar 

  14. J. Kort, R. Lammel, and J. Visser. Functional transformation systems. In Proceedings of the 9th International Workshop on Functional and Logic Programming, Sept. 2000.

    Google Scholar 

  15. J. Rekers. Parser Generation for Interactive Environments. PhD thesis, University of Amsterdam, 1992.

    Google Scholar 

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

    Google Scholar 

  17. E. Visser. Strategic pattern matching. In Rewriting & Techniques’ and Applications (RTA’99), volume 1631 of Lecture Notes in Computer Science pages 30–44. Springer-Verlag, 1999.

    Google Scholar 

  18. M. Wallace and C. Runciman. Haskell and XML: (Generic Combinators or Type-Based Translation? In International Conference on Functional Programming (ICFP’99), Paris, France, ACM SIGPLAN, Sept. 1999.

    Google Scholar 

  19. D. C. Wang, A. W. Appel, J. L. Korn, and C. S. Serra. The Zephyr abstract syntax description language. In Proceedings of the USENIX Conference on Domain-Specific Languages, pages 213–28, Berkeley, CA, Oct. 15-17 1997. USENIX Association.

    Google Scholar 

  20. D. S. Wile. Abstract syntax from concrete syntax. In Proceedings of the 19th International, Conference on Software Engineering (ICSE’ 97), pages 472–480, Berlin-Heidelberg-New York, May 1997. Springer

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

de Jonge, M., Visser, J. (2001). Grammars as Contracts. In: Butler, G., Jarzabek, S. (eds) Generative and Component-Based Software Engineering. GCSE 2000. Lecture Notes in Computer Science, vol 2177. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44815-2_7

Download citation

  • DOI: https://doi.org/10.1007/3-540-44815-2_7

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42578-6

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics