1 / 22

Towards an Aspect-oriented Language Module: Aspects for Petri Nets

Towards an Aspect-oriented Language Module: Aspects for Petri Nets. Tim Molderez, Bart Meyers, Dirk Janssens and Hans Vangheluwe. Ansymo. Antwerp Systems and Software Modelling. Introduction. Building a language from scratch is a large effort: Construct languages by composing modules

blade
Download Presentation

Towards an Aspect-oriented Language Module: Aspects for Petri Nets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Towards an Aspect-oriented Language Module:Aspects for Petri Nets Tim Molderez, Bart Meyers, Dirk Janssens and Hans Vangheluwe Ansymo Antwerp Systems and Software Modelling

  2. Introduction • Building a language from scratch is a large effort:Construct languages by composing modules • Aspect-oriented versions of many different languages • What about an “aspect-oriented language module”? • Using the module will add aspect-oriented features to your language

  3. Introduction • Initial step towards an AO language module:Start with something completely different than commonly used base languages (e.g. Java) • … Petri nets! • Non-deterministic, minimal and a different purpose • How do typical AOP features work for Petri nets? • Design the AOP extension in a modular fashion

  4. Running example • P5-P8: represent rooms of a building • «enter», «exit» stereotypes: entrances and exits • Invariant: There may never be more than 30 people inside at the same time.

  5. Running example • VisitorCounter aspect: Keeps track of how many people are in the building • WaitingLine aspect: Prevents access if the building is fulland directs these people to a waiting line

  6. AOPN extension overview Base language (PN) Join point model Advice language Pointcut language Weaver Composition mechanism

  7. Join point model • Whenever a transition is about to fire. • Not affected by non-determinism: • Petri net execution has already chosen/determined among all enabled transitions which one will be fired.

  8. Weaver • When a join point is reached, pause Petri net execution. • Find all matching pointcuts, given the current state. • Use the composition mechanism to arrange the matched pointcuts in the right order. • Insert all corresponding advice into the Petri net, in the composition order. • Resume Petri net execution.

  9. VisitorCounter aspect • Keeps track of the number of people in the building

  10. increaseOnEnter pointcut-advice pair • Tracks all people entering

  11. transition pointcut construct • Captures all instances of transitions by name or stereotype

  12. Introductions: Allow places to be shared across advice instances and aspects • Introduced places can be a singleton, or per transition

  13. Input-output place binding

  14. Advice insertion in 3 steps: What happens if increaseOnEnter matches on T1

  15. Simple AspectJ-like precedence mechanism

  16. pertransition introduction: One waiting line per entrance

  17. tokens pointcut construct: If the building is full

  18. Proceed transition: If multiple pointcuts match, insert the next advice at the proceed transition • No proceed transition: To prevent a transition from firing

  19. Demo

  20. Conclusion • Initial step towards an AO language module:Aspect-oriented Petri nets • Future work • Study other base languages to refine concept of language module • Define the interactions between the module’s components • How does adding aspect affect Petri nets’ use for analysis • Petri nets suitable language to study interactions among aspects • Download this presentation at: http://tinyurl.com/dsal12aopn Contact: tim.molderez@ua.ac.be, bart.meyers@ua.ac.be | http://ansymo.ua.ac.be

  21. Mapping to Petri nets • moveToWaitingLine+ increaseOnEnter / preventEntrance • If building full • increaseOnEnter • If building not full • No advice • Never applies • decreaseOnEnter • Always applies

More Related