Re: [abc-users] Relational aspects running time

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Sun, 16 Mar 2008 16:30:50 -0400

Hi, Alan.

Your benchmark is way too small to conclude anything at all about running time.

In general, as we write in the paper, relational aspects *are* slower
than the implementation by Sakurai et al.. However, there should be no
exponential increase.

Eric

On 16/03/2008, Alan Teoh <alan.teoh07_at_imperial.ac.uk> wrote:
> Hello,
>
> I have been playing around with relational aspects, and I stumbled upon
> a problem with its running time. Code is as follows (using Sakurai et
> al's Bit idea from association aspects, as well as the relational aspect
> from the relational aspects paper):
>
> class Bit {
> boolean value = false;
> public void set() { value = true; }
> public void clear() { value = false; }
> boolean get() { return value; }
> }
>
> Relational aspect is as follows:
>
> relational aspect Equality(Bit b1, Bit b2) {
> relational after(): call(public void Bit.set()) && target(b1) {
> b2.set();
> }
> relational after(): call(public void Bit.clear()) && target(b1) {
> b2.clear();
> }
> }
>
> Using this Test file:
> class Test {
> public static void main(String[] args) {
> Bit[] Bits = new Bit[10000];
> Bit b1 = new Bit();
> Bit b2 = new Bit();
> Bit b3 = new Bit();
> Bit b4 = new Bit();
> Bit b5 = new Bit();
> Bit b6 = new Bit();
> Bit b7 = new Bit();
> Bit b8 = new Bit();
> Bit b9 = new Bit();
> Bit b10 = new Bit();
> Equality.associate(b1, b2);
> Equality.associate(b3, b4);
> Equality.associate(b5, b6);
> Equality.associate(b7, b8);
> Equality.associate(b9, b10);
> }
> }
>
> My problem is that whenever I try to associate more and more Bit
> objects, the running time just increases in an exponential manner. When
> I comment the relational advices out however, the running time is quick,
> thus the relational advices are causing the problem here. I realise that
> for every relational advice is made up by a tracematch. However, I do
> not see how it actually affects the running time in such a drastic
> manner, given that the only amount of objects(which are visible to me)
> that are involved here are only 10, and there are only 5 aspect
> instances. Explanation on this matter would be greatly appreciated.
>
> Many thanks.
>
>
>
>
>

-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
Received on Sun Mar 16 2008 - 20:30:54 GMT

This archive was generated by hypermail 2.2.0 : Sun Mar 16 2008 - 21:10:12 GMT