8 // This class formerly had lazy consistency properties, but
9 // it is being changed so that the full set and the extra
10 // hash tables to access the full set efficiently by different
11 // elements will be consistent after EVERY operation. Also,
12 // a consistent assert method allows a debugger to ask whether
13 // an operation has produced an inconsistent VarSrcTokTable.
15 // in an effort to make sure operations keep the table consistent,
16 // all public methods that are also used by other methods for
17 // intermediate results (add and remove are used in other methods)
18 // there should be a public version that calls the private version
19 // so consistency is checked after public ops, but not private ops
20 public class VarSrcTokTable {
22 // a set of every token in the table
23 private HashSet<VariableSourceToken> trueSet;
25 // these hashtables provide an efficient retreival from the true set
26 private Hashtable< TempDescriptor, Set<VariableSourceToken> > var2vst;
27 private Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> > sese2vst;
28 private Hashtable< SVKey, Set<VariableSourceToken> > sv2vst;
30 // maximum age from aging operation
31 private static final Integer MAX_AGE = new Integer( 2 );
33 public static final Integer SrcType_READY = new Integer( 34 );
34 public static final Integer SrcType_STATIC = new Integer( 35 );
35 public static final Integer SrcType_DYNAMIC = new Integer( 36 );
38 public VarSrcTokTable() {
39 trueSet = new HashSet<VariableSourceToken>();
41 sese2vst = new Hashtable< FlatSESEEnterNode, Set<VariableSourceToken> >();
42 var2vst = new Hashtable< TempDescriptor, Set<VariableSourceToken> >();
43 sv2vst = new Hashtable< SVKey, Set<VariableSourceToken> >();
49 // make a deep copy of the in table
50 public VarSrcTokTable( VarSrcTokTable in ) {
57 public void add( VariableSourceToken vst ) {
62 private void addPrivate( VariableSourceToken vst ) {
64 // make sure we aren't clobbering anything!
65 if( trueSet.contains( vst ) ) {
66 // if something with the same hashcode is in the true set, they might
67 // have different reference variable sets because that set is not considered
68 // in a token's equality, so make sure we smooth that out right here
69 Iterator<VariableSourceToken> vstItr = trueSet.iterator();
70 while( vstItr.hasNext() ) {
71 VariableSourceToken vstAlready = vstItr.next();
73 if( vstAlready.equals( vst ) ) {
75 // take out the one that is in (we dont' want collisions in
76 // any of the other hash map sets either)
77 removePrivate( vstAlready );
79 // combine reference variable sets
80 vst.getRefVars().addAll( vstAlready.getRefVars() );
82 // now jump back as we are adding in a brand new token
90 Set<VariableSourceToken> s;
92 s = sese2vst.get( vst.getSESE() );
94 s = new HashSet<VariableSourceToken>();
97 sese2vst.put( vst.getSESE(), s );
99 Iterator<TempDescriptor> refVarItr = vst.getRefVars().iterator();
100 while( refVarItr.hasNext() ) {
101 TempDescriptor refVar = refVarItr.next();
102 s = var2vst.get( refVar );
104 s = new HashSet<VariableSourceToken>();
107 var2vst.put( refVar, s );
109 SVKey key = new SVKey( vst.getSESE(), refVar );
110 s = sv2vst.get( key );
112 s = new HashSet<VariableSourceToken>();
115 sv2vst.put( key, s );
119 public void addAll( Set<VariableSourceToken> s ) {
120 Iterator<VariableSourceToken> itr = s.iterator();
121 while( itr.hasNext() ) {
122 addPrivate( itr.next() );
128 public Set<VariableSourceToken> get() {
132 public Set<VariableSourceToken> get( FlatSESEEnterNode sese ) {
133 Set<VariableSourceToken> s = sese2vst.get( sese );
135 s = new HashSet<VariableSourceToken>();
136 sese2vst.put( sese, s );
141 public Set<VariableSourceToken> get( TempDescriptor refVar ) {
142 Set<VariableSourceToken> s = var2vst.get( refVar );
144 s = new HashSet<VariableSourceToken>();
145 var2vst.put( refVar, s );
150 public Set<VariableSourceToken> get( FlatSESEEnterNode sese,
151 TempDescriptor refVar ) {
152 SVKey key = new SVKey( sese, refVar );
153 Set<VariableSourceToken> s = sv2vst.get( key );
155 s = new HashSet<VariableSourceToken>();
156 sv2vst.put( key, s );
161 public Set<VariableSourceToken> get( FlatSESEEnterNode sese,
164 HashSet<VariableSourceToken> s0 = (HashSet<VariableSourceToken>) sese2vst.get( sese );
166 s0 = new HashSet<VariableSourceToken>();
167 sese2vst.put( sese, s0 );
170 Set<VariableSourceToken> s = (Set<VariableSourceToken>) s0.clone();
171 Iterator<VariableSourceToken> sItr = s.iterator();
172 while( sItr.hasNext() ) {
173 VariableSourceToken vst = sItr.next();
174 if( !vst.getAge().equals( age ) ) {
183 // merge now makes a deep copy of incoming stuff because tokens may
184 // be modified (reference var sets) by later ops that change more
185 // than one table, causing inconsistency
186 public void merge( VarSrcTokTable in ) {
192 Iterator<VariableSourceToken> vstItr = in.trueSet.iterator();
193 while( vstItr.hasNext() ) {
194 VariableSourceToken vst = vstItr.next();
195 this.addPrivate( vst.copy() );
202 // remove operations must leave the trueSet
203 // and the hash maps consistent
204 public void remove( VariableSourceToken vst ) {
205 removePrivate( vst );
209 private void removePrivate( VariableSourceToken vst ) {
210 trueSet.remove( vst );
212 Set<VariableSourceToken> s;
214 s = get( vst.getSESE() );
215 if( s != null ) { s.remove( vst ); }
217 Iterator<TempDescriptor> refVarItr = vst.getRefVars().iterator();
218 while( refVarItr.hasNext() ) {
219 TempDescriptor refVar = refVarItr.next();
225 var2vst.remove( refVar );
229 s = get( vst.getSESE(), refVar );
233 sv2vst.remove( new SVKey( vst.getSESE(), refVar ) );
240 public void remove( FlatSESEEnterNode sese ) {
241 removePrivate( sese );
245 public void removePrivate( FlatSESEEnterNode sese ) {
246 Set<VariableSourceToken> s = sese2vst.get( sese );
251 Iterator<VariableSourceToken> itr = s.iterator();
252 while( itr.hasNext() ) {
253 VariableSourceToken vst = itr.next();
254 removePrivate( vst );
257 sese2vst.remove( sese );
261 public void remove( TempDescriptor refVar ) {
262 removePrivate( refVar );
266 private void removePrivate( TempDescriptor refVar ) {
267 Set<VariableSourceToken> s = var2vst.get( refVar );
272 Set<VariableSourceToken> forRemoval = new HashSet<VariableSourceToken>();
274 // iterate over tokens that this temp can reference, make a set
275 // of tokens that need this temp stripped out of them
276 Iterator<VariableSourceToken> itr = s.iterator();
277 while( itr.hasNext() ) {
278 VariableSourceToken vst = itr.next();
279 Set<TempDescriptor> refVars = vst.getRefVars();
280 assert refVars.contains( refVar );
281 forRemoval.add( vst );
284 itr = forRemoval.iterator();
285 while( itr.hasNext() ) {
287 // here's a token marked for removal
288 VariableSourceToken vst = itr.next();
289 Set<TempDescriptor> refVars = vst.getRefVars();
291 // if there was only one one variable
292 // referencing this token, just take it
293 // out of the table all together
294 if( refVars.size() == 1 ) {
295 removePrivate( vst );
298 sv2vst.remove( new SVKey( vst.getSESE(), refVar ) );
300 refVars.remove( refVar );
303 var2vst.remove( refVar );
307 public void remove( FlatSESEEnterNode sese,
308 TempDescriptor var ) {
310 // don't seem to need this, don't bother maintaining
311 // until its clear we need it
316 // age tokens with respect to SESE curr, where
317 // any curr tokens increase age by 1
318 public void age( FlatSESEEnterNode curr ) {
320 Set<VariableSourceToken> forRemoval =
321 new HashSet<VariableSourceToken>();
323 Set<VariableSourceToken> forAddition =
324 new HashSet<VariableSourceToken>();
326 Iterator<VariableSourceToken> itr = trueSet.iterator();
327 while( itr.hasNext() ) {
328 VariableSourceToken vst = itr.next();
330 if( vst.getSESE().equals( curr ) ) {
332 // only age if the token isn't already the maximum age
333 if( vst.getAge() < MAX_AGE ) {
335 forRemoval.add( vst );
337 forAddition.add( new VariableSourceToken( vst.getRefVars(),
347 itr = forRemoval.iterator();
348 while( itr.hasNext() ) {
349 VariableSourceToken vst = itr.next();
353 itr = forRemoval.iterator();
354 while( itr.hasNext() ) {
355 VariableSourceToken vst = itr.next();
363 // at an SESE enter node, all ref vars in the SESE's in-set will
364 // be copied into the SESE's local scope, change source to itself
365 public void ownInSet( FlatSESEEnterNode curr ) {
366 Iterator<TempDescriptor> inVarItr = curr.getInVarSet().iterator();
367 while( inVarItr.hasNext() ) {
368 TempDescriptor inVar = inVarItr.next();
373 Set<TempDescriptor> refVars = new HashSet<TempDescriptor>();
374 refVars.add( inVar );
375 add( new VariableSourceToken( refVars,
386 // for the given SESE, change child tokens into this parent
387 public void remapChildTokens( FlatSESEEnterNode curr ) {
389 Iterator<FlatSESEEnterNode> childItr = curr.getChildren().iterator();
390 if( childItr.hasNext() ) {
391 FlatSESEEnterNode child = childItr.next();
393 Iterator<VariableSourceToken> vstItr = get( child ).iterator();
394 while( vstItr.hasNext() ) {
395 VariableSourceToken vst = vstItr.next();
399 add( new VariableSourceToken( vst.getRefVars(),
412 // this method is called at the SESE exit of SESE 'curr'
413 // if the sources for a variable written by curr can also
414 // come from curr's parent or curr's siblings then we're not
415 // sure that curr will actually modify the variable. There are
416 // many ways to handle this, but for now, mark the variable as
417 // virtually read so curr insists on having ownership of it
418 // whether it ends up writing to it or not. It will always, then,
419 // appear in curr's out-set.
420 public Set<TempDescriptor>
421 calcVirtReadsAndPruneParentAndSiblingTokens( FlatSESEEnterNode exiter,
422 Set<TempDescriptor> liveVars ) {
424 Set<TempDescriptor> virtReadSet = new HashSet<TempDescriptor>();
426 FlatSESEEnterNode parent = exiter.getParent();
427 if( parent == null ) {
428 // having no parent means no siblings, too
432 Set<FlatSESEEnterNode> alternateSESEs = new HashSet<FlatSESEEnterNode>();
433 alternateSESEs.add( parent );
434 Iterator<FlatSESEEnterNode> childItr = parent.getChildren().iterator();
435 while( childItr.hasNext() ) {
436 FlatSESEEnterNode sibling = childItr.next();
437 if( !sibling.equals( exiter ) ) {
438 alternateSESEs.add( sibling );
442 // VSTs to remove if they are alternate sources for exiter VSTs
443 // whose variables will become virtual reads
444 Set<VariableSourceToken> forRemoval = new HashSet<VariableSourceToken>();
446 // look at all of this SESE's VSTs at exit...
447 Iterator<VariableSourceToken> vstItr = get( exiter ).iterator();
448 while( vstItr.hasNext() ) {
449 VariableSourceToken vstExiterSrc = vstItr.next();
451 // only interested in tokens that come from our current instance
452 if( vstExiterSrc.getAge() != 0 ) {
456 // for each variable that might come from those sources...
457 Iterator<TempDescriptor> refVarItr = vstExiterSrc.getRefVars().iterator();
458 while( refVarItr.hasNext() ) {
459 TempDescriptor refVar = refVarItr.next();
461 // only matters for live variables at SESE exit program point
462 if( !liveVars.contains( refVar ) ) {
466 // examine other sources for a variable...
467 Iterator<VariableSourceToken> srcItr = get( refVar ).iterator();
468 while( srcItr.hasNext() ) {
469 VariableSourceToken vstPossibleOtherSrc = srcItr.next();
471 if( vstPossibleOtherSrc.getSESE().equals( exiter ) &&
472 vstPossibleOtherSrc.getAge() > 0
474 // this is an alternate source if its
475 // an older instance of this SESE
476 virtReadSet.add( refVar );
477 forRemoval.add( vstPossibleOtherSrc );
479 } else if( alternateSESEs.contains( vstPossibleOtherSrc.getSESE() ) ) {
480 // this is an alternate source from parent or sibling
481 virtReadSet.add( refVar );
482 forRemoval.add( vstPossibleOtherSrc );
485 assert vstPossibleOtherSrc.getSESE().equals( exiter );
486 assert vstPossibleOtherSrc.getAge().equals( 0 );
492 vstItr = forRemoval.iterator();
493 while( vstItr.hasNext() ) {
494 VariableSourceToken vst = vstItr.next();
503 // get the set of VST's that come from a child
504 public Set<VariableSourceToken> getChildrenVSTs( FlatSESEEnterNode curr ) {
506 Set<VariableSourceToken> out = new HashSet<VariableSourceToken>();
508 Iterator<FlatSESEEnterNode> cItr = curr.getChildren().iterator();
509 while( cItr.hasNext() ) {
510 FlatSESEEnterNode child = cItr.next();
511 out.addAll( get( child ) );
518 // get a sufficient set of VariableSourceTokens to cover all static sources
519 public Set<VariableSourceToken> getStaticSet( FlatSESEEnterNode current,
520 FlatSESEEnterNode parent
523 Set<VariableSourceToken> out = new HashSet<VariableSourceToken>();
525 Iterator itr = var2vst.entrySet().iterator();
526 while( itr.hasNext() ) {
527 Map.Entry me = (Map.Entry) itr.next();
528 TempDescriptor var = (TempDescriptor) me.getKey();
529 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
531 if( getRefVarSrcType( var, current, parent ) == SrcType_STATIC ) {
532 out.add( s1.iterator().next() );
540 // given a table from a subsequent program point, decide
541 // which variables are going from a static source to a
542 // dynamic source and return them
543 public Hashtable<TempDescriptor, VariableSourceToken>
544 getStatic2DynamicSet( VarSrcTokTable nextTable,
545 Set<TempDescriptor> nextLiveIn,
546 FlatSESEEnterNode current,
547 FlatSESEEnterNode parent
550 Hashtable<TempDescriptor, VariableSourceToken> out =
551 new Hashtable<TempDescriptor, VariableSourceToken>();
553 Iterator itr = var2vst.entrySet().iterator();
554 while( itr.hasNext() ) {
555 Map.Entry me = (Map.Entry) itr.next();
556 TempDescriptor var = (TempDescriptor) me.getKey();
557 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
559 // only worth tracking if live
560 if( nextLiveIn.contains( var ) ) {
562 if( this.getRefVarSrcType( var, current, parent ) == SrcType_STATIC &&
563 nextTable.getRefVarSrcType( var, current, parent ) == SrcType_DYNAMIC
565 // remember the variable and a static source
566 // it had before crossing the transition
567 out.put( var, s1.iterator().next() );
576 // for some reference variable, return the type of source
577 // it might have in this table, which might be:
578 // 1. Ready -- this variable comes from your parent and is
579 // definitely available when you are issued.
580 // 2. Static -- there is definitely one SESE that will
581 // produce the value for this variable
582 // 3. Dynamic -- we don't know where the value will come
583 // from, so we'll track it dynamically
584 public Integer getRefVarSrcType( TempDescriptor refVar,
585 FlatSESEEnterNode current,
586 FlatSESEEnterNode parent ) {
587 assert refVar != null;
589 // if you have no parent (root) and the variable in
590 // question is in your in-set, it's a command line
591 // argument and it is definitely available
592 if( parent == null &&
593 current.getInVarSet().contains( refVar ) ) {
594 return SrcType_READY;
597 // if there appear to be no sources, it means this variable
598 // comes from outside of any statically-known SESE scope,
599 // which means the system guarantees its READY
600 Set<VariableSourceToken> srcs = get( refVar );
601 if( srcs.isEmpty() ) {
602 return SrcType_READY;
605 // if the variable may have more than one source it might be
606 // dynamic, unless all sources are from a placeholder
607 if( srcs.size() > 1 ) {
608 Iterator<VariableSourceToken> itrSrcs = srcs.iterator();
609 VariableSourceToken oneSrc = itrSrcs.next();
610 while( itrSrcs.hasNext() ) {
611 VariableSourceToken anotherSrc = itrSrcs.next();
612 if( !oneSrc.getSESE().equals( anotherSrc.getSESE() ) ||
613 !oneSrc.getAge( ).equals( anotherSrc.getAge( ) )
615 return SrcType_DYNAMIC;
619 // all sources were same SESE and age, BUT, make sure it's
620 // not a placeholder SESE, who's vars are always ready
621 if( oneSrc.getSESE().getIsCallerSESEplaceholder() ) {
622 return SrcType_READY;
625 return SrcType_DYNAMIC;
628 VariableSourceToken singleSrc = srcs.iterator().next();
629 // if the one source is max age, track it dynamically
630 if( singleSrc.getAge() == MLPAnalysis.maxSESEage ) {
631 return SrcType_DYNAMIC;
634 // if it has one source that comes from the parent, it's ready
635 if( singleSrc.getSESE() == parent ) {
636 return SrcType_READY;
639 // if the one source is a placeholder SESE then it's ready
640 if( singleSrc.getSESE().getIsCallerSESEplaceholder() ) {
641 return SrcType_READY;
644 // otherwise it comes from one source not the parent (sibling)
645 // and we know exactly which static SESE/age it will come from
646 return SrcType_STATIC;
650 // any reference variables that are not live can be pruned
651 // from the table, and if any VSTs are then no longer
652 // referenced, they can be dropped as well
653 // THIS CAUSES INCONSISTENCY, FIX LATER, NOT REQUIRED
654 public void pruneByLiveness( Set<TempDescriptor> rootLiveSet ) {
656 // the set of reference variables in the table minus the
657 // live set gives the set of reference variables to remove
658 Set<TempDescriptor> deadRefVars = new HashSet<TempDescriptor>();
659 deadRefVars.addAll( var2vst.keySet() );
661 if( rootLiveSet != null ) {
662 deadRefVars.removeAll( rootLiveSet );
665 // just use the remove operation to prune the table now
666 Iterator<TempDescriptor> deadItr = deadRefVars.iterator();
667 while( deadItr.hasNext() ) {
668 TempDescriptor dead = deadItr.next();
669 removePrivate( dead );
677 // use as an aid for debugging, where true-set is checked
678 // against the alternate mappings: assert that nothing is
679 // missing or extra in the alternates
680 public void assertConsistency() {
685 Set<VariableSourceToken> trueSetByAlts = new HashSet<VariableSourceToken>();
686 itr = sese2vst.entrySet().iterator();
687 while( itr.hasNext() ) {
688 Map.Entry me = (Map.Entry) itr.next();
689 FlatSESEEnterNode sese = (FlatSESEEnterNode) me.getKey();
690 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
693 // the trueSet should have all entries in s1
694 assert trueSet.containsAll( s1 );
696 // s1 should not have anything that doesn't appear in trueset
697 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
698 sInt.removeAll( trueSet );
700 assert sInt.isEmpty();
702 // add s1 to a running union--at the end check if trueSet has extra
703 trueSetByAlts.addAll( s1 );
705 // make sure trueSet isn't too big
706 assert trueSetByAlts.containsAll( trueSet );
709 trueSetByAlts = new HashSet<VariableSourceToken>();
710 itr = var2vst.entrySet().iterator();
711 while( itr.hasNext() ) {
712 Map.Entry me = (Map.Entry) itr.next();
713 TempDescriptor var = (TempDescriptor) me.getKey();
714 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
717 // the trueSet should have all entries in s1
718 assert trueSet.containsAll( s1 );
720 // s1 should not have anything that doesn't appear in trueset
721 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
722 sInt.removeAll( trueSet );
724 assert sInt.isEmpty();
726 // add s1 to a running union--at the end check if trueSet has extra
727 trueSetByAlts.addAll( s1 );
729 // make sure trueSet isn't too big
730 assert trueSetByAlts.containsAll( trueSet );
733 trueSetByAlts = new HashSet<VariableSourceToken>();
734 itr = sv2vst.entrySet().iterator();
735 while( itr.hasNext() ) {
736 Map.Entry me = (Map.Entry) itr.next();
737 SVKey key = (SVKey) me.getKey();
738 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
741 // the trueSet should have all entries in s1
742 assert trueSet.containsAll( s1 );
744 // s1 should not have anything that doesn't appear in trueset
745 Set<VariableSourceToken> sInt = (Set<VariableSourceToken>) s1.clone();
746 sInt.removeAll( trueSet );
748 assert sInt.isEmpty();
750 // add s1 to a running union--at the end check if trueSet has extra
751 trueSetByAlts.addAll( s1 );
753 // make sure trueSet isn't too big
754 assert trueSetByAlts.containsAll( trueSet );
757 // also check that the reference var sets are consistent
758 Hashtable<VariableSourceToken, Set<TempDescriptor> > vst2refVars =
759 new Hashtable<VariableSourceToken, Set<TempDescriptor> >();
760 itr = var2vst.entrySet().iterator();
761 while( itr.hasNext() ) {
762 Map.Entry me = (Map.Entry) itr.next();
763 TempDescriptor refVar = (TempDescriptor) me.getKey();
764 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
765 Iterator<VariableSourceToken> vstItr = s1.iterator();
766 while( vstItr.hasNext() ) {
767 VariableSourceToken vst = vstItr.next();
768 assert vst.getRefVars().contains( refVar );
770 Set<TempDescriptor> refVarsPart = vst2refVars.get( vst );
771 if( refVarsPart == null ) {
772 refVarsPart = new HashSet<TempDescriptor>();
774 refVarsPart.add( refVar );
775 vst2refVars.put( vst, refVarsPart );
778 itr = vst2refVars.entrySet().iterator();
779 while( itr.hasNext() ) {
780 Map.Entry me = (Map.Entry) itr.next();
781 VariableSourceToken vst = (VariableSourceToken) me.getKey();
782 Set<TempDescriptor> s1 = (Set<TempDescriptor>) me.getValue();
784 assert vst.getRefVars().equals( s1 );
789 public boolean equals( Object o ) {
794 if( !(o instanceof VarSrcTokTable) ) {
798 VarSrcTokTable table = (VarSrcTokTable) o;
799 return trueSet.equals( table.trueSet );
802 public int hashCode() {
803 return trueSet.hashCode();
806 public Iterator<VariableSourceToken> iterator() {
807 return trueSet.iterator();
810 public String toString() {
811 return toStringPretty();
814 public String toStringVerbose() {
815 return "trueSet ="+trueSet.toString()+"\n"+
816 "sese2vst="+sese2vst.toString()+"\n"+
817 "var2vst ="+var2vst.toString()+"\n"+
818 "sv2vst ="+sv2vst.toString();
821 public String toStringPretty() {
822 String tokHighlighter = "o";
824 String str = "VarSrcTokTable\n";
825 Iterator<VariableSourceToken> vstItr = trueSet.iterator();
826 while( vstItr.hasNext() ) {
827 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
832 public String toStringPrettyVerbose() {
833 String tokHighlighter = "o";
835 String str = "VarSrcTokTable\n";
839 Iterator<VariableSourceToken> vstItr;
842 vstItr = trueSet.iterator();
843 while( vstItr.hasNext() ) {
844 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
847 str += " sese2vst\n";
848 itr = sese2vst.entrySet().iterator();
849 while( itr.hasNext() ) {
850 Map.Entry me = (Map.Entry) itr.next();
851 FlatSESEEnterNode sese = (FlatSESEEnterNode) me.getKey();
852 HashSet<VariableSourceToken> s1 = (HashSet<VariableSourceToken>) me.getValue();
855 str += " "+sese.getPrettyIdentifier()+" -> \n";
857 vstItr = s1.iterator();
858 while( vstItr.hasNext() ) {
859 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
864 itr = var2vst.entrySet().iterator();
865 while( itr.hasNext() ) {
866 Map.Entry me = (Map.Entry) itr.next();
867 TempDescriptor var = (TempDescriptor) me.getKey();
868 Set<VariableSourceToken> s1 = (Set<VariableSourceToken>) me.getValue();
871 str += " "+var+" -> \n";
873 vstItr = s1.iterator();
874 while( vstItr.hasNext() ) {
875 str += " "+tokHighlighter+" "+vstItr.next()+"\n";
880 itr = sv2vst.entrySet().iterator();
881 while( itr.hasNext() ) {
882 Map.Entry me = (Map.Entry) itr.next();
883 SVKey key = (SVKey) me.getKey();
884 Set<VariableSourceToken> s1 = (Set<VariableSourceToken>) me.getValue();
887 str += " "+key+" -> \n";
889 vstItr = s1.iterator();
890 while( vstItr.hasNext() ) {
891 str += " "+tokHighlighter+" "+vstItr.next()+"\n";