Aspect-Oriented Software Development (AOSD) - 236608
(Due on 18/03/08)
The goal of this assignment is to give you an experience in:
- detecting “natural” and useful aspects for a given system
- writing different kinds of aspects in AspectJ
- describing aspects by assume-guarantee specifications
- determining aspects categories
1. The submission is in pairs, both electronically and by a hard copy.
2. The submission should include:
a. code of the aspects
b. documentation (short comments inside the code)
c. sample execution output
d. (only in the hard-copy, of course) – answer to Question 2.
You are given a base system, which is far from being perfect and can be improved, in
a natural way, by adding aspects to it. Your task is to write at least four aspects for
this system, while the following criteria should be met:
- Among the (at least) 4 aspects you write there should be at least one aspect of each
category (spectative, regulative, weakly invasive and strongly invasive)
- There should be at least one case of "aspect applied over another aspect", that is, a
join-point of some aspect should occur in the advice of another aspect.
- There should be at least one potentially reusable aspect: aspect that can be
reasonably reused for some other base system, for example – for the RationalExam
system from Home task 1.
- The aspects should be natural. In other words, adding this particular aspect to this
particular system should make sense and even be useful.
- The aspects should not be trivial (extra points will be added for originality and non-
triviality of the aspects).
You are allowed, but do not have to add functionality to the base system in order to
enable (and justify) adding your aspects.
Base system description:
The system given is a shopping mall parking system. The parking of the shopping
mall has three entrances, and three exits. At each entrance there is a ticket automat
that prints entrance tickets for the drivers. The ticket stores the arrival time. At each
exit there is a payment machine, which collects the ticket from the driver, calculates
the payment and opens the gate after the payment is received (only exact payment is
For each of the aspects you write, answer the following questions:
a. What is the category of the aspect? Explain.
b. Is it potentially reusable?
c. Write a possible assume-guarantee specification of the aspect (informally -
just a couple of sentences in natural language)