Solutions Final Winter 2002 COM 1205 YOUR NAME: ================================================== Question 1: ================================================== UNKNOWN1 = TraversalAspect UNKNOWN2 = aspectname UNKNOWN3 = AspectName UNKNOWN4 = name UNKNOWN5 = Name UNKNOWN6 = A UNKNOWN7 = Definition UNKNOWN8 = CG UNKNOWN9 = ClassGraphName UNKNOWN10 = ident UNKNOWN11 = Ident UNKNOWN12 = cg UNKNOWN13 = Definition UNKNOWN14 = definitionbody UNKNOWN15 = Strategy UNKNOWN16 = strategyname UNKNOWN17 = StrategyName UNKNOWN18 = s1 UNKNOWN19 = strategyexpression UNKNOWN20 = StrategyExpression UNKNOWN21 = strategyname UNKNOWN22 = StrategyName UNKNOWN23 = ident UNKNOWN24 = Ident UNKNOWN25 = s2 UNKNOWN26 = Definition UNKNOWN27 = AdaptiveMethod UNKNOWN28 = MethodSignature UNKNOWN29 = PublicMethod UNKNOWN30 = FinalMethod UNKNOWN31 = StaticMethod UNKNOWN32 = JavaType UNKNOWN33 = Name UNKNOWN34 = R UNKNOWN35 = ArraySpec_List UNKNOWN36 = name UNKNOWN37 = MethodName UNKNOWN38 = ident UNKNOWN39 = Ident UNKNOWN40 = f UNKNOWN41 = MethodParm UNKNOWN42 = type UNKNOWN43 = JavaType UNKNOWN44 = Name UNKNOWN45 = Ident UNKNOWN46 = A UNKNOWN47 = ParmName UNKNOWN48 = a UNKNOWN49 = ArraySpec_List UNKNOWN50 = Throws UNKNOWN51 = methodbody UNKNOWN52 = MethodBody UNKNOWN53 = trv UNKNOWN54 = StrategyExpression UNKNOWN55 = strategyname UNKNOWN56 = StrategyName UNKNOWN57 = s1 UNKNOWN58 = VisitorRef UNKNOWN59 = visitorClasses UNKNOWN60 = ClassName UNKNOWN61 = Name UNKNOWN62 = Ident UNKNOWN63 = v1 UNKNOWN64 = ClassName UNKNOWN65 = name UNKNOWN66 = Name UNKNOWN67 = v2 UNKNOWN68 = aspect B { } is syntactically wrong because the list { } must contain at least one element. TraversalAspect = "aspect" AspectName CurlyList(Definition). CurlyList(S) ~ "{" S {*s S} "}". UNKNOWN69 = aspect B { declare ClassGraph cg; } Question 2: ================================================== UNKNOWN1 = Compound (CHOICE) UNKNOWN2 = Simple UNKNOWN3 = StrategyString (CHOICE) UNKNOWN4 = UNKNOWN1 UNKNOWN5 = ( UNKNOWN6 = Op UNKNOWN7 = StrategyExpression UNKNOWN8 = ) UNKNOWN9 = && UNKNOWN10 = Not UNKNOWN11 = UNKNOWN3 Question 3: ================================================== UNKNOWN1 = Traversal Started UNKNOWN2 = DAJ UNKNOWN3 = R UNKNOWN4 = JavaType UNKNOWN5 = MethodParm UNKNOWN6 = A[] [] UNKNOWN7 = JavaType UNKNOWN8 = ArraySpec UNKNOWN9 = ArraySpec UNKNOWN10 = Traversal Started UNKNOWN11 = DAJ UNKNOWN12 = MethodParm UNKNOWN13 = ArraySpec UNKNOWN14 = ArraySpec UNKNOWN15 = Traversal Started UNKNOWN16 = DAJ UNKNOWN17 = R UNKNOWN18 = JavaType UNKNOWN19 = MethodParm UNKNOWN20 = A[] [] UNKNOWN21 = JavaType UNKNOWN22 = ArraySpec UNKNOWN23 = ArraySpec UNKNOWN24 = ArraySpec UNKNOWN25 = ArraySpec UNKNOWN26 = done UNKNOWN27 = No; cg2 is used by chooseArraySpec. Would get a null pointer exception.