Professional Documents
Culture Documents
AOP (Aspect Oriented Programming) - 4
AOP (Aspect Oriented Programming) - 4
ABSTRACT
6
$
!
! 7
8
$
"
#
"
"
$
# % #
"
& '
$
# . #
#
(
#
# "
9,
: #
Categories and Subject Descriptors
"
. #
)( *+& , -
#
General Terms %
& '
#
(
#
# :
Keywords
"
#
. #
/
0#
#
" 4
"
6
1. INTRODUCTION
#
"
*'1+*'2+
%
.
$
% #
#
:
3
4
"
#
/
"
4
Æ
"
(
;
Permission to make digital or hard copies of all or part of this work for #
personal or classroom use is granted without fee provided that copies are
< $
#
not made or distributed for profit or commercial advantage and that copies
,
=
bear this notice and the full citation on the first page. To copy otherwise, #
# ,
1
to republish, to post on servers or to redistribute to lists, requires prior
specific permission and/or a fee. AOSD 2002, Enschede, The Netherlands
9
>
Copyright 2002 ACM 1-58113-469-X/02/0004... 5.00 5
2. AOP AND RELATED ISSUES '
("
2.1 AOP "
) # "
4
%
*+ ,
- - .. -
*(+
#
+ $% ,
*+
6
/
01'
,
*''+ 0
?
*'+ : .*'=+*('+*((+ + 0# ( ,
*+
*@+
#
*A+ %
B*(+
$
B
B
"
B
3
4
&
"
-$
$
"
.
B
$
D
$
"
$
$
C C D
"
2.2 Issues on AOP % "
7
"
#
"
"
3
# $
<
Æ
%
3. VERIFICATION WITH MODEL
CHECKING
Example: error logging 3.1 Model checking
"
#
4
. #
#
" *1+
!
4 $
#
.
*(+
"
.
%
$ E 6 .
"
$
"
$
"
#
%
4
0%9F0
%
9
& G$
?
H
6
:
0%9 9%99
% 9
! 0%9F 0%9
9%9
" #$%
0%9 4
*1+
s
% 9
"
, I :.-9 9%9
M,s |= AG( )
B ?
B
7 B 9%9
-,0CB B
ThrowingException-Bar-m1
--> AF ErrorLoggin-Bar-m1
ThrowingException
-Bar-m1
put
Producer Consumer
halt get
ErrorLogging
-Bar-m1
0 1 2
HaltException
ErrorLogging ErrorLogging
-Bar-m1 -Bar-m1
Buffer
$
%
-$
7 ' ?
'
$
0%9F
$
$
4. APPLICATION TO AOP
#
$
3.2 Main model checkers
% $
, I*';+ ,./*'>+ # B
C0
?
B*'(+ 7 *<+*>+ -,0CB*(2+
$
#
B
, I
:.-9 # 9%9 4.1 Example
, I
#
?
( $
Æ
8
:.-9 $
" , I 8 % 8
%
. # B 7 B
8
8
%
6
8
" #
.
8
%
"
!
8 % $
" 9%9
#$
8
!
7
%
4
$
9%9
4 9%9
$
$
B½
"
?
;
Æ
%
#
% '
" ½
$
*'(+
#
B
TraceAspect ; %
2
Aspect for "
'
$
ConcurrentAspect
method
( %
!
tracing
Aspect for
concurrent
processing
< M $
#$
%
Basic function
"
Buffer Class
!" %
EE 2
Æ
$
#
Classes Aspects
J
0#
4
J
$L
;( #
%¾
#
$ # ?
<
"
#
7
' %
8
2 ' (
( %
"
"
"
$
%
#
¾
%
$
*'(+
#
Program to be checked Checking aspect X
%
!"&
before
I 0#
C B
mothod
pre-condition
'
,
After
,
post-condition
(
,
,
Checking aspect Y
;
7-$ It is only needed to weave aspects
7-$ that describe checking features
corresponding to testing viewpoints. Checking aspect Y
' !"&
#
M
#
Æ
8 #
/
" #
$
6
#
+' ,
#
..
+ , +'
-
8*'A+
$
$
#
#
# M
B
#
"
#
3
Æ
#
#
# 6
#
#
? $
%
8
# #
$
B #
"
"
#
#
#
#
"
% $
(
#
#
#
#
)
) **,02 9 I
"
0 ,
,
'(<' ((2(<(
*'@+ *'@+ *'<+ '@@>
9 %
, 9%, *'>+ ..
O9& ,
. 0#
&
N
#
, -$
O
9%,
'@@;
#
*'A+ . 7&
, 0
( -
3 (222
%
# *'@+ I % 0 ) & ,
3 ? /
"
0
0
)
8 34*5 .. 9 I
0
# ,
,
('@( '=;'1@ (22'
*(2+ O : . 9
H
I B 7 ,$&
#
-,0CB 6 L . (222
*('+ %
%& &
%
+
/
? $ #
/<' I'< '22='2'2 '@@@
*((+ 6
I %
%& ,
0
.
) 34*5
.. 9 I
0 ,
,
('@( A@'2@ (22'
7. CONCLUSIONS APPENDIX
'
A. Producer/Consumer problem [AOP]
#
( #
#
Buffer Class
,
++
!, +
/*8( ) 9
8
" 9, $%:; ) # $%:/*8(;
<, ' ) =
8. REFERENCES >, ' ) =
?,
*'+ #
. %
& )
@,
0A $%
.
,
C,%
) **+,-- B, :'; )
(1=(>= '@AA C, ' ) ' D E /*8(
*(+ B &CC
C =,
,
*;+ % B
H
(22' !,
0A $%
*<+ 7 9, 0# F
(
&CC
#C C C <, $% ) :';
*=+ 7# O& -$
-$
& - >, :'; )
0
M '@@@ ?,
@,
' ) ' D E /*8(
*1+ 0 # - H
)& . B,
0#
% . % '@@@ C,
*>+ 0 B0 ) .7 3
8 B 9 ,
0, N
3& 7 & -$
?
. B , 0
) Concurrent Aspect
+ ... (222 , &
!, + 0%++
*A+ 0 #
O -
# 6M& H
9,
M (222 <,
>,
/
) =
0
) +
*@+ ) ?,
&CCC C C @,