<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://soft.vub.ac.be/ajtraining/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://soft.vub.ac.be/ajtraining/feed.php">
        <title>AspectJ 5 Training - invariant</title>
        <description></description>
        <link>https://soft.vub.ac.be/ajtraining/</link>
        <image rdf:resource="https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png" />
       <dc:date>2026-05-20T02:42:48+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:ex1?rev=1612529605&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:ex2?rev=1612529605&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:ex3?rev=1612529605&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:ex4?rev=1612529605&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:ex5?rev=1612529605&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/invariant:intro?rev=1612529605&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png">
        <title>AspectJ 5 Training</title>
        <link>https://soft.vub.ac.be/ajtraining/</link>
        <url>https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png</url>
    </image>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:ex1?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex1</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:ex1?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Find old tracing

Task: Signal an error for output on the standard output channel System.out.

We typically use the idiom System.out.println() for one-off debugging traces. It&#039;s a common mistake to leave these in your system far longer than is necessary. Create an aspect with the implementation given below to signal an error at compile time if this mistake is made.</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:ex2?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex2</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:ex2?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Mandate setters

Task: Signal a warning for assignments to private fields outside of setter methods.

One common coding convention is that no private field should be assigned to outside of setter methods. Write an aspect to signal a warning at compile time for these illegal assignment expressions.</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:ex3?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex3</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:ex3?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Preconditions

Point Preconditions

Task: Pass the suite tests.PointPreconditions.

Write an aspect to throw an IllegalArgumentException whenever an attempt is made to set one of the int fields of a Point to a value that is less than zero.</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:ex4?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex4</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:ex4?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Sanitize input

Task: Pass tests.PointBounds.

Instead of throwing an exception when one of the int fields of Point is set to a negative value, write an aspect to trim the value to zero.
Tools:aroundaroundproceed

Your aspect is going to look like this:</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:ex5?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex5</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:ex5?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Postconditions

Point Move Postcondition

Task: Pass tests.PointMovePostcondition.

A postcondition of the move operation of a Point is that the coordinates should change accordingly. If a call to move didn&#039;t actually move a point by the desired offset, then the point is in an illegal state and so an</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/invariant:intro?rev=1612529605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:53:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>intro</title>
        <link>https://soft.vub.ac.be/ajtraining/invariant:intro?rev=1612529605&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5

Invariants: Intro

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.

Set-up

	*  Create a new AspectJ Project in Eclipse
	*  Download the source of the figure editor:</description>
    </item>
</rdf:RDF>
