// This file was generated by DAJ from Sample.trv. import edu.neu.ccs.demeter.*; public aspect Sample { public void ChineseWallExample.listAll1() { Group1Printer v = new Group1Printer(); group1(v); } /* strategy: group1: from ChineseWallExample via A1 to A7 traversal: Start set: [ChineseWallExample: {0}] Nodes: ChineseWallExample: {0} A: {0} java.lang.Object: {0, 1} A1: {1} A2_List: {1} A2: {1} A7_List: {1} A7: {1} A3_List: {1} A3: {1} A4_List: {1} A4: {1} A5: {1} A6: {1} Edges: -> ChineseWallExample,a,A: {0} -> A,a1,A1: {} intercopy: [0 -> 1] -> A1,a2_List,A2_List: {1} -> A2_List,elements,A2: {1} -> A2,a7_List,A7_List: {1} -> A7_List,elements,A7: {1} -> A2,a3_List,A3_List: {1} -> A3_List,elements,A3: {1} -> A3,a4_List,A4_List: {1} -> A4_List,elements,A4: {1} -> A4,a5,A5: {1} -> A5,a6,A6: {1} -> A6,a7,A7: {1} -> A1,a4_List,A4_List: {1} Finish set: [A7: {1}] */ void ChineseWallExample.group1() { java.util.BitSet[] tokens = { new java.util.BitSet() }; tokens[0].set(0); group1(tokens); } void ChineseWallExample.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(0); } if (!newTokens[0].isEmpty()) if (a != null) group1_crossing_a(newTokens); } } void ChineseWallExample.group1_crossing_a(java.util.BitSet[] tokens) { this.a.group1(tokens); } void A.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a1 != null) group1_crossing_a1(newTokens); } } void A.group1_crossing_a1(java.util.BitSet[] tokens) { this.a1.group1(tokens); } void A1.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a2_List != null) group1_crossing_a2_List(newTokens); } { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a4_List != null) group1_crossing_a4_List(newTokens); } } void A1.group1_crossing_a2_List(java.util.BitSet[] tokens) { this.a2_List.group1(tokens); } void A1.group1_crossing_a4_List(java.util.BitSet[] tokens) { this.a4_List.group1(tokens); } void A2_List.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group1_crossing_elements((A2) it.next(), newTokens); } } void A2_List.group1_crossing_elements(A2 it, java.util.BitSet[] tokens) { it.group1(tokens); } void A2.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a7_List != null) group1_crossing_a7_List(newTokens); } { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a3_List != null) group1_crossing_a3_List(newTokens); } } void A2.group1_crossing_a7_List(java.util.BitSet[] tokens) { this.a7_List.group1(tokens); } void A2.group1_crossing_a3_List(java.util.BitSet[] tokens) { this.a3_List.group1(tokens); } void A7_List.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group1_crossing_elements((A7) it.next(), newTokens); } } void A7_List.group1_crossing_elements(A7 it, java.util.BitSet[] tokens) { it.group1(tokens); } void A7.group1(java.util.BitSet[] tokens) { } void A3_List.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group1_crossing_elements((A3) it.next(), newTokens); } } void A3_List.group1_crossing_elements(A3 it, java.util.BitSet[] tokens) { it.group1(tokens); } void A3.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a4_List != null) group1_crossing_a4_List(newTokens); } } void A3.group1_crossing_a4_List(java.util.BitSet[] tokens) { this.a4_List.group1(tokens); } void A4_List.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group1_crossing_elements((A4) it.next(), newTokens); } } void A4_List.group1_crossing_elements(A4 it, java.util.BitSet[] tokens) { it.group1(tokens); } void A4.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a5 != null) group1_crossing_a5(newTokens); } } void A4.group1_crossing_a5(java.util.BitSet[] tokens) { this.a5.group1(tokens); } void A5.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a6 != null) group1_crossing_a6(newTokens); } } void A5.group1_crossing_a6(java.util.BitSet[] tokens) { this.a6.group1(tokens); } void A6.group1(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a7 != null) group1_crossing_a7(newTokens); } } void A6.group1_crossing_a7(java.util.BitSet[] tokens) { this.a7.group1(tokens); } void ChineseWallExample.group1(Group1Printer v) { v.start(); group1(); } before(Group1Printer v, A1 host): execution(void group1(java.util.BitSet[])) && target(host) && cflow(execution(void group1(Group1Printer)) && args(v)) && if(thisJoinPoint.getSignature().getDeclaringType().getName().equals("A1" )) { v.before(host); } before(Group1Printer v, A7 host): execution(void group1(java.util.BitSet[])) && target(host) && cflow(execution(void group1(Group1Printer)) && args(v)) && if(thisJoinPoint.getSignature().getDeclaringType().getName().equals("A7" )) { v.before(host); } public void ChineseWallExample.listAll2() { Group1Printer v = new Group1Printer(); group2(v); } /* strategy: group2: from ChineseWallExample bypassing { A1 }via A2 to A7 traversal: Start set: [ChineseWallExample: {0}] Nodes: ChineseWallExample: {0} A: {0} java.lang.Object: {0, 1} A2: {1} A7_List: {1} A7: {1} A3_List: {1} A3: {1} A4_List: {1} A4: {1} A5: {1} A6: {1} Edges: -> ChineseWallExample,a,A: {0} -> A,a2,A2: {} intercopy: [0 -> 1] -> A2,a7_List,A7_List: {1} -> A7_List,elements,A7: {1} -> A2,a3_List,A3_List: {1} -> A3_List,elements,A3: {1} -> A3,a4_List,A4_List: {1} -> A4_List,elements,A4: {1} -> A4,a5,A5: {1} -> A5,a6,A6: {1} -> A6,a7,A7: {1} Finish set: [A7: {1}] */ void ChineseWallExample.group2() { java.util.BitSet[] tokens = { new java.util.BitSet() }; tokens[0].set(0); group2(tokens); } void ChineseWallExample.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(0); } if (!newTokens[0].isEmpty()) if (a != null) group2_crossing_a(newTokens); } } void ChineseWallExample.group2_crossing_a(java.util.BitSet[] tokens) { this.a.group2(tokens); } void A.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a2 != null) group2_crossing_a2(newTokens); } } void A.group2_crossing_a2(java.util.BitSet[] tokens) { this.a2.group2(tokens); } void A2.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a7_List != null) group2_crossing_a7_List(newTokens); } { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a3_List != null) group2_crossing_a3_List(newTokens); } } void A2.group2_crossing_a7_List(java.util.BitSet[] tokens) { this.a7_List.group2(tokens); } void A2.group2_crossing_a3_List(java.util.BitSet[] tokens) { this.a3_List.group2(tokens); } void A7_List.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group2_crossing_elements((A7) it.next(), newTokens); } } void A7_List.group2_crossing_elements(A7 it, java.util.BitSet[] tokens) { it.group2(tokens); } void A7.group2(java.util.BitSet[] tokens) { } void A3_List.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group2_crossing_elements((A3) it.next(), newTokens); } } void A3_List.group2_crossing_elements(A3 it, java.util.BitSet[] tokens) { it.group2(tokens); } void A3.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a4_List != null) group2_crossing_a4_List(newTokens); } } void A3.group2_crossing_a4_List(java.util.BitSet[] tokens) { this.a4_List.group2(tokens); } void A4_List.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group2_crossing_elements((A4) it.next(), newTokens); } } void A4_List.group2_crossing_elements(A4 it, java.util.BitSet[] tokens) { it.group2(tokens); } void A4.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a5 != null) group2_crossing_a5(newTokens); } } void A4.group2_crossing_a5(java.util.BitSet[] tokens) { this.a5.group2(tokens); } void A5.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a6 != null) group2_crossing_a6(newTokens); } } void A5.group2_crossing_a6(java.util.BitSet[] tokens) { this.a6.group2(tokens); } void A6.group2(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a7 != null) group2_crossing_a7(newTokens); } } void A6.group2_crossing_a7(java.util.BitSet[] tokens) { this.a7.group2(tokens); } void ChineseWallExample.group2(Group1Printer v) { v.start(); group2(); } before(Group1Printer v, A7 host): execution(void group2(java.util.BitSet[])) && target(host) && cflow(execution(void group2(Group1Printer)) && args(v)) && if(thisJoinPoint.getSignature().getDeclaringType().getName().equals("A7" )) { v.before(host); } public void ChineseWallExample.listAll3() { Group1Printer v = new Group1Printer(); group3(v); } /* strategy: group3: from ChineseWallExample bypassing { A1, A2 }via A3 to A7 traversal: Start set: [ChineseWallExample: {0}] Nodes: ChineseWallExample: {0} A: {0} java.lang.Object: {0, 1} A3: {1} A4_List: {1} A4: {1} A5: {1} A6: {1} A7: {1} Edges: -> ChineseWallExample,a,A: {0} -> A,a3,A3: {} intercopy: [0 -> 1] -> A3,a4_List,A4_List: {1} -> A4_List,elements,A4: {1} -> A4,a5,A5: {1} -> A5,a6,A6: {1} -> A6,a7,A7: {1} Finish set: [A7: {1}] */ void ChineseWallExample.group3() { java.util.BitSet[] tokens = { new java.util.BitSet() }; tokens[0].set(0); group3(tokens); } void ChineseWallExample.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(0); } if (!newTokens[0].isEmpty()) if (a != null) group3_crossing_a(newTokens); } } void ChineseWallExample.group3_crossing_a(java.util.BitSet[] tokens) { this.a.group3(tokens); } void A.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(0)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a3 != null) group3_crossing_a3(newTokens); } } void A.group3_crossing_a3(java.util.BitSet[] tokens) { this.a3.group3(tokens); } void A3.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a4_List != null) group3_crossing_a4_List(newTokens); } } void A3.group3_crossing_a4_List(java.util.BitSet[] tokens) { this.a4_List.group3(tokens); } void A4_List.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) for (java.util.Iterator it = iterator(); it.hasNext();) group3_crossing_elements((A4) it.next(), newTokens); } } void A4_List.group3_crossing_elements(A4 it, java.util.BitSet[] tokens) { it.group3(tokens); } void A4.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a5 != null) group3_crossing_a5(newTokens); } } void A4.group3_crossing_a5(java.util.BitSet[] tokens) { this.a5.group3(tokens); } void A5.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a6 != null) group3_crossing_a6(newTokens); } } void A5.group3_crossing_a6(java.util.BitSet[] tokens) { this.a6.group3(tokens); } void A6.group3(java.util.BitSet[] tokens) { { java.util.BitSet[] newTokens = { new java.util.BitSet() }; if (tokens[0].get(1)) { newTokens[0].set(1); } if (!newTokens[0].isEmpty()) if (a7 != null) group3_crossing_a7(newTokens); } } void A6.group3_crossing_a7(java.util.BitSet[] tokens) { this.a7.group3(tokens); } void A7.group3(java.util.BitSet[] tokens) { } void ChineseWallExample.group3(Group1Printer v) { v.start(); group3(); } before(Group1Printer v, A7 host): execution(void group3(java.util.BitSet[])) && target(host) && cflow(execution(void group3(Group1Printer)) && args(v)) && if(thisJoinPoint.getSignature().getDeclaringType().getName().equals("A7" )) { v.before(host); } public Object ChineseWallExample.getLast() { A7Visitor v = new A7Visitor(); group3(v); return (Object) v.getReturnValue(); } void ChineseWallExample.group3(A7Visitor v) { v.start(); group3(); } before(A7Visitor v, A7 host): execution(void group3(java.util.BitSet[])) && target(host) && cflow(execution(void group3(A7Visitor)) && args(v)) && if(thisJoinPoint.getSignature().getDeclaringType().getName().equals("A7" )) { v.before(host); } } // Sample