Aspect-Oriented Programming with the e Verification Language

Book description

What’s this AOP thing anyway, really—when you get right down to it—and can someone please explain what an aspect actually is?

Aspect-Oriented Programming with the e Verification Language takes a pragmatic, example based, and fun approach to unraveling the mysteries of AOP. In this book, you’ll learn how to:

• Use AOP to organize your code in a way that makes it easy to deal with the things you really care about in your verification environments. Forget about organizing by classes, and start organizing by functionality, layers, components, protocols, functional coverage, checking, or anything that you decide is important to you
• Easily create flexible code that eases your development burden, and gives your users the power to quickly do what they need to do with your code
• Truly create a plug-and-play environment that allows you to add and remove functionality without modifying your code. Examples include how to use AOP to create pluggable debug modules, and a pluggable module that lets you check that your testbench is still working before you begin a regression
• Utilize AOP to sidestep those productivity roadblocks that seem to plague all projects at the most inconvenient of times
• Discover why “return” is evil, and some other “gotchas” with the AOP features of e
All of the methodologies, tips, and techniques described in this book have been developed and tested on real projects, with real people, real schedules and all of the associated problems that come with these. Only the ones that worked, and worked well, have made it in, so by following the advice given in this book, you’ll gain access to the true power of AOP while neatly avoiding the effort of working it all out yourself.

• Use AOP to organize your code in a way that makes it easy to deal with the things you really care about in your verification environments. Forget about organizing by classes, and start organizing by functionality, layers, components, protocols, functional coverage, checking, or anything that you decide is important to you
• Easily create flexible code that eases your development burden, and gives your users the power to quickly do what they need to do with your code
• Truly create a plug-and-play environment that allows you to add and remove functionality without modifying your code. Examples include how to use AOP to create pluggable debug modules, and a pluggable module that lets you check that your testbench is still working before you begin a regression
• Utilize AOP to sidestep those productivity roadblocks that seem to plague all projects at the most inconvenient of times
• Discover why “return” is evil, and some other “gotchas” with the AOP features of e

Table of contents

  1. Copyright
  2. Acknowledgments
  3. Foreword
  4. Preface
    1. Who is this book for?
    2. What is it about?
    3. Why did I write this book?
    4. How should I use the book?
    5. My top tip
    6. Typographical conventions
  5. About Verilab
  6. 1. Introduction to Aspect Oriented Programming (AOP)
    1. 1.1. What are aspects? — Part I
    2. 1.2. Why do I need aspects? What’s wrong with crosscutting concerns?
    3. 1.3. Surely OOP doesn’t have any problems?
    4. 1.4. Why does AOP help?
    5. 1.5. Theory vs real life — What else is AOP good for?
    6. 1.6. What are aspects? — Part II
  7. 2. AOP in e
    1. Introduction
      1. Introductions into classes
      2. Introductions into enumerated types
      3. Introductions into cover groups
    2. Advice
      1. Methodjoin points
      2. Eventjoin points
      3. Cover group and cover item join points.
    3. Extension
    4. 2.1. How do I extend a class?
    5. 2.2. How do I extend a class for multiple values of a determinant?
    6. 2.3. How do I extend a type?
    7. 2.4. How do I introduce a new noncoverage member to a class?
    8. 2.5. How do I introduce a coverage group to a class?
    9. 2.6. How do I extend a coverage group?
    10. 2.7. How do I change the behavior of a method?
    11. 2.8. How do I limit the scope of my extensions?
      1. Member name collision
      2. Predefined determinant name collision
      3. Feature leak
      4. Functionality clash
      5. Namespace pollution
    12. 2.9. Using return in method advice
    13. 2.10. Controlling the order of method extension calls
  8. 3. Using AOP to Organize Your Code
    1. 3.1. A word about style
    2. 3.2. What aspects do I want to use?
      1. Is this something I want to find again easily?
      2. Is this something I want to conditionally include at compile time?
      3. Is this something I want to isolate so I can assign it to someone?
      4. Is this something I want to isolate for review purposes?
      5. Is this dangerous code I can’t afford to forget about?
      6. Is this something that is obviously sliceable?
      7. Does this code prevent me from reusing the class/agent/eVC?
      8. Do I want/need to make this change noninvasively?
    3. 3.3. Mapping aspects to files
  9. 4. Creating Flexible Code
  10. 5. Creating Pluggable Code
    1. 5.1. The extendable case statement
    2. 5.2. The factory pattern
  11. 6. Improving Your Productivity
    1. 6.1. Shifting the power
    2. 6.2. Dealing with broken code
    3. 6.3. Handling workarounds
    4. 6.4. Reducing and deferring class complexity
    5. 6.5. Adding problem-specific functionality
    6. 6.6. Reducing the OOP-induced overhead
  12. 7. AOP in Action
    1. 7.1. Creating a class with a selectable algorithm
    2. 7.2. Creating a configuration interface for an eVC
    3. 7.3. Using aspects to create a layered verification environment
    4. 7.4. Creating reusable layered sequences
    5. 7.5. Testing your verification environment
    6. 7.6. Debugging using AOP
    7. 7.7. Encapsulating tests
  13. 8. Analyzing e Code
    1. 8.1. The e toolkit
    2. 8.2. Finding class declarations and extensions
    3. 8.3. Finding the class inheritance hierarchy
    4. 8.4. Finding the determinants used by a class
    5. 8.5. Finding method declarations and extensions
    6. 8.6. Finding field declarations
    7. 8.7. Finding event declarations
    8. 8.8. Finding enumerated type declarations and extensions
    9. 8.9. How do I find where a value is added to a type?
    10. 8.10. Finding cover group declarations and extensions
    11. 8.11. Finding the source of a message in the log file
    12. 8.12. Finding aspects
  14. Bibliography
  15. Epilogue

Product information

  • Title: Aspect-Oriented Programming with the e Verification Language
  • Author(s): David Robinson
  • Release date: July 2010
  • Publisher(s): Morgan Kaufmann
  • ISBN: 9780080551555