Skip to main content

Declaring and Enforcing Dependencies Between .NET Custom Attributes

  • Conference paper

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

Abstract

Custom attributes as e.g., supported by the .NET framework complemented by pre- or post-processing tools can be used to integrate domain-specific concepts into general-purpose language technology, representing an interesting alternative to domain-specific languages in supporting model-driven development. For this purpose, it is important that dependency relationships between custom attributes, e.g., stating that a certain attribute requires or excludes another attribute, can be specified and checked for during model processing (compilation). Such dependencies can be viewed as an important part of expressing the meta-model of the domain-specific concepts represented by custom attributes.

In this paper, we present an approach to specifying and enforcing dependencies between .NET custom attributes, which naturally extends the built-in .NET support. In this approach, dependencies are specified declaratively by using custom attributes to decorate other custom attributes. Once the dependency declaration is made part of the custom attribute support, one can write tools that enforce dependencies based on .NET meta-program API-s like CodeDom or Reflection. In this paper, we present such a tool, called ADC (for attribute dependency checker).

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. De Volder, K., Murphy, G.C., Bryant, A., Catton, A.: Explicit Programming. In: Proc. of AOSD 2002, pp. 10–18. ACM Press, New York (2002)

    Google Scholar 

  2. Aho, V., Sethi, R., Ullman, J.D.: Compilers Principles, Techniques and Tools. Addison Wesley, Reading (1988)

    Google Scholar 

  3. van Deursen, A., Klint, P., Visser, J.: Domain-Specific Languages. ACM SIGPLAN Notices 35, 26–36 (2000)

    Article  Google Scholar 

  4. McLaughlin, B.: Java and XML, 2nd edn. O’Reilly, Sebastopol (2001)

    Google Scholar 

  5. Frankel, D.S.: Model Driven Architecture - Applying MDA to Enterprise Computing. Wiley, Chichester (2003)

    Google Scholar 

  6. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison-Wesley, Reading (1995)

    Google Scholar 

  7. Roman, E., Ambler, S., Jewell, T.: Mastering Enterprise JavaBeans. Wiley, Chichester (2001)

    Google Scholar 

  8. Booch, G., Jacobson, I., Rumbaugh, J.: The Unified Modeling Language User Guide. Addison-Wesley, Reading (1998)

    Google Scholar 

  9. Hedin, G.: Attribute Extension - A Technique for Enforcing Programming Convetions. Nordic Jounral of Computing (1997)

    Google Scholar 

  10. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  11. Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–243. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  12. Zderadicka, I.: CS CODEDOM Parser (2002), http://ivanz.webpark.cz/csparser.html

  13. Liberty, J.: Programming C#. O’Reilly, Sebastopol (2001)

    Google Scholar 

  14. Newkirk, J., Vorontsov, A.: How.NET’s Custom Attributes Affect Design. IEEE SOFTWARE 19(5), 18–20 (2002)

    Article  Google Scholar 

  15. Czarnecki, K., Eisenecker, U.W.: Generative Programming. Addison-Wesley, Reading (2000)

    Google Scholar 

  16. Knuth, D.: The Genesis of Attribute Grammars. In: Proc. of International Workshop WAGA (1990)

    Google Scholar 

  17. Abadi, M., Banerjee, A., Heintze, N., Riecke, J.G.: A Core Calculus of Dependency. In: Proc. of the 26th ACM SIGPLAN-SIGACT on Principles of Programming Languages (POPL), pp. 147–160 (1999)

    Google Scholar 

  18. Shomrat, M., Yehudai, A.: Obvious or Not? Regulating Architectural Decisions Using Aspect-Oriented Programming. In: Proc. of Aspect-Oriented Software Development - AOSD 2001 (2001)

    Google Scholar 

  19. Voelter, M.: A Collection of Patterns for Program Generation. In: Proc. EuroPLoP (2003)

    Google Scholar 

  20. Voelter, M., Schmid, A., Wolf, E.: Server Components Patterns, Illustrated with EJB. Wiley & Sons, Chichester (2002)

    Google Scholar 

  21. Minsky, N.H.: Why Should Architectural Principles be Enforced. In: Proc. of IEEE Computer Security, Dependability, and Assurance: From Needs to Solutions (1998)

    Google Scholar 

  22. NET Framework MSDN Documentation (2002), ms-help.MS.VSCC/MS.MSDNVS/Netstart/html/sdkstart.htm

  23. Paige, R.: Future Directions in Program Transformations. ACM Computing Surveys 28, 170–170 (1996)

    Article  Google Scholar 

  24. Prosise, J.: Programming Microsoft.NET. Microsoft Press, Redmond (2002)

    Google Scholar 

  25. Cepa, V.: Implementing Tag-Driven Transformers with Tango. In: Bosch, J., Krueger, C. (eds.) ICOIN 2004 and ICSR 2004. LNCS, vol. 3107, pp. 296–307. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  26. Cepa, V., Mezini, M.: Language Support for Model-Driven Software Development (Editor M. Aksit) Special Issue Science of Computer Programming (Elsevier) on MDA: Foundations and Applications Model Driven Architecture (2004)

    Google Scholar 

  27. NET Attribute Dependency Checker (ADC) Tool (2003), http://www.st.informatik.tu-darmstadt.de/static/staff/Cepa/tools/adc/index.html

  28. Taha, W., Sheard, T.: Multi-stage Programming. ACM SIGPLAN Notices 32(8) (1997)

    Google Scholar 

  29. Meta Object Facility (MOF) Specification Version 1.4 (2002), http://www.omg.org

  30. PMD Java Source Code Scanner (2003), http://pmd.sourceforge.net

  31. Borland TogetherJ (2003), http://www.borland.com/together/

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 paper

Cite this paper

Cepa, V., Mezini, M. (2004). Declaring and Enforcing Dependencies Between .NET Custom Attributes. In: Karsai, G., Visser, E. (eds) Generative Programming and Component Engineering. GPCE 2004. Lecture Notes in Computer Science, vol 3286. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30175-2_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30175-2_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23580-4

  • Online ISBN: 978-3-540-30175-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics