MIDTERM CSU670 Fall 2004 Friday, December 29 Karl Lieberherr YOUR NAME: 230 maximum Question 1: 3/U/75 ================================================== UNKNOWN1 = Chinese UNKNOWN2 = Wall UNKNOWN3 = automaton UNKNOWN4 = currentState UNKNOWN5 = [ UNKNOWN6 = startState UNKNOWN7 = ] UNKNOWN8 = transition UNKNOWN9 = groups UNKNOWN10 = List UNKNOWN11 = Group UNKNOWN12 = citypes UNKNOWN13 = List UNKNOWN14 = CIType UNKNOWN15 = history UNKNOWN16 = List UNKNOWN17 = Access UNKNOWN18 = Access UNKNOWN19 = List(S) ~ "(" {S} ")". // names not unique -- CHOICE UNKNOWN20 = Chinese Wall automaton UNKNOWN21 = history UNKNOWN22 = group UNKNOWN23 = group UNKNOWN24 = group UNKNOWN25 = citypes Question 2: 10/U/60, 2/U if number wrong ================================================== UNKNOWN1 = } UNKNOWN2 = 5 disjunction in binary UNKNOWN3 = 5 disjunctions UNKNOWN4 = 3 list length disjunction in unary UNKNOWN5 = 1 list length Chi in binary UNKNOWN6 = 4 list length Unary bypassing Binary Question 3: 20/U/40 ================================================== UNKNOWN1 = public static void help1(ClassGraph cg, XPath m, String strat, String comment, Visitor vis){ Integer i1 = (Integer) cg.traverse(m, strat, vis); System.out.println(i1.intValue() + comment); System.out.println(); } UNKNOWN2 = public static void help2(ClassGraph cg, XPath m, String strat, String comment) { List v; v = cg.gather(m, strat); System.out.println(v.size() + comment); } Question 4: 5/U/15 ==================================================== UNKNOWN1 = d UNKNOWN2 = | UNKNOWN3 = last ) Question 5: 10/U/40 ==================================================== UNKNOWN1 = lift "parent" up to x UNKNOWN2 = bypassing ->*,parent,* to {UnaryCompound, BinaryCompound} UNKNOWN3 = host.get_arg1().set_parent(host); host.get_arg2().set_parent(host); UNKNOWN4 = host.get_arg1().set_parent(host); YOUR NAME: