In the following exercises, we will demonstrate the use of AspectJ to check both static and dynamic invariants in the context of a graphical figure editor.
You can run the figure editor through the class figures.gui.Main
. Right-click it and select Run As → AspectJ/Java Application.
The source archive you downloaded contains a number of test suites. The tests of the suite CoreTest
should always pass. You can run them by right-clicking on this class and selecting Run As → JUnit Test.
The other test suites can be used to verify your answers to the following exercises.
Start the Invariants track at Exercise 1.