Permalink
Browse files

Incomplete precedence assumption test.

Per-shadow precedence assumptions. DO NOT WORK.
  • Loading branch information...
1 parent c35cf38 commit 5d16fb587cdb7bba3cbd641bc64246ac7e584dbc @jfabry jfabry committed Oct 10, 2012
View
@@ -5,12 +5,18 @@ A roadmap for damp.ekeko.aspectj
## To Do
* Find a name for this sucker
+* * Proposal: AASCI: Automated Aspectual Source Code Inspection. Pronounce it: Awe-ski :-)
* (CDR) Have walks over call graph work.
* (CDR) Make annotations on aspects and advice work.
* (CDR) Tool support: highlight in editor, inspect AST nodes.
* (CDR) Simplify UI WRT Soot et al, using the configure menu item on a project.
* (JF) Go over the whiteboard rules and check.
+* * Complete precedence for a shadow
+* * Overriden implicit precedence for a shadow
+* * Wormhole: read-write, read-write-percflow + combine with soot analysis
+* * refinement of abstract PC semantics
+* * Recheck the inclusion semantics
* (JF) Implement rules in mail of 20 sept.
* (JF) Execution levels rules.
* (JF) Exceptions problems rules.
@@ -26,6 +26,24 @@
(fails (aspect-dominates-aspect ?first ?second))
(fails (aspect-dominates-aspect ?second ?first))))
+;; Assumption: incomplete precedence for a certain shadow
+;; DOES NOT WORK. not all shadows are found. finds shadows of 6th aspect, which does not have any!
+; Also affects overriden-implicit-precedence-shadow
+; Here are the shadows on the relevant method (baseMethod1)
+; FifthAspect.before(): <anonymous pointcut>
+; SecondAspect.before(): <anonymous pointcut>
+; ThirdAspect.before(): pc..
+; FourthAspect.before(): pc..
+; FirstAspect.before(): <anonymous pointcut>
+(defn
+ incomplete-precedence-shadow
+ [?first ?second ?shadow]
+ (fresh [?ad1 ?ad2]
+ (incomplete-precedence ?first ?second)
+ (aspect-advice ?first ?ad1)
+ (advice-shadow ?ad1 ?shadow)
+ (aspect-advice ?second ?ad2)
+ (advice-shadow ?ad2 ?shadow)))
;;Assumption: implicit precedence is overridden
(defn
@@ -35,6 +53,19 @@
(aspect-dominates-aspect ?second ?first)
(aspect-dominates-aspect-implicitly+ ?first ?second)))
+;;Assumption: implicit precedence is overridden for a certain shadow
+; DOES NOT WORK. shadows are not found. Why?
+; see incomplete-precedence-shadow
+(defn
+ overriden-implicit-precedence-shadow
+ [?first ?second ?shadow]
+ (fresh [?ad1 ?ad2]
+ (overriden-implicit-precedence ?first ?second)
+ (aspect-advice ?first ?ad1)
+ (advice-shadow ?ad1 ?shadow)
+ (aspect-advice ?second ?ad2)
+ (advice-shadow ?ad2 ?shadow)))
+
;;Assumption: aspect modifies other aspect
(defn
modifies-aspect
@@ -138,6 +138,20 @@
(world/aspect-dominates-aspect ?dom ?sub))
"#{(\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.EightAspect\") (\"cl.pleiad.ajlmp.testPrecedence.EightAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.FourthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.EightAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\") (\"cl.pleiad.ajlmp.testPrecedence.EightAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.EightAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.FourthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.FifthAspect\")}"))
+(deftest
+ overriden-implicit-precedence-test
+ (tuples-are
+ (ekeko [?first ?second]
+ (assumptions/overriden-implicit-precedence ?first ?second))
+ "#{(\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\")}"))
+
+(deftest
+ incomplete-precedence-test
+ (tuples-are
+ (ekeko [?first ?second]
+ (assumptions/incomplete-precedence ?first ?second))
+ "#{(\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.EightAspect\") (\"cl.pleiad.ajlmp.testPrecedence.EightAspect\" \"cl.pleiad.ajlmp.testPrecedence.FirstAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.FourthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.SixthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.FirstAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\") (\"cl.pleiad.ajlmp.testPrecedence.EightAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.FirstAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\" \"cl.pleiad.ajlmp.testPrecedence.FirstAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.FourthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.EightAspect\") (\"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FirstAspect\" \"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SixthAspect\" \"cl.pleiad.ajlmp.testPrecedence.FirstAspect\") (\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SecondAspect\" \"cl.pleiad.ajlmp.testPrecedence.SixthAspect\") (\"cl.pleiad.ajlmp.testPrecedence.SeventhAspect\" \"cl.pleiad.ajlmp.testPrecedence.SecondAspect\")}"))
+
(deftest
concretization-test
(tuples-are
@@ -152,12 +166,7 @@
(assumptions/intertypemethod-unused ?itmethod))
"#{(\"(BcelTypeMunger ResolvedTypeMunger(Method, void cl.pleiad.ajlmp.testITD.BaseClass.itdB()))\")}"))
-(deftest
- overriden-implicit-precedence-test
- (tuples-are
- (ekeko [?first ?second]
- (assumptions/overriden-implicit-precedence ?first ?second))
- "#{(\"cl.pleiad.ajlmp.testPrecedence.FourthAspect\" \"cl.pleiad.ajlmp.testPrecedence.ThirdAspect\")}"))
+
;; Test Suite
;; ----------
@@ -167,14 +176,15 @@
(deftest
test-suite
- ; testing precedence logic
- (against-project-named "AJ-LMP-Precedence" false aspect-test )
- (against-project-named "AJ-LMP-Precedence" false explicit-decprec+-test)
- (against-project-named "AJ-LMP-Precedence" false implicit-precedence+-test)
- (against-project-named "AJ-LMP-Precedence" false aspect-dominates-aspect-test)
+ ; testing precedence logic -- commented out for speed
+ ;(against-project-named "AJ-LMP-Precedence" false aspect-test )
+ ;(against-project-named "AJ-LMP-Precedence" false explicit-decprec+-test)
+ ;(against-project-named "AJ-LMP-Precedence" false implicit-precedence+-test)
+ ;(against-project-named "AJ-LMP-Precedence" false aspect-dominates-aspect-test)
;testing assumptions
(against-project-named "AJ-LMP-Precedence" false overriden-implicit-precedence-test)
+ (against-project-named "AJ-LMP-Precedence" false incomplete-precedence-test)
(against-project-named "AJ-LMP-Pointcuts" false concretization-test)
(against-project-named "AJ-LMP-ITD" true intertypemethod-unused-test)
)
@@ -6,4 +6,8 @@ public abstract aspect ThirdAspect {
before() : pc(){
System.out.println("ThirdAspect-BeforePC");
}
+
+ before(): call(* BaseClass.*2(..)){
+ System.out.println("ThirdAspect-BeforeCall");
+ }
}

0 comments on commit 5d16fb5

Please sign in to comment.