1 package Analysis.OoOJava;
7 import Analysis.Pointer.MySet;
9 // This class formerly had lazy consistency properties, but
10 // it is being changed so that the full set and the extra
11 // hash tables to access the full set efficiently by different
12 // elements will be consistent after EVERY operation. Also,
13 // a consistent assert method allows a debugger to ask whether
14 // an operation has produced an inconsistent VarSrcTokTable.
16 // in an effort to make sure operations keep the table consistent,
17 // all public methods that are also used by other methods for
18 // intermediate results (add and remove are used in other methods)
19 // there should be a public version that calls the private version
20 // so consistency is checked after public ops, but not private ops
21 public class VarSrcTokTable {
23 // a set of every token in the table
24 private MySet<VariableSourceToken> trueSet;
26 // these hashtables provide an efficient retreival from the true set
27 private Hashtable< TempDescriptor, Set<VariableSourceToken> > var2vst;
28 private Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> > sese2vst;
29 private Hashtable< SVKey, Set<VariableSourceToken> > sv2vst;
31 // maximum age from aging operation
32 private static final Integer MAX_AGE = new Integer( 2 );
34 public static final Integer SrcType_READY = new Integer( 34 );
35 public static final Integer SrcType_STATIC = new Integer( 35 );
36 public static final Integer SrcType_DYNAMIC = new Integer( 36 );
38 public static RBlockRelationAnalysis rblockRel;
42 public VarSrcTokTable() {
43 trueSet = new MySet<VariableSourceToken>();
45 sese2vst = new Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> >();
46 var2vst = new Hashtable< TempDescriptor, Set<VariableSourceToken> >();
47 sv2vst = new Hashtable< SVKey, Set<VariableSourceToken> >();
53 // make a deep copy of the in table
54 public VarSrcTokTable( VarSrcTokTable in ) {
61 public void add( VariableSourceToken vst ) {
66 private void addPrivate( VariableSourceToken vst ) {
68 // make sure we aren't clobbering anything!
69 if( trueSet.contains( vst ) ) {
70 // if something with the same hashcode is in the true set, they might
71 // have different reference variable sets because that set is not considered
72 // in a token's equality, so make sure we smooth that out right here
74 VariableSourceToken vstAlready = trueSet.get(vst);
75 if (vstAlready!=null) {
76 removePrivate( vstAlready );
77 HashSet<TempDescriptor> toAddSet=new HashSet<TempDescriptor>();
78 toAddSet.addAll(vstAlready.getRefVars());
79 toAddSet.addAll(vst.getRefVars());
80 vst.setRefVars(toAddSet);
86 Set<VariableSourceToken> s = sese2vst.get( vst.getSESE() );
88 s = new HashSet<VariableSourceToken>();
89 sese2vst.put( vst.getSESE(), s );
93 Iterator<TempDescriptor> refVarItr = vst.getRefVars().iterator();
94 while( refVarItr.hasNext() ) {
95 TempDescriptor refVar = refVarItr.next();
96 s = var2vst.get( refVar );
98 s = new HashSet<VariableSourceToken>();
99 var2vst.put( refVar, s );
103 SVKey key = new SVKey( vst.getSESE(), refVar );
104 s = sv2vst.get( key );
106 s = new HashSet<VariableSourceToken>();
107 sv2vst.put( key, s );
113 public void addAll( Set<VariableSourceToken> s ) {
114 Iterator<VariableSourceToken> itr = s.iterator();
115 while( itr.hasNext() ) {
116 addPrivate( itr.next() );
122 public Set<VariableSourceToken> get() {
126 public Set<VariableSourceToken> get( FlatSESEEnterNode sese ) {
127 Set<VariableSourceToken> s = sese2vst.get( sese );
129 s = new HashSet<VariableSourceToken>();
130 sese2vst.put( sese, s );
135 public Set<VariableSourceToken> get( TempDescriptor refVar ) {
136 Set<VariableSourceToken> s = var2vst.get( refVar );
138 s = new HashSet<VariableSourceToken>();
139 var2vst.put( refVar, s );
144 public Set<VariableSourceToken> get( FlatSESEEnterNode sese,
145 TempDescriptor refVar ) {
146 SVKey key = new SVKey( sese, refVar );
147 Set<VariableSourceToken> s = sv2vst.get( key );
149 s = new HashSet<VariableSourceToken>();
150 sv2vst.put( key, s );
155 public Set<VariableSourceToken> get( FlatSESEEnterNode sese,
158 HashSet<VariableSourceToken> s0 = (HashSet<VariableSourceToken>) sese2vst.get( sese );
160 s0 = new HashSet<VariableSourceToken>();
161 sese2vst.put( sese, s0 );
164 Set<VariableSourceToken> s = (Set<VariableSourceToken>) s0.clone();
165 Iterator<VariableSourceToken> sItr = s.iterator();
166 while( sItr.hasNext() ) {
167 VariableSourceToken vst = sItr.next();
168 if( !vst.getAge().equals( age ) ) {
177 // merge now makes a deep copy of incoming stuff because tokens may
178 // be modified (reference var sets) by later ops that change more
179 // than one table, causing inconsistency
180 public void merge( VarSrcTokTable in ) {
186 Iterator<VariableSourceToken> vstItr = in.trueSet.iterator();
187 while( vstItr.hasNext() ) {
188 VariableSourceToken vst = vstItr.next();
189 this.addPrivate( vst.copy() );
196 // remove operations must leave the trueSet
197 // and the hash maps consistent
198 public void remove( VariableSourceToken vst ) {
199 removePrivate( vst );
203 private void removePrivate( VariableSourceToken vst ) {
204 trueSet.remove( vst );
206 Set<VariableSourceToken> s;
208 s = get( vst.getSESE() );
209 if( s != null ) { s.remove( vst ); }
211 Iterator<TempDescriptor> refVarItr = vst.getRefVars().iterator();
212 while( refVarItr.hasNext() ) {
213 TempDescriptor refVar = refVarItr.next();
219 var2vst.remove( refVar );
223 s = get( vst.getSESE(), refVar );
227 sv2vst.remove( new SVKey( vst.getSESE(), refVar ) );
234 public void remove( FlatSESEEnterNode sese ) {
235 removePrivate( sese );
239 public void removePrivate( FlatSESEEnterNode sese ) {
240 Set<VariableSourceToken> s = sese2vst.get( sese );
245 Iterator<VariableSourceToken> itr = s.iterator();
246 while( itr.hasNext() ) {
247 VariableSourceToken vst = itr.next();
248 removePrivate( vst );
251 sese2vst.remove( sese );
255 public void remove( TempDescriptor refVar ) {
256 removePrivate( refVar );
260 private void removePrivate( TempDescriptor refVar ) {
261 Set<VariableSourceToken> s = var2vst.get( refVar );
266 Set<VariableSourceToken> forRemoval = new HashSet<VariableSourceToken>();
268 // iterate over tokens that this temp can reference, make a set
269 // of tokens that need this temp stripped out of them
270 Iterator<VariableSourceToken> itr = s.iterator();
271 while( itr.hasNext() ) {
272 VariableSourceToken vst = itr.next();
273 Set<TempDescriptor> refVars = vst.getRefVars();
274 assert refVars.contains( refVar );
275 forRemoval.add( vst );
278 itr = forRemoval.iterator();
279 while( itr.hasNext() ) {
281 // here's a token marked for removal
282 VariableSourceToken vst = itr.next();
283 Set<TempDescriptor> refVars = vst.getRefVars();
285 // if there was only one one variable
286 // referencing this token, just take it
287 // out of the table all together
288 if( refVars.size() == 1 ) {
289 removePrivate( vst );
292 sv2vst.remove( new SVKey( vst.getSESE(), refVar ) );
294 HashSet<TempDescriptor> newset=new HashSet<TempDescriptor>();
295 newset.addAll(vst.getRefVars());
296 newset.remove(refVar);
297 vst.setRefVars(newset);
301 var2vst.remove( refVar );
305 public void remove( FlatSESEEnterNode sese,
306 TempDescriptor var ) {
308 // don't seem to need this, don't bother maintaining
309 // until its clear we need it
314 // age tokens with respect to SESE curr, where
315 // any curr tokens increase age by 1
316 public void age( FlatSESEEnterNode curr ) {
318 Set<VariableSourceToken> forRemoval =
319 new HashSet<VariableSourceToken>();
321 Set<VariableSourceToken> forAddition =
322 new HashSet<VariableSourceToken>();
324 Iterator<VariableSourceToken> itr = trueSet.iterator();
325 while( itr.hasNext() ) {
326 VariableSourceToken vst = itr.next();
328 if( vst.getSESE().equals( curr ) ) {
330 // only age if the token isn't already the maximum age
331 if( vst.getAge() < MAX_AGE ) {
333 forRemoval.add( vst );
335 forAddition.add( new VariableSourceToken( vst.getRefVars(),
345 itr = forRemoval.iterator();
346 while( itr.hasNext() ) {
347 VariableSourceToken vst = itr.next();
351 itr = forRemoval.iterator();
352 while( itr.hasNext() ) {
353 VariableSourceToken vst = itr.next();
361 // at an SESE enter node, all ref vars in the SESE's in-set will
362 // be copied into the SESE's local scope, change source to itself
363 public void ownInSet( FlatSESEEnterNode curr ) {
364 Iterator<TempDescriptor> inVarItr = curr.getInVarSet().iterator();
365 while( inVarItr.hasNext() ) {
366 TempDescriptor inVar = inVarItr.next();
371 Set<TempDescriptor> refVars = new HashSet<TempDescriptor>();
372 refVars.add( inVar );
373 add( new VariableSourceToken( refVars,
384 // for the given SESE, change child tokens into this parent
385 public void remapChildTokens( FlatSESEEnterNode curr ) {
387 Iterator<FlatSESEEnterNode> childItr = curr.getLocalChildren().iterator();
388 while( childItr.hasNext() ) {
389 FlatSESEEnterNode child = childItr.next();
391 // set of VSTs for removal
392 HashSet<VariableSourceToken> removalSet=new HashSet<VariableSourceToken>();
393 // set of VSTs for additon
394 HashSet<VariableSourceToken> additionSet=new HashSet<VariableSourceToken>();
396 Iterator<VariableSourceToken> vstItr = get( child ).iterator();
397 while( vstItr.hasNext() ) {
398 VariableSourceToken vst = vstItr.next();
401 additionSet.add( new VariableSourceToken( vst.getRefVars(),
409 // remove( eah item in forremoval )
410 vstItr = removalSet.iterator();
411 while( vstItr.hasNext() ) {
412 VariableSourceToken vst = vstItr.next();
415 // add( each ite inm for additon _
416 vstItr = additionSet.iterator();
417 while( vstItr.hasNext() ) {
418 VariableSourceToken vst = vstItr.next();
427 // this method is called at the SESE exit of SESE 'curr'
428 // if the sources for a variable written by curr can also
429 // come from curr's parent or curr's siblings then we're not
430 // sure that curr will actually modify the variable. There are
431 // many ways to handle this, but for now, mark the variable as
432 // virtually read so curr insists on having ownership of it
433 // whether it ends up writing to it or not. It will always, then,
434 // appear in curr's out-set.
435 public Set<TempDescriptor>
436 calcVirtReadsAndPruneParentAndSiblingTokens( FlatSESEEnterNode exiter,
437 Set<TempDescriptor> liveVars ) {
439 Set<TempDescriptor> virtReadSet = new HashSet<TempDescriptor>();
441 // this calculation is unneeded for the main task, just return an
442 // empty set of virtual reads
443 if( rblockRel.getMainSESE() == exiter ) {
447 // who are the parent and siblings?
448 Set<FlatSESEEnterNode> alternateSESEs = new HashSet<FlatSESEEnterNode>();
449 Iterator<FlatSESEEnterNode> childItr;
451 FlatSESEEnterNode parent = exiter.getLocalParent();
453 if( parent == null ) {
454 // when some caller task is the exiter's parent, the siblings
455 // of the exiter are other local root tasks
456 parent = rblockRel.getCallerProxySESE();
457 childItr = rblockRel.getLocalRootSESEs( exiter.getfmEnclosing() ).iterator();
460 // otherwise, the siblings are locally-defined
461 childItr = parent.getLocalChildren().iterator();
464 alternateSESEs.add( parent );
465 while( childItr.hasNext() ) {
466 FlatSESEEnterNode sibling = childItr.next();
467 if( !sibling.equals( exiter ) ) {
468 alternateSESEs.add( sibling );
472 // VSTs to remove if they are alternate sources for exiter VSTs
473 // whose variables will become virtual reads
474 Set<VariableSourceToken> forRemoval = new HashSet<VariableSourceToken>();
476 // look at all of this SESE's VSTs at exit...
477 Iterator<VariableSourceToken> vstItr = get( exiter ).iterator();
478 while( vstItr.hasNext() ) {
479 VariableSourceToken vstExiterSrc = vstItr.next();
481 // only interested in tokens that come from our current instance
482 if( vstExiterSrc.getAge() != 0 ) {
486 // for each variable that might come from those sources...
487 Iterator<TempDescriptor> refVarItr = vstExiterSrc.getRefVars().iterator();
488 while( refVarItr.hasNext() ) {
489 TempDescriptor refVar = refVarItr.next();
491 // only matters for live variables at SESE exit program point
492 if( !liveVars.contains( refVar ) ) {
496 // examine other sources for a variable...
497 Iterator<VariableSourceToken> srcItr = get( refVar ).iterator();
498 while( srcItr.hasNext() ) {
499 VariableSourceToken vstPossibleOtherSrc = srcItr.next();
501 if( vstPossibleOtherSrc.getSESE().equals( exiter ) &&
502 vstPossibleOtherSrc.getAge() > 0
504 // this is an alternate source if its
505 // an older instance of this SESE
506 virtReadSet.add( refVar );
507 forRemoval.add( vstPossibleOtherSrc );
509 } else if( alternateSESEs.contains( vstPossibleOtherSrc.getSESE() ) ) {
510 // this is an alternate source from parent or sibling
511 virtReadSet.add( refVar );
512 forRemoval.add( vstPossibleOtherSrc );
515 if( !(vstPossibleOtherSrc.getSESE().equals( exiter ) &&
516 vstPossibleOtherSrc.getAge().equals( 0 )
519 System.out.println( "For refVar="+refVar+" at exit of "+exiter+
520 ", unexpected possible variable source "+vstPossibleOtherSrc );
528 vstItr = forRemoval.iterator();
529 while( vstItr.hasNext() ) {
530 VariableSourceToken vst = vstItr.next();
539 // given a table from a subsequent program point, decide
540 // which variables are going from a non-dynamic to a
541 // dynamic source and return them
542 public Hashtable<TempDescriptor, VSTWrapper>
543 getReadyOrStatic2DynamicSet( VarSrcTokTable nextTable,
544 Set<TempDescriptor> nextLiveIn,
545 FlatSESEEnterNode current
548 Hashtable<TempDescriptor, VSTWrapper> out =
549 new Hashtable<TempDescriptor, VSTWrapper>();
551 Iterator itr = var2vst.entrySet().iterator();
552 while( itr.hasNext() ) {
553 Map.Entry me = (Map.Entry) itr.next();
554 TempDescriptor var = (TempDescriptor) me.getKey();
555 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
557 // only worth tracking if live
558 if( nextLiveIn.contains( var ) ) {
560 VSTWrapper vstIfStaticBefore = new VSTWrapper();
561 VSTWrapper vstIfStaticAfter = new VSTWrapper();
563 Integer srcTypeBefore = this.getRefVarSrcType( var, current, vstIfStaticBefore );
564 Integer srcTypeAfter = nextTable.getRefVarSrcType( var, current, vstIfStaticAfter );
566 if( !srcTypeBefore.equals( SrcType_DYNAMIC ) &&
567 srcTypeAfter.equals( SrcType_DYNAMIC )
569 // remember the variable and a source
570 // it had before crossing the transition
571 // 1) if it was ready, vstIfStatic.vst is null
572 // 2) if is was static, use vstIfStatic.vst
573 out.put( var, vstIfStaticBefore );
582 // for some reference variable, return the type of source
583 // it might have in this table, which might be:
584 // 1. Ready -- this variable is
585 // definitely available when you are issued.
586 // 2. Static -- there is definitely one child SESE with
587 // a known age that will produce the value
588 // 3. Dynamic -- we don't know where the value will come
589 // from statically, so we'll track it dynamically
590 public Integer getRefVarSrcType( TempDescriptor refVar,
591 FlatSESEEnterNode currentSESE,
592 VSTWrapper vstIfStatic ) {
593 assert refVar != null;
594 assert vstIfStatic != null;
596 vstIfStatic.vst = null;
598 // when the current SESE is null, that simply means it is
599 // an unknown placeholder, in which case the system will
600 // ensure that any variables are READY
601 if( currentSESE == null ) {
602 return SrcType_READY;
605 // if there appear to be no sources, it means this variable
606 // comes from outside of any statically-known SESE scope,
607 // which means the system guarantees its READY, so jump over
609 Set<VariableSourceToken> srcs = get( refVar );
610 Iterator<VariableSourceToken> itrSrcs = srcs.iterator();
611 while( itrSrcs.hasNext() ) {
612 VariableSourceToken vst = itrSrcs.next();
614 // to make the refVar non-READY we have to find at least
615 // one child token, there are two cases
616 // 1. if the current task invoked the local method context,
617 // its children are the locally-defined root tasks
619 currentSESE.getIsCallerProxySESE() &&
620 rblockRel.getLocalRootSESEs().contains( vst.getSESE() );
622 // 2. if the child task is a locally-defined child of the current task
623 boolean case2 = currentSESE.getLocalChildren().contains( vst.getSESE() );
625 if( case1 || case2 ) {
627 // if we ever have at least one child source with an
628 // unknown age, have to treat var as dynamic
629 if( vst.getAge().equals( OoOJavaAnalysis.maxSESEage ) ) {
630 return SrcType_DYNAMIC;
633 // if we have a known-age child source, this var is
634 // either static or dynamic now: it's static if this
635 // source is the only source, otherwise dynamic
636 if( srcs.size() > 1 ) {
637 return SrcType_DYNAMIC;
640 vstIfStatic.vst = vst;
641 return SrcType_STATIC;
645 // if we never found a child source, all other
646 // sources must be READY before we could even
648 return SrcType_READY;
652 // any reference variables that are not live can be pruned
653 // from the table, and if any VSTs are then no longer
654 // referenced, they can be dropped as well
655 // THIS CAUSES INCONSISTENCY, FIX LATER, NOT REQUIRED
656 public void pruneByLiveness( Set<TempDescriptor> rootLiveSet ) {
658 // the set of reference variables in the table minus the
659 // live set gives the set of reference variables to remove
660 Set<TempDescriptor> deadRefVars = new HashSet<TempDescriptor>();
661 deadRefVars.addAll( var2vst.keySet() );
663 if( rootLiveSet != null ) {
664 deadRefVars.removeAll( rootLiveSet );
667 // just use the remove operation to prune the table now
668 Iterator<TempDescriptor> deadItr = deadRefVars.iterator();
669 while( deadItr.hasNext() ) {
670 TempDescriptor dead = deadItr.next();
671 removePrivate( dead );
679 // use as an aid for debugging, where true-set is checked
680 // against the alternate mappings: assert that nothing is
681 // missing or extra in the alternates
683 public void assertConsistency() {
685 /* public void assertConsistency() {
690 Set<VariableSourceToken> trueSetByAlts = new HashSet<VariableSourceToken>();
691 itr = sese2vst.entrySet().iterator();
692 while( itr.hasNext() ) {
693 Map.Entry me = (Map.Entry) itr.next();
694 FlatSESEEnterNode sese = (FlatSESEEnterNode) me.getKey();
695 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
698 // the trueSet should have all entries in s1
699 assert trueSet.containsAll( s1 );
701 // s1 should not have anything that doesn't appear in trueset
702 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
703 sInt.removeAll( trueSet );
705 assert sInt.isEmpty();
707 // add s1 to a running union--at the end check if trueSet has extra
708 trueSetByAlts.addAll( s1 );
710 // make sure trueSet isn't too big
711 assert trueSetByAlts.containsAll( trueSet );
714 trueSetByAlts = new HashSet<VariableSourceToken>();
715 itr = var2vst.entrySet().iterator();
716 while( itr.hasNext() ) {
717 Map.Entry me = (Map.Entry) itr.next();
718 TempDescriptor var = (TempDescriptor) me.getKey();
719 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
722 // the trueSet should have all entries in s1
723 assert trueSet.containsAll( s1 );
725 // s1 should not have anything that doesn't appear in trueset
726 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
727 sInt.removeAll( trueSet );
729 assert sInt.isEmpty();
731 // add s1 to a running union--at the end check if trueSet has extra
732 trueSetByAlts.addAll( s1 );
734 // make sure trueSet isn't too big
735 assert trueSetByAlts.containsAll( trueSet );
738 trueSetByAlts = new HashSet<VariableSourceToken>();
739 itr = sv2vst.entrySet().iterator();
740 while( itr.hasNext() ) {
741 Map.Entry me = (Map.Entry) itr.next();
742 SVKey key = (SVKey) me.getKey();
743 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
746 // the trueSet should have all entries in s1
747 assert trueSet.containsAll( s1 );
749 // s1 should not have anything that doesn't appear in trueset
750 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
751 sInt.removeAll( trueSet );
753 assert sInt.isEmpty();
755 // add s1 to a running union--at the end check if trueSet has extra
756 trueSetByAlts.addAll( s1 );
758 // make sure trueSet isn't too big
759 assert trueSetByAlts.containsAll( trueSet );
762 // also check that the reference var sets are consistent
763 Hashtable<VariableSourceToken, Set<TempDescriptor> > vst2refVars =
764 new Hashtable<VariableSourceToken, Set<TempDescriptor> >();
765 itr = var2vst.entrySet().iterator();
766 while( itr.hasNext() ) {
767 Map.Entry me = (Map.Entry) itr.next();
768 TempDescriptor refVar = (TempDescriptor) me.getKey();
769 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
770 Iterator<VariableSourceToken> vstItr = s1.iterator();
771 while( vstItr.hasNext() ) {
772 VariableSourceToken vst = vstItr.next();
773 assert vst.getRefVars().contains( refVar );
775 Set<TempDescriptor> refVarsPart = vst2refVars.get( vst );
776 if( refVarsPart == null ) {
777 refVarsPart = new HashSet<TempDescriptor>();
779 refVarsPart.add( refVar );
780 vst2refVars.put( vst, refVarsPart );
783 itr = vst2refVars.entrySet().iterator();
784 while( itr.hasNext() ) {
785 Map.Entry me = (Map.Entry) itr.next();
786 VariableSourceToken vst = (VariableSourceToken) me.getKey();
787 Set<TempDescriptor> s1 = (Set<TempDescriptor>) me.getValue();
789 assert vst.getRefVars().equals( s1 );
794 public boolean equals( Object o ) {
799 if( !(o instanceof VarSrcTokTable) ) {
803 VarSrcTokTable table = (VarSrcTokTable) o;
804 return trueSet.equals( table.trueSet );
807 public int hashCode() {
808 return trueSet.hashCode();
811 public Iterator<VariableSourceToken> iterator() {
812 return trueSet.iterator();
815 public String toString() {
816 return toStringPretty();
819 public String toStringVerbose() {
820 return "trueSet ="+trueSet.toString()+"\n"+
821 "sese2vst="+sese2vst.toString()+"\n"+
822 "var2vst ="+var2vst.toString()+"\n"+
823 "sv2vst ="+sv2vst.toString();
826 public String toStringPretty() {
827 String tokHighlighter = "o";
829 String str = "VarSrcTokTable\n";
830 Iterator<VariableSourceToken> vstItr = trueSet.iterator();
831 while( vstItr.hasNext() ) {
832 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
837 public String toStringPrettyVerbose() {
838 String tokHighlighter = "o";
840 String str = "VarSrcTokTable\n";
844 Iterator<VariableSourceToken> vstItr;
847 vstItr = trueSet.iterator();
848 while( vstItr.hasNext() ) {
849 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
852 str += " sese2vst\n";
853 itr = sese2vst.entrySet().iterator();
854 while( itr.hasNext() ) {
855 Map.Entry me = (Map.Entry) itr.next();
856 FlatSESEEnterNode sese = (FlatSESEEnterNode) me.getKey();
857 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
860 str += " "+sese.getPrettyIdentifier()+" -> \n";
862 vstItr = s1.iterator();
863 while( vstItr.hasNext() ) {
864 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
869 itr = var2vst.entrySet().iterator();
870 while( itr.hasNext() ) {
871 Map.Entry me = (Map.Entry) itr.next();
872 TempDescriptor var = (TempDescriptor) me.getKey();
873 Set<VariableSourceToken> s1 = (Set<VariableSourceToken>) me.getValue();
876 str += " "+var+" -> \n";
878 vstItr = s1.iterator();
879 while( vstItr.hasNext() ) {
880 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
885 itr = sv2vst.entrySet().iterator();
886 while( itr.hasNext() ) {
887 Map.Entry me = (Map.Entry) itr.next();
888 SVKey key = (SVKey) me.getKey();
889 Set<VariableSourceToken> s1 = (Set<VariableSourceToken>) me.getValue();
892 str += " "+key+" -> \n";
894 vstItr = s1.iterator();
895 while( vstItr.hasNext() ) {
896 str += " "+tokHighlighter+" "+vstItr.next()+"\n";