KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > options > Options


1
2 /* Soot - a J*va Optimization Framework
3  * Copyright (C) 2003 Ondrej Lhotak
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */

20
21 /* THIS FILE IS AUTO-GENERATED FROM soot_options.xml. DO NOT MODIFY. */
22
23 package soot.options;
24 import soot.*;
25 import java.util.*;
26 import soot.PackManager;
27
28 /** Soot command-line options parser.
29  * @author Ondrej Lhotak
30  */

31
32 public class Options extends OptionsBase {
33     public Options(Singletons.Global g) { }
34     public static Options v() { return G.v().soot_options_Options(); }
35
36
37     public static final int src_prec_c = 1;
38     public static final int src_prec_class = 1;
39     public static final int src_prec_only_class = 2;
40     public static final int src_prec_J = 3;
41     public static final int src_prec_jimple = 3;
42     public static final int src_prec_java = 4;
43     public static final int output_format_J = 1;
44     public static final int output_format_jimple = 1;
45     public static final int output_format_j = 2;
46     public static final int output_format_jimp = 2;
47     public static final int output_format_S = 3;
48     public static final int output_format_shimple = 3;
49     public static final int output_format_s = 4;
50     public static final int output_format_shimp = 4;
51     public static final int output_format_B = 5;
52     public static final int output_format_baf = 5;
53     public static final int output_format_b = 6;
54     public static final int output_format_G = 7;
55     public static final int output_format_grimple = 7;
56     public static final int output_format_g = 8;
57     public static final int output_format_grimp = 8;
58     public static final int output_format_X = 9;
59     public static final int output_format_xml = 9;
60     public static final int output_format_n = 10;
61     public static final int output_format_none = 10;
62     public static final int output_format_jasmin = 11;
63     public static final int output_format_c = 12;
64     public static final int output_format_class = 12;
65     public static final int output_format_d = 13;
66     public static final int output_format_dava = 13;
67     public static final int throw_analysis_pedantic = 1;
68     public static final int throw_analysis_unit = 2;
69
70     public boolean parse( String JavaDoc[] argv ) {
71         LinkedList phaseOptions = new LinkedList();
72
73         for( int i = argv.length; i > 0; i-- ) {
74             pushOptions( argv[i-1] );
75         }
76         while( hasMoreOptions() ) {
77             String JavaDoc option = nextOption();
78             if( option.charAt(0) != '-' ) {
79                 classes.add( option );
80                 continue;
81             }
82             while( option.charAt(0) == '-' ) {
83                 option = option.substring(1);
84             }
85             if( false );
86
87             else if( false
88             || option.equals( "h" )
89             || option.equals( "help" )
90             )
91                 help = true;
92   
93             else if( false
94             || option.equals( "pl" )
95             || option.equals( "phase-list" )
96             )
97                 phase_list = true;
98   
99             else if( false
100             || option.equals( "ph" )
101             || option.equals( "phase-help" )
102             ) {
103                 if( !hasMoreOptions() ) {
104                     G.v().out.println( "No value given for option -"+option );
105                     return false;
106                 }
107                 String JavaDoc value = nextOption();
108     
109                 if( phase_help == null )
110                     phase_help = new LinkedList();
111
112                 phase_help.add( value );
113             }
114   
115             else if( false
116             || option.equals( "version" )
117             )
118                 version = true;
119   
120             else if( false
121             || option.equals( "v" )
122             || option.equals( "verbose" )
123             )
124                 verbose = true;
125   
126             else if( false
127             || option.equals( "interactive-mode" )
128             )
129                 interactive_mode = true;
130   
131             else if( false
132             || option.equals( "app" )
133             )
134                 app = true;
135   
136             else if( false
137             || option.equals( "w" )
138             || option.equals( "whole-program" )
139             )
140                 whole_program = true;
141   
142             else if( false
143             || option.equals( "ws" )
144             || option.equals( "whole-shimple" )
145             )
146                 whole_shimple = true;
147   
148             else if( false
149             || option.equals( "validate" )
150             )
151                 validate = true;
152   
153             else if( false
154             || option.equals( "debug" )
155             )
156                 debug = true;
157   
158             else if( false
159             || option.equals( "debug-resolver" )
160             )
161                 debug_resolver = true;
162   
163             else if( false
164             || option.equals( "cp" )
165             || option.equals( "soot-class-path" )
166             || option.equals( "soot-classpath" )
167             ) {
168                 if( !hasMoreOptions() ) {
169                     G.v().out.println( "No value given for option -"+option );
170                     return false;
171                 }
172                 String JavaDoc value = nextOption();
173     
174                 if( soot_classpath.length() == 0 )
175                     soot_classpath = value;
176                 else {
177                     G.v().out.println( "Duplicate values "+soot_classpath+" and "+value+" for option -"+option );
178                     return false;
179                 }
180             }
181   
182             else if( false
183             || option.equals( "process-dir" )
184             ) {
185                 if( !hasMoreOptions() ) {
186                     G.v().out.println( "No value given for option -"+option );
187                     return false;
188                 }
189                 String JavaDoc value = nextOption();
190     
191                 if( process_dir == null )
192                     process_dir = new LinkedList();
193
194                 process_dir.add( value );
195             }
196   
197             else if( false
198             || option.equals( "ast-metrics" )
199             )
200                 ast_metrics = true;
201   
202             else if( false
203             || option.equals( "src-prec" )
204             ) {
205                 if( !hasMoreOptions() ) {
206                     G.v().out.println( "No value given for option -"+option );
207                     return false;
208                 }
209                 String JavaDoc value = nextOption();
210     
211                 if( false );
212     
213                 else if( false
214                 || value.equals( "c" )
215                 || value.equals( "class" )
216                 ) {
217                     if( src_prec != 0
218                     && src_prec != src_prec_class ) {
219                         G.v().out.println( "Multiple values given for option "+option );
220                         return false;
221                     }
222                     src_prec = src_prec_class;
223                 }
224     
225                 else if( false
226                 || value.equals( "only-class" )
227                 ) {
228                     if( src_prec != 0
229                     && src_prec != src_prec_only_class ) {
230                         G.v().out.println( "Multiple values given for option "+option );
231                         return false;
232                     }
233                     src_prec = src_prec_only_class;
234                 }
235     
236                 else if( false
237                 || value.equals( "J" )
238                 || value.equals( "jimple" )
239                 ) {
240                     if( src_prec != 0
241                     && src_prec != src_prec_jimple ) {
242                         G.v().out.println( "Multiple values given for option "+option );
243                         return false;
244                     }
245                     src_prec = src_prec_jimple;
246                 }
247     
248                 else if( false
249                 || value.equals( "java" )
250                 ) {
251                     if( src_prec != 0
252                     && src_prec != src_prec_java ) {
253                         G.v().out.println( "Multiple values given for option "+option );
254                         return false;
255                     }
256                     src_prec = src_prec_java;
257                 }
258     
259                 else {
260                     G.v().out.println( "Invalid value "+value+" given for option -"+option );
261                     return false;
262                 }
263            }
264   
265             else if( false
266             || option.equals( "full-resolver" )
267             )
268                 full_resolver = true;
269   
270             else if( false
271             || option.equals( "allow-phantom-refs" )
272             )
273                 allow_phantom_refs = true;
274   
275             else if( false
276             || option.equals( "use-old-type-assigner" )
277             )
278                 use_old_type_assigner = true;
279   
280             else if( false
281             || option.equals( "main-class" )
282             ) {
283                 if( !hasMoreOptions() ) {
284                     G.v().out.println( "No value given for option -"+option );
285                     return false;
286                 }
287                 String JavaDoc value = nextOption();
288     
289                 if( main_class.length() == 0 )
290                     main_class = value;
291                 else {
292                     G.v().out.println( "Duplicate values "+main_class+" and "+value+" for option -"+option );
293                     return false;
294                 }
295             }
296   
297             else if( false
298             || option.equals( "d" )
299             || option.equals( "output-dir" )
300             ) {
301                 if( !hasMoreOptions() ) {
302                     G.v().out.println( "No value given for option -"+option );
303                     return false;
304                 }
305                 String JavaDoc value = nextOption();
306     
307                 if( output_dir.length() == 0 )
308                     output_dir = value;
309                 else {
310                     G.v().out.println( "Duplicate values "+output_dir+" and "+value+" for option -"+option );
311                     return false;
312                 }
313             }
314   
315             else if( false
316             || option.equals( "f" )
317             || option.equals( "output-format" )
318             ) {
319                 if( !hasMoreOptions() ) {
320                     G.v().out.println( "No value given for option -"+option );
321                     return false;
322                 }
323                 String JavaDoc value = nextOption();
324     
325                 if( false );
326     
327                 else if( false
328                 || value.equals( "J" )
329                 || value.equals( "jimple" )
330                 ) {
331                     if( output_format != 0
332                     && output_format != output_format_jimple ) {
333                         G.v().out.println( "Multiple values given for option "+option );
334                         return false;
335                     }
336                     output_format = output_format_jimple;
337                 }
338     
339                 else if( false
340                 || value.equals( "j" )
341                 || value.equals( "jimp" )
342                 ) {
343                     if( output_format != 0
344                     && output_format != output_format_jimp ) {
345                         G.v().out.println( "Multiple values given for option "+option );
346                         return false;
347                     }
348                     output_format = output_format_jimp;
349                 }
350     
351                 else if( false
352                 || value.equals( "S" )
353                 || value.equals( "shimple" )
354                 ) {
355                     if( output_format != 0
356                     && output_format != output_format_shimple ) {
357                         G.v().out.println( "Multiple values given for option "+option );
358                         return false;
359                     }
360                     output_format = output_format_shimple;
361                 }
362     
363                 else if( false
364                 || value.equals( "s" )
365                 || value.equals( "shimp" )
366                 ) {
367                     if( output_format != 0
368                     && output_format != output_format_shimp ) {
369                         G.v().out.println( "Multiple values given for option "+option );
370                         return false;
371                     }
372                     output_format = output_format_shimp;
373                 }
374     
375                 else if( false
376                 || value.equals( "B" )
377                 || value.equals( "baf" )
378                 ) {
379                     if( output_format != 0
380                     && output_format != output_format_baf ) {
381                         G.v().out.println( "Multiple values given for option "+option );
382                         return false;
383                     }
384                     output_format = output_format_baf;
385                 }
386     
387                 else if( false
388                 || value.equals( "b" )
389                 ) {
390                     if( output_format != 0
391                     && output_format != output_format_b ) {
392                         G.v().out.println( "Multiple values given for option "+option );
393                         return false;
394                     }
395                     output_format = output_format_b;
396                 }
397     
398                 else if( false
399                 || value.equals( "G" )
400                 || value.equals( "grimple" )
401                 ) {
402                     if( output_format != 0
403                     && output_format != output_format_grimple ) {
404                         G.v().out.println( "Multiple values given for option "+option );
405                         return false;
406                     }
407                     output_format = output_format_grimple;
408                 }
409     
410                 else if( false
411                 || value.equals( "g" )
412                 || value.equals( "grimp" )
413                 ) {
414                     if( output_format != 0
415                     && output_format != output_format_grimp ) {
416                         G.v().out.println( "Multiple values given for option "+option );
417                         return false;
418                     }
419                     output_format = output_format_grimp;
420                 }
421     
422                 else if( false
423                 || value.equals( "X" )
424                 || value.equals( "xml" )
425                 ) {
426                     if( output_format != 0
427                     && output_format != output_format_xml ) {
428                         G.v().out.println( "Multiple values given for option "+option );
429                         return false;
430                     }
431                     output_format = output_format_xml;
432                 }
433     
434                 else if( false
435                 || value.equals( "n" )
436                 || value.equals( "none" )
437                 ) {
438                     if( output_format != 0
439                     && output_format != output_format_none ) {
440                         G.v().out.println( "Multiple values given for option "+option );
441                         return false;
442                     }
443                     output_format = output_format_none;
444                 }
445     
446                 else if( false
447                 || value.equals( "jasmin" )
448                 ) {
449                     if( output_format != 0
450                     && output_format != output_format_jasmin ) {
451                         G.v().out.println( "Multiple values given for option "+option );
452                         return false;
453                     }
454                     output_format = output_format_jasmin;
455                 }
456     
457                 else if( false
458                 || value.equals( "c" )
459                 || value.equals( "class" )
460                 ) {
461                     if( output_format != 0
462                     && output_format != output_format_class ) {
463                         G.v().out.println( "Multiple values given for option "+option );
464                         return false;
465                     }
466                     output_format = output_format_class;
467                 }
468     
469                 else if( false
470                 || value.equals( "d" )
471                 || value.equals( "dava" )
472                 ) {
473                     if( output_format != 0
474                     && output_format != output_format_dava ) {
475                         G.v().out.println( "Multiple values given for option "+option );
476                         return false;
477                     }
478                     output_format = output_format_dava;
479                 }
480     
481                 else {
482                     G.v().out.println( "Invalid value "+value+" given for option -"+option );
483                     return false;
484                 }
485            }
486   
487             else if( false
488             || option.equals( "outjar" )
489             || option.equals( "output-jar" )
490             )
491                 output_jar = true;
492   
493             else if( false
494             || option.equals( "xml-attributes" )
495             )
496                 xml_attributes = true;
497   
498             else if( false
499             || option.equals( "print-tags" )
500             || option.equals( "print-tags-in-output" )
501             )
502                 print_tags_in_output = true;
503   
504             else if( false
505             || option.equals( "no-output-source-file-attribute" )
506             )
507                 no_output_source_file_attribute = true;
508   
509             else if( false
510             || option.equals( "no-output-inner-classes-attribute" )
511             )
512                 no_output_inner_classes_attribute = true;
513   
514             else if( false
515             || option.equals( "dump-body" )
516             ) {
517                 if( !hasMoreOptions() ) {
518                     G.v().out.println( "No value given for option -"+option );
519                     return false;
520                 }
521                 String JavaDoc value = nextOption();
522     
523                 if( dump_body == null )
524                     dump_body = new LinkedList();
525
526                 dump_body.add( value );
527             }
528   
529             else if( false
530             || option.equals( "dump-cfg" )
531             ) {
532                 if( !hasMoreOptions() ) {
533                     G.v().out.println( "No value given for option -"+option );
534                     return false;
535                 }
536                 String JavaDoc value = nextOption();
537     
538                 if( dump_cfg == null )
539                     dump_cfg = new LinkedList();
540
541                 dump_cfg.add( value );
542             }
543   
544             else if( false
545             || option.equals( "show-exception-dests" )
546             )
547                 show_exception_dests = true;
548   
549             else if( false
550             || option.equals( "gzip" )
551             )
552                 gzip = true;
553   
554             else if( false
555             || option.equals( "p" )
556             || option.equals( "phase-option" )
557             ) {
558                 if( !hasMoreOptions() ) {
559                     G.v().out.println( "No phase name given for option -"+option );
560                     return false;
561                 }
562                 String JavaDoc phaseName = nextOption();
563                 if( !hasMoreOptions() ) {
564                     G.v().out.println( "No phase option given for option -"+option+" "+phaseName );
565                     return false;
566                 }
567                 String JavaDoc phaseOption = nextOption();
568     
569                 phaseOptions.add( phaseName );
570                 phaseOptions.add( phaseOption );
571             }
572   
573             else if( false
574             || option.equals( "O" )
575             || option.equals( "optimize" )
576             ) {
577                 
578                 pushOptions( "enabled:true" );
579                 pushOptions( "sop" );
580                 pushOptions( "-p" );
581                 pushOptions( "enabled:true" );
582                 pushOptions( "jop" );
583                 pushOptions( "-p" );
584                 pushOptions( "enabled:true" );
585                 pushOptions( "gop" );
586                 pushOptions( "-p" );
587                 pushOptions( "enabled:true" );
588                 pushOptions( "bop" );
589                 pushOptions( "-p" );
590                 pushOptions( "only-stack-locals:false" );
591                 pushOptions( "gb.a2" );
592                 pushOptions( "-p" );
593                 pushOptions( "only-stack-locals:false" );
594                 pushOptions( "gb.a1" );
595                 pushOptions( "-p" );
596             }
597   
598             else if( false
599             || option.equals( "W" )
600             || option.equals( "whole-optimize" )
601             ) {
602                 
603                 pushOptions( "-O" );
604                 pushOptions( "-w" );
605                 pushOptions( "enabled:true" );
606                 pushOptions( "wsop" );
607                 pushOptions( "-p" );
608                 pushOptions( "enabled:true" );
609                 pushOptions( "wjop" );
610                 pushOptions( "-p" );
611             }
612   
613             else if( false
614             || option.equals( "via-grimp" )
615             )
616                 via_grimp = true;
617   
618             else if( false
619             || option.equals( "via-shimple" )
620             )
621                 via_shimple = true;
622   
623             else if( false
624             || option.equals( "throw-analysis" )
625             ) {
626                 if( !hasMoreOptions() ) {
627                     G.v().out.println( "No value given for option -"+option );
628                     return false;
629                 }
630                 String JavaDoc value = nextOption();
631     
632                 if( false );
633     
634                 else if( false
635                 || value.equals( "pedantic" )
636                 ) {
637                     if( throw_analysis != 0
638                     && throw_analysis != throw_analysis_pedantic ) {
639                         G.v().out.println( "Multiple values given for option "+option );
640                         return false;
641                     }
642                     throw_analysis = throw_analysis_pedantic;
643                 }
644     
645                 else if( false
646                 || value.equals( "unit" )
647                 ) {
648                     if( throw_analysis != 0
649                     && throw_analysis != throw_analysis_unit ) {
650                         G.v().out.println( "Multiple values given for option "+option );
651                         return false;
652                     }
653                     throw_analysis = throw_analysis_unit;
654                 }
655     
656                 else {
657                     G.v().out.println( "Invalid value "+value+" given for option -"+option );
658                     return false;
659                 }
660            }
661   
662             else if( false
663             || option.equals( "omit-excepting-unit-edges" )
664             )
665                 omit_excepting_unit_edges = true;
666   
667             else if( false
668             || option.equals( "trim-cfgs" )
669             ) {
670                 
671                 pushOptions( "enabled:true" );
672                 pushOptions( "jb.tt" );
673                 pushOptions( "-p" );
674                 pushOptions( "-omit-excepting-unit-edges" );
675                 pushOptions( "unit" );
676                 pushOptions( "-throw-analysis" );
677             }
678   
679             else if( false
680             || option.equals( "i" )
681             || option.equals( "include" )
682             ) {
683                 if( !hasMoreOptions() ) {
684                     G.v().out.println( "No value given for option -"+option );
685                     return false;
686                 }
687                 String JavaDoc value = nextOption();
688     
689                 if( include == null )
690                     include = new LinkedList();
691
692                 include.add( value );
693             }
694   
695             else if( false
696             || option.equals( "x" )
697             || option.equals( "exclude" )
698             ) {
699                 if( !hasMoreOptions() ) {
700                     G.v().out.println( "No value given for option -"+option );
701                     return false;
702                 }
703                 String JavaDoc value = nextOption();
704     
705                 if( exclude == null )
706                     exclude = new LinkedList();
707
708                 exclude.add( value );
709             }
710   
711             else if( false
712             || option.equals( "include-all" )
713             )
714                 include_all = true;
715   
716             else if( false
717             || option.equals( "dynamic-class" )
718             ) {
719                 if( !hasMoreOptions() ) {
720                     G.v().out.println( "No value given for option -"+option );
721                     return false;
722                 }
723                 String JavaDoc value = nextOption();
724     
725                 if( dynamic_class == null )
726                     dynamic_class = new LinkedList();
727
728                 dynamic_class.add( value );
729             }
730   
731             else if( false
732             || option.equals( "dynamic-dir" )
733             ) {
734                 if( !hasMoreOptions() ) {
735                     G.v().out.println( "No value given for option -"+option );
736                     return false;
737                 }
738                 String JavaDoc value = nextOption();
739     
740                 if( dynamic_dir == null )
741                     dynamic_dir = new LinkedList();
742
743                 dynamic_dir.add( value );
744             }
745   
746             else if( false
747             || option.equals( "dynamic-package" )
748             ) {
749                 if( !hasMoreOptions() ) {
750                     G.v().out.println( "No value given for option -"+option );
751                     return false;
752                 }
753                 String JavaDoc value = nextOption();
754     
755                 if( dynamic_package == null )
756                     dynamic_package = new LinkedList();
757
758                 dynamic_package.add( value );
759             }
760   
761             else if( false
762             || option.equals( "keep-line-number" )
763             )
764                 keep_line_number = true;
765   
766             else if( false
767             || option.equals( "keep-bytecode-offset" )
768             || option.equals( "keep-offset" )
769             )
770                 keep_offset = true;
771   
772             else if( false
773             || option.equals( "annot-purity" )
774             ) {
775                 
776                 pushOptions( "enabled:true" );
777                 pushOptions( "wjap.purity" );
778                 pushOptions( "-p" );
779                 pushOptions( "enabled:true" );
780                 pushOptions( "cg.spark" );
781                 pushOptions( "-p" );
782                 pushOptions( "-w" );
783             }
784   
785             else if( false
786             || option.equals( "annot-nullpointer" )
787             ) {
788                 
789                 pushOptions( "enabled:true" );
790                 pushOptions( "tag.an" );
791                 pushOptions( "-p" );
792                 pushOptions( "enabled:true" );
793                 pushOptions( "jap.npc" );
794                 pushOptions( "-p" );
795             }
796   
797             else if( false
798             || option.equals( "annot-arraybounds" )
799             ) {
800                 
801                 pushOptions( "enabled:true" );
802                 pushOptions( "tag.an" );
803                 pushOptions( "-p" );
804                 pushOptions( "enabled:true" );
805                 pushOptions( "jap.abc" );
806                 pushOptions( "-p" );
807                 pushOptions( "enabled:true" );
808                 pushOptions( "wjap.ra" );
809                 pushOptions( "-p" );
810             }
811   
812             else if( false
813             || option.equals( "annot-side-effect" )
814             ) {
815                 
816                 pushOptions( "enabled:true" );
817                 pushOptions( "tag.dep" );
818                 pushOptions( "-p" );
819                 pushOptions( "enabled:true" );
820                 pushOptions( "jap.sea" );
821                 pushOptions( "-p" );
822                 pushOptions( "-w" );
823             }
824   
825             else if( false
826             || option.equals( "annot-fieldrw" )
827             ) {
828                 
829                 pushOptions( "enabled:true" );
830                 pushOptions( "tag.fieldrw" );
831                 pushOptions( "-p" );
832                 pushOptions( "enabled:true" );
833                 pushOptions( "jap.fieldrw" );
834                 pushOptions( "-p" );
835                 pushOptions( "-w" );
836             }
837   
838             else if( false
839             || option.equals( "time" )
840             )
841                 time = true;
842   
843             else if( false
844             || option.equals( "subtract-gc" )
845             )
846                 subtract_gc = true;
847   
848             else {
849                 G.v().out.println( "Invalid option -"+option );
850                 return false;
851             }
852         }
853
854         Iterator it = phaseOptions.iterator();
855         while( it.hasNext() ) {
856             String JavaDoc phaseName = (String JavaDoc) it.next();
857             String JavaDoc phaseOption = (String JavaDoc) it.next();
858             if( !setPhaseOption( phaseName, "enabled:true" ) ) return false;
859         }
860
861         it = phaseOptions.iterator();
862         while( it.hasNext() ) {
863             String JavaDoc phaseName = (String JavaDoc) it.next();
864             String JavaDoc phaseOption = (String JavaDoc) it.next();
865             if( !setPhaseOption( phaseName, phaseOption ) ) return false;
866         }
867
868         return true;
869     }
870
871
872     public boolean help() { return help; }
873     private boolean help = false;
874     public void set_help( boolean setting ) { help = setting; }
875   
876     public boolean phase_list() { return phase_list; }
877     private boolean phase_list = false;
878     public void set_phase_list( boolean setting ) { phase_list = setting; }
879   
880     public List phase_help() {
881         if( phase_help == null )
882             return java.util.Collections.EMPTY_LIST;
883         else
884             return phase_help;
885     }
886     public void set_phase_help( List setting ) { phase_help = setting; }
887     private List phase_help = null;
888     public boolean version() { return version; }
889     private boolean version = false;
890     public void set_version( boolean setting ) { version = setting; }
891   
892     public boolean verbose() { return verbose; }
893     private boolean verbose = false;
894     public void set_verbose( boolean setting ) { verbose = setting; }
895   
896     public boolean interactive_mode() { return interactive_mode; }
897     private boolean interactive_mode = false;
898     public void set_interactive_mode( boolean setting ) { interactive_mode = setting; }
899   
900     public boolean app() { return app; }
901     private boolean app = false;
902     public void set_app( boolean setting ) { app = setting; }
903   
904     public boolean whole_program() { return whole_program; }
905     private boolean whole_program = false;
906     public void set_whole_program( boolean setting ) { whole_program = setting; }
907   
908     public boolean whole_shimple() { return whole_shimple; }
909     private boolean whole_shimple = false;
910     public void set_whole_shimple( boolean setting ) { whole_shimple = setting; }
911   
912     public boolean validate() { return validate; }
913     private boolean validate = false;
914     public void set_validate( boolean setting ) { validate = setting; }
915   
916     public boolean debug() { return debug; }
917     private boolean debug = false;
918     public void set_debug( boolean setting ) { debug = setting; }
919   
920     public boolean debug_resolver() { return debug_resolver; }
921     private boolean debug_resolver = false;
922     public void set_debug_resolver( boolean setting ) { debug_resolver = setting; }
923   
924     public String JavaDoc soot_classpath() { return soot_classpath; }
925     public void set_soot_classpath( String JavaDoc setting ) { soot_classpath = setting; }
926     private String JavaDoc soot_classpath = "";
927     public List process_dir() {
928         if( process_dir == null )
929             return java.util.Collections.EMPTY_LIST;
930         else
931             return process_dir;
932     }
933     public void set_process_dir( List setting ) { process_dir = setting; }
934     private List process_dir = null;
935     public boolean ast_metrics() { return ast_metrics; }
936     private boolean ast_metrics = false;
937     public void set_ast_metrics( boolean setting ) { ast_metrics = setting; }
938   
939     public int src_prec() {
940         if( src_prec == 0 ) return src_prec_class;
941         return src_prec;
942     }
943     public void set_src_prec( int setting ) { src_prec = setting; }
944     private int src_prec = 0;
945     public boolean full_resolver() { return full_resolver; }
946     private boolean full_resolver = false;
947     public void set_full_resolver( boolean setting ) { full_resolver = setting; }
948   
949     public boolean allow_phantom_refs() { return allow_phantom_refs; }
950     private boolean allow_phantom_refs = false;
951     public void set_allow_phantom_refs( boolean setting ) { allow_phantom_refs = setting; }
952   
953     public boolean use_old_type_assigner() { return use_old_type_assigner; }
954     private boolean use_old_type_assigner = false;
955     public void set_use_old_type_assigner( boolean setting ) { use_old_type_assigner = setting; }
956   
957     public String JavaDoc main_class() { return main_class; }
958     public void set_main_class( String JavaDoc setting ) { main_class = setting; }
959     private String JavaDoc main_class = "";
960     public String JavaDoc output_dir() { return output_dir; }
961     public void set_output_dir( String JavaDoc setting ) { output_dir = setting; }
962     private String JavaDoc output_dir = "";
963     public int output_format() {
964         if( output_format == 0 ) return output_format_class;
965         return output_format;
966     }
967     public void set_output_format( int setting ) { output_format = setting; }
968     private int output_format = 0;
969     public boolean output_jar() { return output_jar; }
970     private boolean output_jar = false;
971     public void set_output_jar( boolean setting ) { output_jar = setting; }
972   
973     public boolean xml_attributes() { return xml_attributes; }
974     private boolean xml_attributes = false;
975     public void set_xml_attributes( boolean setting ) { xml_attributes = setting; }
976   
977     public boolean print_tags_in_output() { return print_tags_in_output; }
978     private boolean print_tags_in_output = false;
979     public void set_print_tags_in_output( boolean setting ) { print_tags_in_output = setting; }
980   
981     public boolean no_output_source_file_attribute() { return no_output_source_file_attribute; }
982     private boolean no_output_source_file_attribute = false;
983     public void set_no_output_source_file_attribute( boolean setting ) { no_output_source_file_attribute = setting; }
984   
985     public boolean no_output_inner_classes_attribute() { return no_output_inner_classes_attribute; }
986     private boolean no_output_inner_classes_attribute = false;
987     public void set_no_output_inner_classes_attribute( boolean setting ) { no_output_inner_classes_attribute = setting; }
988   
989     public List dump_body() {
990         if( dump_body == null )
991             return java.util.Collections.EMPTY_LIST;
992         else
993             return dump_body;
994     }
995     public void set_dump_body( List setting ) { dump_body = setting; }
996     private List dump_body = null;
997     public List dump_cfg() {
998         if( dump_cfg == null )
999             return java.util.Collections.EMPTY_LIST;
1000        else
1001            return dump_cfg;
1002    }
1003    public void set_dump_cfg( List setting ) { dump_cfg = setting; }
1004    private List dump_cfg = null;
1005    public boolean show_exception_dests() { return show_exception_dests; }
1006    private boolean show_exception_dests = false;
1007    public void set_show_exception_dests( boolean setting ) { show_exception_dests = setting; }
1008  
1009    public boolean gzip() { return gzip; }
1010    private boolean gzip = false;
1011    public void set_gzip( boolean setting ) { gzip = setting; }
1012  
1013    public boolean via_grimp() { return via_grimp; }
1014    private boolean via_grimp = false;
1015    public void set_via_grimp( boolean setting ) { via_grimp = setting; }
1016  
1017    public boolean via_shimple() { return via_shimple; }
1018    private boolean via_shimple = false;
1019    public void set_via_shimple( boolean setting ) { via_shimple = setting; }
1020  
1021    public int throw_analysis() {
1022        if( throw_analysis == 0 ) return throw_analysis_pedantic;
1023        return throw_analysis;
1024    }
1025    public void set_throw_analysis( int setting ) { throw_analysis = setting; }
1026    private int throw_analysis = 0;
1027    public boolean omit_excepting_unit_edges() { return omit_excepting_unit_edges; }
1028    private boolean omit_excepting_unit_edges = false;
1029    public void set_omit_excepting_unit_edges( boolean setting ) { omit_excepting_unit_edges = setting; }
1030  
1031    public List include() {
1032        if( include == null )
1033            return java.util.Collections.EMPTY_LIST;
1034        else
1035            return include;
1036    }
1037    public void set_include( List setting ) { include = setting; }
1038    private List include = null;
1039    public List exclude() {
1040        if( exclude == null )
1041            return java.util.Collections.EMPTY_LIST;
1042        else
1043            return exclude;
1044    }
1045    public void set_exclude( List setting ) { exclude = setting; }
1046    private List exclude = null;
1047    public boolean include_all() { return include_all; }
1048    private boolean include_all = false;
1049    public void set_include_all( boolean setting ) { include_all = setting; }
1050  
1051    public List dynamic_class() {
1052        if( dynamic_class == null )
1053            return java.util.Collections.EMPTY_LIST;
1054        else
1055            return dynamic_class;
1056    }
1057    public void set_dynamic_class( List setting ) { dynamic_class = setting; }
1058    private List dynamic_class = null;
1059    public List dynamic_dir() {
1060        if( dynamic_dir == null )
1061            return java.util.Collections.EMPTY_LIST;
1062        else
1063            return dynamic_dir;
1064    }
1065    public void set_dynamic_dir( List setting ) { dynamic_dir = setting; }
1066    private List dynamic_dir = null;
1067    public List dynamic_package() {
1068        if( dynamic_package == null )
1069            return java.util.Collections.EMPTY_LIST;
1070        else
1071            return dynamic_package;
1072    }
1073    public void set_dynamic_package( List setting ) { dynamic_package = setting; }
1074    private List dynamic_package = null;
1075    public boolean keep_line_number() { return keep_line_number; }
1076    private boolean keep_line_number = false;
1077    public void set_keep_line_number( boolean setting ) { keep_line_number = setting; }
1078  
1079    public boolean keep_offset() { return keep_offset; }
1080    private boolean keep_offset = false;
1081    public void set_keep_offset( boolean setting ) { keep_offset = setting; }
1082  
1083    public boolean time() { return time; }
1084    private boolean time = false;
1085    public void set_time( boolean setting ) { time = setting; }
1086  
1087    public boolean subtract_gc() { return subtract_gc; }
1088    private boolean subtract_gc = false;
1089    public void set_subtract_gc( boolean setting ) { subtract_gc = setting; }
1090  
1091
1092    public String JavaDoc getUsage() {
1093        return ""
1094
1095+"\nGeneral Options:\n"
1096      
1097+padOpt(" -h -help", "Display help and exit" )
1098+padOpt(" -pl -phase-list", "Print list of available phases" )
1099+padOpt(" -ph PHASE -phase-help PHASE", "Print help for specified PHASE" )
1100+padOpt(" -version", "Display version information and exit" )
1101+padOpt(" -v -verbose", "Verbose mode" )
1102+padOpt(" -interactive-mode", "Run in interactive mode" )
1103+padOpt(" -app", "Run in application mode" )
1104+padOpt(" -w -whole-program", "Run in whole-program mode" )
1105+padOpt(" -ws -whole-shimple", "Run in whole-shimple mode" )
1106+padOpt(" -validate", "Run internal validation on bodies" )
1107+padOpt(" -debug", "Print various Soot debugging info" )
1108+padOpt(" -debug-resolver", "Print debugging info from SootResolver" )
1109+"\nInput Options:\n"
1110      
1111+padOpt(" -cp PATH -soot-class-path PATH -soot-classpath PATH", "Use PATH as the classpath for finding classes." )
1112+padOpt(" -process-dir DIR", "Process all classes found in DIR" )
1113+padOpt(" -ast-metrics", "Compute AST Metrics if performing java to jimple" )
1114+padOpt(" -src-prec FORMAT", "Sets source precedence to FORMAT files" )
1115+padVal(" c class (default)", "Favour class files as Soot source" )
1116+padVal(" only-class", "Use only class files as Soot source" )
1117+padVal(" J jimple", "Favour Jimple files as Soot source" )
1118+padVal(" java", "Favour Java files as Soot source" )
1119+padOpt(" -full-resolver", "Force transitive resolving of referenced classes" )
1120+padOpt(" -allow-phantom-refs", "Allow unresolved classes; may cause errors" )
1121+padOpt(" -use-old-type-assigner", "Use old type assigner - may be slower" )
1122+padOpt(" -main-class CLASS", "Sets the main class for whole-program analysis." )
1123+"\nOutput Options:\n"
1124      
1125+padOpt(" -d DIR -output-dir DIR", "Store output files in DIR" )
1126+padOpt(" -f FORMAT -output-format FORMAT", "Set output format for Soot" )
1127+padVal(" J jimple", "Produce .jimple Files" )
1128+padVal(" j jimp", "Produce .jimp (abbreviated Jimple) files" )
1129+padVal(" S shimple", "Produce .shimple files" )
1130+padVal(" s shimp", "Produce .shimp (abbreviated Shimple) files" )
1131+padVal(" B baf", "Produce .baf files" )
1132+padVal(" b", "Produce .b (abbreviated Baf) files" )
1133+padVal(" G grimple", "Produce .grimple files" )
1134+padVal(" g grimp", "Produce .grimp (abbreviated Grimp) files" )
1135+padVal(" X xml", "Produce .xml Files" )
1136+padVal(" n none", "Produce no output" )
1137+padVal(" jasmin", "Produce .jasmin files" )
1138+padVal(" c class (default)", "Produce .class Files" )
1139+padVal(" d dava", "Produce dava-decompiled .java files" )
1140+padOpt(" -outjar -output-jar", "Make output dir a Jar file instead of dir" )
1141+padOpt(" -xml-attributes", "Save tags to XML attributes for Eclipse" )
1142+padOpt(" -print-tags -print-tags-in-output", "Print tags in output files after stmt" )
1143+padOpt(" -no-output-source-file-attribute", "Don't output Source File Attribute when producing class files" )
1144+padOpt(" -no-output-inner-classes-attribute", "Don't output inner classes attribute in class files" )
1145+padOpt(" -dump-body PHASENAME", "Dump the internal representation of each method before and after phase PHASENAME" )
1146+padOpt(" -dump-cfg PHASENAME", "Dump the internal representation of each CFG constructed during phase PHASENAME" )
1147+padOpt(" -show-exception-dests", "Include exception destination edges as well as CFG edges in dumped CFGs" )
1148+padOpt(" -gzip", "GZip IR output files" )
1149+"\nProcessing Options:\n"
1150      
1151+padOpt(" -p PHASE OPT:VAL -phase-option PHASE OPT:VAL", "Set PHASE's OPT option to VALUE" )
1152+padOpt(" -O -optimize", "Perform intraprocedural optimizations" )
1153+padOpt(" -W -whole-optimize", "Perform whole program optimizations" )
1154+padOpt(" -via-grimp", "Convert to bytecode via Grimp instead of via Baf" )
1155+padOpt(" -via-shimple", "Enable Shimple SSA representation" )
1156+padOpt(" -throw-analysis ARG", "" )
1157+padVal(" pedantic (default)", "Pedantically conservative throw analysis" )
1158+padVal(" unit", "Unit Throw Analysis" )
1159+padOpt(" -omit-excepting-unit-edges", "Omit CFG edges to handlers from excepting units which lack side effects" )
1160+padOpt(" -trim-cfgs", "Trim unrealizable exceptional edges from CFGs" )
1161+"\nApplication Mode Options:\n"
1162      
1163+padOpt(" -i PKG -include PKG", "Include classes in PKG as application classes" )
1164+padOpt(" -x PKG -exclude PKG", "Exclude classes in PKG from application classes" )
1165+padOpt(" -include-all", "Set default excluded packages to empty list" )
1166+padOpt(" -dynamic-class CLASS", "Note that CLASS may be loaded dynamically" )
1167+padOpt(" -dynamic-dir DIR", "Mark all classes in DIR as potentially dynamic" )
1168+padOpt(" -dynamic-package PKG", "Marks classes in PKG as potentially dynamic" )
1169+"\nInput Attribute Options:\n"
1170      
1171+padOpt(" -keep-line-number", "Keep line number tables" )
1172+padOpt(" -keep-bytecode-offset -keep-offset", "Attach bytecode offset to IR" )
1173+"\nAnnotation Options:\n"
1174      
1175+padOpt(" -annot-purity", "Emit purity attributes" )
1176+padOpt(" -annot-nullpointer", "Emit null pointer attributes" )
1177+padOpt(" -annot-arraybounds", "Emit array bounds check attributes" )
1178+padOpt(" -annot-side-effect", "Emit side-effect attributes" )
1179+padOpt(" -annot-fieldrw", "Emit field read/write attributes" )
1180+"\nMiscellaneous Options:\n"
1181      
1182+padOpt(" -time", "Report time required for transformations" )
1183+padOpt(" -subtract-gc", "Subtract gc from time" );
1184    }
1185
1186
1187    public String JavaDoc getPhaseList() {
1188        return ""
1189    
1190        +padOpt("jb", "Creates a JimpleBody for each method")
1191        +padVal("jb.ls", "Local splitter: one local per DU-UD web")
1192        +padVal("jb.a", "Aggregator: removes some unnecessary copies")
1193        +padVal("jb.ule", "Unused local eliminator")
1194        +padVal("jb.tr", "Assigns types to locals")
1195        +padVal("jb.ulp", "Local packer: minimizes number of locals")
1196        +padVal("jb.lns", "Local name standardizer")
1197        +padVal("jb.cp", "Copy propagator")
1198        +padVal("jb.dae", "Dead assignment eliminator")
1199        +padVal("jb.cp-ule", "Post-copy propagation unused local eliminator")
1200        +padVal("jb.lp", "Local packer: minimizes number of locals")
1201        +padVal("jb.ne", "Nop eliminator")
1202        +padVal("jb.uce", "Unreachable code eliminator")
1203        +padVal("jb.tt", "Trap Tightener")
1204        +padOpt("jj", "Creates a JimpleBody for each method directly from source")
1205        +padVal("jj.ls", "Local splitter: one local per DU-UD web")
1206        +padVal("jj.a", "Aggregator: removes some unnecessary copies")
1207        +padVal("jj.ule", "Unused local eliminator")
1208        +padVal("jj.tr", "Assigns types to locals")
1209        +padVal("jj.ulp", "Local packer: minimizes number of locals")
1210        +padVal("jj.lns", "Local name standardizer")
1211        +padVal("jj.cp", "Copy propagator")
1212        +padVal("jj.dae", "Dead assignment eliminator")
1213        +padVal("jj.cp-ule", "Post-copy propagation unused local eliminator")
1214        +padVal("jj.lp", "Local packer: minimizes number of locals")
1215        +padVal("jj.ne", "Nop eliminator")
1216        +padVal("jj.uce", "Unreachable code eliminator")
1217        +padOpt("cg", "Call graph constructor")
1218        +padVal("cg.cha", "Builds call graph using Class Hierarchy Analysis")
1219        +padVal("cg.spark", "Spark points-to analysis framework")
1220        +padVal("cg.paddle", "Paddle points-to analysis framework")
1221        +padOpt("wstp", "Whole-shimple transformation pack")
1222        +padOpt("wsop", "Whole-shimple optimization pack")
1223        +padOpt("wjtp", "Whole-jimple transformation pack")
1224        +padOpt("wjop", "Whole-jimple optimization pack")
1225        +padVal("wjop.smb", "Static method binder: Devirtualizes monomorphic calls")
1226        +padVal("wjop.si", "Static inliner: inlines monomorphic calls")
1227        +padOpt("wjap", "Whole-jimple annotation pack: adds interprocedural tags")
1228        +padVal("wjap.ra", "Rectangular array finder")
1229        +padVal("wjap.umt", "Tags all unreachable methods")
1230        +padVal("wjap.uft", "Tags all unreachable fields")
1231        +padVal("wjap.tqt", "Tags all qualifiers that could be tighter")
1232        +padVal("wjap.cgg", "Creates graphical call graph.")
1233        +padVal("wjap.purity", "Emit purity attributes")
1234        +padOpt("shimple", "Sets parameters for Shimple SSA form")
1235        +padOpt("stp", "Shimple transformation pack")
1236        +padOpt("sop", "Shimple optimization pack")
1237        +padVal("sop.cpf", "Shimple constant propagator and folder")
1238        +padOpt("jtp", "Jimple transformation pack: intraprocedural analyses added to Soot")
1239        +padOpt("jop", "Jimple optimization pack (intraprocedural)")
1240        +padVal("jop.cse", "Common subexpression eliminator")
1241        +padVal("jop.bcm", "Busy code motion: unaggressive partial redundancy elimination")
1242        +padVal("jop.lcm", "Lazy code motion: aggressive partial redundancy elimination")
1243        +padVal("jop.cp", "Copy propagator")
1244        +padVal("jop.cpf", "Constant propagator and folder")
1245        +padVal("jop.cbf", "Conditional branch folder")
1246        +padVal("jop.dae", "Dead assignment eliminator")
1247        +padVal("jop.uce1", "Unreachable code eliminator, pass 1")
1248        +padVal("jop.ubf1", "Unconditional branch folder, pass 1")
1249        +padVal("jop.uce2", "Unreachable code eliminator, pass 2")
1250        +padVal("jop.ubf2", "Unconditional branch folder, pass 2")
1251        +padVal("jop.ule", "Unused local eliminator")
1252        +padOpt("jap", "Jimple annotation pack: adds intraprocedural tags")
1253        +padVal("jap.npc", "Null pointer checker")
1254        +padVal("jap.npcolorer", "Null pointer colourer: tags references for eclipse")
1255        +padVal("jap.abc", "Array bound checker")
1256        +padVal("jap.profiling", "Instruments null pointer and array checks")
1257        +padVal("jap.sea", "Side effect tagger")
1258        +padVal("jap.fieldrw", "Field read/write tagger")
1259        +padVal("jap.cgtagger", "Call graph tagger")
1260        +padVal("jap.parity", "Parity tagger")
1261        +padVal("jap.pat", "Colour-codes method parameters that may be aliased")
1262        +padVal("jap.lvtagger", "Creates color tags for live variables")
1263        +padVal("jap.rdtagger", "Creates link tags for reaching defs")
1264        +padVal("jap.che", "Indicates whether cast checks can be eliminated")
1265        +padVal("jap.umt", "Inserts assertions into unreachable methods")
1266        +padVal("jap.lit", "Tags loop invariants")
1267        +padVal("jap.aet", "Tags statements with sets of available expressions")
1268        +padVal("jap.dmt", "Tags dominators of statement")
1269        +padOpt("gb", "Creates a GrimpBody for each method")
1270        +padVal("gb.a1", "Aggregator: removes some copies, pre-folding")
1271        +padVal("gb.cf", "Constructor folder")
1272        +padVal("gb.a2", "Aggregator: removes some copies, post-folding")
1273        +padVal("gb.ule", "Unused local eliminator")
1274        +padOpt("gop", "Grimp optimization pack")
1275        +padOpt("bb", "Creates Baf bodies")
1276        +padVal("bb.lso", "Load store optimizer")
1277        +padVal("bb.pho", "Peephole optimizer")
1278        +padVal("bb.ule", "Unused local eliminator")
1279        +padVal("bb.lp", "Local packer: minimizes number of locals")
1280        +padOpt("bop", "Baf optimization pack")
1281        +padOpt("tag", "Tag aggregator: turns tags into attributes")
1282        +padVal("tag.ln", "Line number aggregator")
1283        +padVal("tag.an", "Array bounds and null pointer check aggregator")
1284        +padVal("tag.dep", "Dependence aggregator")
1285        +padVal("tag.fieldrw", "Field read/write aggregator")
1286        +padOpt("db", "Dummy phase to store options for Dava")
1287        +padVal("db.transformations", "The Dava back-end with all its transformations")
1288        +padVal("db.renamer", "Apply heuristics based naming of local variables")
1289        +padVal("db.deobfuscate", " Apply de-obfuscation analyses")
1290        +padVal("db.force-recompile", " Try to get recompilable code.");
1291    }
1292
1293    public String JavaDoc getPhaseHelp( String JavaDoc phaseName ) {
1294    
1295        if( phaseName.equals( "jb" ) )
1296            return "Phase "+phaseName+":\n"+
1297                "\nJimple Body Creation creates a JimpleBody for each input \nmethod, using either coffi, to read .class files, or the jimple \nparser, to read .jimple files. "
1298                +"\n\nRecognized options (with default values):\n"
1299                +padOpt( "enabled (true)", "" )
1300                +padOpt( "use-original-names (false)", "" );
1301    
1302        if( phaseName.equals( "jb.ls" ) )
1303            return "Phase "+phaseName+":\n"+
1304                "\nThe Local Splitter identifies DU-UD webs for local variables \nand introduces new variables so that each disjoint web is \nassociated with a single local. "
1305                +"\n\nRecognized options (with default values):\n"
1306                +padOpt( "enabled (true)", "" );
1307    
1308        if( phaseName.equals( "jb.a" ) )
1309            return "Phase "+phaseName+":\n"+
1310                "\nThe Jimple Local Aggregator removes some unnecessary copies by \ncombining local variables. Essentially, it finds definitions \nwhich have only a single use and, if it is safe to do so, \nremoves the original definition after replacing the use with the \ndefinition's right-hand side. At this stage in JimpleBody \nconstruction, local aggregation serves largely to remove the \ncopies to and from stack variables which simulate load and store \ninstructions in the original bytecode."
1311                +"\n\nRecognized options (with default values):\n"
1312                +padOpt( "enabled (true)", "" )
1313                +padOpt( "only-stack-locals (true)", "" );
1314    
1315        if( phaseName.equals( "jb.ule" ) )
1316            return "Phase "+phaseName+":\n"+
1317                "\nThe Unused Local Eliminator removes any unused locals from the \nmethod. "
1318                +"\n\nRecognized options (with default values):\n"
1319                +padOpt( "enabled (true)", "" );
1320    
1321        if( phaseName.equals( "jb.tr" ) )
1322            return "Phase "+phaseName+":\n"+
1323                "\nThe Type Assigner gives local variables types which will \naccommodate the values stored in them over the course of the \nmethod. "
1324                +"\n\nRecognized options (with default values):\n"
1325                +padOpt( "enabled (true)", "" );
1326    
1327        if( phaseName.equals( "jb.ulp" ) )
1328            return "Phase "+phaseName+":\n"+
1329                "\nThe Unsplit-originals Local Packer executes only when the \n`use-original-names' option is chosen for the `jb' phase. The \nLocal Packer attempts to minimize the number of local variables \nrequired in a method by reusing the same variable for disjoint \nDU-UD webs. Conceptually, it is the inverse of the Local \nSplitter. "
1330                +"\n\nRecognized options (with default values):\n"
1331                +padOpt( "enabled (true)", "" )
1332                +padOpt( "unsplit-original-locals (true)", "" );
1333    
1334        if( phaseName.equals( "jb.lns" ) )
1335            return "Phase "+phaseName+":\n"+
1336                "\nThe Local Name Standardizer assigns generic names to local \nvariables. "
1337                +"\n\nRecognized options (with default values):\n"
1338                +padOpt( "enabled (true)", "" )
1339                +padOpt( "only-stack-locals (false)", "" );
1340    
1341        if( phaseName.equals( "jb.cp" ) )
1342            return "Phase "+phaseName+":\n"+
1343                "\nThis phase performs cascaded copy propagation. If the \npropagator encounters situations of the form: A: a = ...; \n... B: x = a; ... C: ... = ... x; where a and x are \neach defined only once (at A and B, respectively), then it can \npropagate immediately without checking between B and C for \nredefinitions of a. In this case the propagator is global. \nOtherwise, if a has multiple definitions then the propagator \nchecks for redefinitions and propagates copies only within \nextended basic blocks. "
1344                +"\n\nRecognized options (with default values):\n"
1345                +padOpt( "enabled (true)", "" )
1346                +padOpt( "only-regular-locals (false)", "" )
1347                +padOpt( "only-stack-locals (true)", "" );
1348    
1349        if( phaseName.equals( "jb.dae" ) )
1350            return "Phase "+phaseName+":\n"+
1351                "\nThe Dead Assignment Eliminator eliminates assignment statements \nto locals whose values are not subsequently used, unless \nevaluating the right-hand side of the assignment may cause \nside-effects. "
1352                +"\n\nRecognized options (with default values):\n"
1353                +padOpt( "enabled (true)", "" )
1354                +padOpt( "only-stack-locals (true)", "" );
1355    
1356        if( phaseName.equals( "jb.cp-ule" ) )
1357            return "Phase "+phaseName+":\n"+
1358                "\nThis phase removes any locals that are unused after copy \npropagation. "
1359                +"\n\nRecognized options (with default values):\n"
1360                +padOpt( "enabled (true)", "" );
1361    
1362        if( phaseName.equals( "jb.lp" ) )
1363            return "Phase "+phaseName+":\n"+
1364                "\nThe Local Packer attempts to minimize the number of local \nvariables required in a method by reusing the same variable for \ndisjoint DU-UD webs. Conceptually, it is the inverse of the \nLocal Splitter. "
1365                +"\n\nRecognized options (with default values):\n"
1366                +padOpt( "enabled (false)", "" )
1367                +padOpt( "unsplit-original-locals (false)", "" );
1368    
1369        if( phaseName.equals( "jb.ne" ) )
1370            return "Phase "+phaseName+":\n"+
1371                "\nThe Nop Eliminator removes nop statements from the method. "
1372                +"\n\nRecognized options (with default values):\n"
1373                +padOpt( "enabled (true)", "" );
1374    
1375        if( phaseName.equals( "jb.uce" ) )
1376            return "Phase "+phaseName+":\n"+
1377                "\nThe Unreachable Code Eliminator removes unreachable code and \ntraps whose catch blocks are empty. "
1378                +"\n\nRecognized options (with default values):\n"
1379                +padOpt( "enabled (true)", "" )
1380                +padOpt( "remove-unreachable-traps (false)", "" );
1381    
1382        if( phaseName.equals( "jb.tt" ) )
1383            return "Phase "+phaseName+":\n"+
1384                "\nThe Trap Tightener changes the area protected by each exception \nhandler, so that it begins with the first instruction in the old \nprotected area which is actually capable of throwing an \nexception caught by the handler, and ends just after the last \ninstruction in the old protected area which can throw an \nexception caught by the handler. This reduces the chance of \nproducing unverifiable code as a byproduct of pruning \nexceptional control flow within CFGs. "
1385                +"\n\nRecognized options (with default values):\n"
1386                +padOpt( "enabled (false)", "" );
1387    
1388        if( phaseName.equals( "jj" ) )
1389            return "Phase "+phaseName+":\n"+
1390                "\nJimple Body Creation creates a JimpleBody for each input \nmethod, using polyglot, to read .java files. "
1391                +"\n\nRecognized options (with default values):\n"
1392                +padOpt( "enabled (true)", "" )
1393                +padOpt( "use-original-names (true)", "" );
1394    
1395        if( phaseName.equals( "jj.ls" ) )
1396            return "Phase "+phaseName+":\n"+
1397                "\nThe Local Splitter identifies DU-UD webs for local variables \nand introduces new variables so that each disjoint web is \nassociated with a single local. "
1398                +"\n\nRecognized options (with default values):\n"
1399                +padOpt( "enabled (false)", "" );
1400    
1401        if( phaseName.equals( "jj.a" ) )
1402            return "Phase "+phaseName+":\n"+
1403                "\nThe Jimple Local Aggregator removes some unnecessary copies by \ncombining local variables. Essentially, it finds definitions \nwhich have only a single use and, if it is safe to do so, \nremoves the original definition after replacing the use with the \ndefinition's right-hand side. At this stage in JimpleBody \nconstruction, local aggregation serves largely to remove the \ncopies to and from stack variables which simulate load and store \ninstructions in the original bytecode."
1404                +"\n\nRecognized options (with default values):\n"
1405                +padOpt( "enabled (true)", "" )
1406                +padOpt( "only-stack-locals (true)", "" );
1407    
1408        if( phaseName.equals( "jj.ule" ) )
1409            return "Phase "+phaseName+":\n"+
1410                "\nThe Unused Local Eliminator removes any unused locals from the \nmethod. "
1411                +"\n\nRecognized options (with default values):\n"
1412                +padOpt( "enabled (true)", "" );
1413    
1414        if( phaseName.equals( "jj.tr" ) )
1415            return "Phase "+phaseName+":\n"+
1416                "\nThe Type Assigner gives local variables types which will \naccommodate the values stored in them over the course of the \nmethod. "
1417                +"\n\nRecognized options (with default values):\n"
1418                +padOpt( "enabled (false)", "" );
1419    
1420        if( phaseName.equals( "jj.ulp" ) )
1421            return "Phase "+phaseName+":\n"+
1422                "\nThe Unsplit-originals Local Packer executes only when the \n`use-original-names' option is chosen for the `jb' phase. The \nLocal Packer attempts to minimize the number of local variables \nrequired in a method by reusing the same variable for disjoint \nDU-UD webs. Conceptually, it is the inverse of the Local \nSplitter. "
1423                +"\n\nRecognized options (with default values):\n"
1424                +padOpt( "enabled (false)", "" )
1425                +padOpt( "unsplit-original-locals (false)", "" );
1426    
1427        if( phaseName.equals( "jj.lns" ) )
1428            return "Phase "+phaseName+":\n"+
1429                "\nThe Local Name Standardizer assigns generic names to local \nvariables. "
1430                +"\n\nRecognized options (with default values):\n"
1431                +padOpt( "enabled (true)", "" )
1432                +padOpt( "only-stack-locals (false)", "" );
1433    
1434        if( phaseName.equals( "jj.cp" ) )
1435            return "Phase "+phaseName+":\n"+
1436                "\nThis phase performs cascaded copy propagation. If the \npropagator encounters situations of the form: A: a = ...; \n... B: x = a; ... C: ... = ... x; where a and x are \neach defined only once (at A and B, respectively), then it can \npropagate immediately without checking between B and C for \nredefinitions of a. In this case the propagator is global. \nOtherwise, if a has multiple definitions then the propagator \nchecks for redefinitions and propagates copies only within \nextended basic blocks. "
1437                +"\n\nRecognized options (with default values):\n"
1438                +padOpt( "enabled (true)", "" )
1439                +padOpt( "only-regular-locals (false)", "" )
1440                +padOpt( "only-stack-locals (true)", "" );
1441    
1442        if( phaseName.equals( "jj.dae" ) )
1443            return "Phase "+phaseName+":\n"+
1444                "\nThe Dead Assignment Eliminator eliminates assignment statements \nto locals whose values are not subsequently used, unless \nevaluating the right-hand side of the assignment may cause \nside-effects. "
1445                +"\n\nRecognized options (with default values):\n"
1446                +padOpt( "enabled (true)", "" )
1447                +padOpt( "only-stack-locals (true)", "" );
1448    
1449        if( phaseName.equals( "jj.cp-ule" ) )
1450            return "Phase "+phaseName+":\n"+
1451                "\nThis phase removes any locals that are unused after copy \npropagation. "
1452                +"\n\nRecognized options (with default values):\n"
1453                +padOpt( "enabled (true)", "" );
1454    
1455        if( phaseName.equals( "jj.lp" ) )
1456            return "Phase "+phaseName+":\n"+
1457                "\nThe Local Packer attempts to minimize the number of local \nvariables required in a method by reusing the same variable for \ndisjoint DU-UD webs. Conceptually, it is the inverse of the \nLocal Splitter. "
1458                +"\n\nRecognized options (with default values):\n"
1459                +padOpt( "enabled (false)", "" )
1460                +padOpt( "unsplit-original-locals (false)", "" );
1461    
1462        if( phaseName.equals( "jj.ne" ) )
1463            return "Phase "+phaseName+":\n"+
1464                "\nThe Nop Eliminator removes nop statements from the method. "
1465                +"\n\nRecognized options (with default values):\n"
1466                +padOpt( "enabled (true)", "" );
1467    
1468        if( phaseName.equals( "jj.uce" ) )
1469            return "Phase "+phaseName+":\n"+
1470                "\nThe Unreachable Code Eliminator removes unreachable code and \ntraps whose catch blocks are empty. "
1471                +"\n\nRecognized options (with default values):\n"
1472                +padOpt( "enabled (true)", "" );
1473    
1474        if( phaseName.equals( "cg" ) )
1475            return "Phase "+phaseName+":\n"+
1476                "\nThe Call Graph Constructor computes a call graph for whole \nprogram analysis. When this pack finishes, a call graph is \navailable in the Scene. The different phases in this pack are \ndifferent ways to construct the call graph. Exactly one phase in \nthis pack must be enabled; Soot will raise an error otherwise. "
1477                +"\n\nRecognized options (with default values):\n"
1478                +padOpt( "enabled (true)", "" )
1479                +padOpt( "safe-forname (false)", "Handle Class.forName() calls conservatively" )
1480                +padOpt( "safe-newinstance (false)", "Handle Class.newInstance() calls conservatively" )
1481                +padOpt( "verbose (false)", "Print warnings about where the call graph may be incomplete" )
1482                +padOpt( "jdkver (3)", "JDK version for native methods" )
1483                +padOpt( "all-reachable (false)", "Assume all methods of application classes are reachable." )
1484                +padOpt( "implicit-entry (true)", "Include methods called implicitly by the VM as entry points" )
1485                +padOpt( "trim-clinit (true)", "Removes redundant static initializer calls" );
1486    
1487        if( phaseName.equals( "cg.cha" ) )
1488            return "Phase "+phaseName+":\n"+
1489                "\nThis phase uses Class Hierarchy Analysis to generate a call \ngraph."
1490                +"\n\nRecognized options (with default values):\n"
1491                +padOpt( "enabled (true)", "" )
1492                +padOpt( "verbose (false)", "Print statistics about the resulting call graph" );
1493    
1494        if( phaseName.equals( "cg.spark" ) )
1495            return "Phase "+phaseName+":\n"+
1496                "\nSpark is a flexible points-to analysis framework. Aside from \nbuilding a call graph, it also generates information about the \ntargets of pointers. For details about Spark, please see Ondrej \nLhotak's M.Sc. thesis."
1497                +"\n\nRecognized options (with default values):\n"
1498                +padOpt( "enabled (false)", "" )
1499                +padOpt( "verbose (false)", "Print detailed information about the execution of Spark" )
1500                +padOpt( "ignore-types (false)", "Make Spark completely ignore declared types of variables" )
1501                +padOpt( "force-gc (false)", "Force garbage collection for measuring memory usage" )
1502                +padOpt( "pre-jimplify (false)", "Jimplify all methods before starting Spark" )
1503                +padOpt( "vta (false)", "Emulate Variable Type Analysis" )
1504                +padOpt( "rta (false)", "Emulate Rapid Type Analysis" )
1505                +padOpt( "field-based (false)", "Use a field-based rather than field-sensitive representation" )
1506                +padOpt( "types-for-sites (false)", "Represent objects by their actual type rather than allocation site" )
1507                +padOpt( "merge-stringbuffer (true)", "Represent all StringBuffers as one object" )
1508                +padOpt( "string-constants (false)", "Propagate all string constants, not just class names" )
1509                +padOpt( "simulate-natives (true)", "Simulate effects of native methods in standard class library" )
1510                +padOpt( "simple-edges-bidirectional (false)", "Equality-based analysis between variable nodes" )
1511                +padOpt( "on-fly-cg (true)", "Build call graph as receiver types become known" )
1512                +padOpt( "simplify-offline (false)", "Collapse single-entry subgraphs of the PAG" )
1513                +padOpt( "simplify-sccs (false)", "Collapse strongly-connected components of the PAG" )
1514                +padOpt( "ignore-types-for-sccs (false)", "Ignore declared types when determining node equivalence for SCCs" )
1515                +padOpt( "propagator", "Select propagation algorithm" )
1516                +padVal( "iter", "Simple iterative algorithm" )
1517                
1518                +padVal( "worklist (default)", "Fast, worklist-based algorithm" )
1519                
1520                +padVal( "cycle", "Unfinished on-the-fly cycle detection algorithm" )
1521                
1522                +padVal( "merge", "Unfinished field reference merging algorithms" )
1523                
1524                +padVal( "alias", "Alias-edge based algorithm" )
1525                
1526                +padVal( "none", "Disable propagation" )
1527                
1528                +padOpt( "set-impl", "Select points-to set implementation" )
1529                +padVal( "hash", "Use Java HashSet" )
1530                
1531                +padVal( "bit", "Bit vector" )
1532                
1533                +padVal( "hybrid", "Hybrid representation using bit vector for large sets" )
1534                
1535                +padVal( "array", "Sorted array representation" )
1536                
1537                +padVal( "double (default)", "Double set representation for incremental propagation" )
1538                
1539                +padVal( "shared", "Shared bit-vector representation" )
1540                
1541                +padOpt( "double-set-old", "Select implementation of points-to set for old part of double set" )
1542                +padVal( "hash", "Use Java HashSet" )
1543                
1544                +padVal( "bit", "Bit vector" )
1545                
1546                +padVal( "hybrid (default)", "Hybrid representation using bit vector for large sets" )
1547                
1548                +padVal( "array", "Sorted array representation" )
1549                
1550                +padVal( "shared", "Shared bit-vector representation" )
1551                
1552                +padOpt( "double-set-new", "Select implementation of points-to set for new part of double set" )
1553                +padVal( "hash", "Use Java HashSet" )
1554                
1555                +padVal( "bit", "Bit vector" )
1556                
1557                +padVal( "hybrid (default)", "Hybrid representation using bit vector for large sets" )
1558                
1559                +padVal( "array", "Sorted array representation" )
1560                
1561                +padVal( "shared", "Shared bit-vector representation" )
1562                
1563                +padOpt( "dump-html (false)", "Dump pointer assignment graph to HTML for debugging" )
1564                +padOpt( "dump-pag (false)", "Dump pointer assignment graph for other solvers" )
1565                +padOpt( "dump-solution (false)", "Dump final solution for comparison with other solvers" )
1566                +padOpt( "topo-sort (false)", "Sort variable nodes in dump" )
1567                +padOpt( "dump-types (true)", "Include declared types in dump" )
1568                +padOpt( "class-method-var (true)", "In dump, label variables by class and method" )
1569                +padOpt( "dump-answer (false)", "Dump computed reaching types for comparison with other solvers" )
1570                +padOpt( "add-tags (false)", "Output points-to results in tags for viewing with the Jimple" )
1571                +padOpt( "set-mass (false)", "Calculate statistics about points-to set sizes" );
1572    
1573        if( phaseName.equals( "cg.paddle" ) )
1574            return "Phase "+phaseName+":\n"+
1575                "\nPaddle is a BDD-based interprocedural analysis framework. It \nincludes points-to analysis, call graph construction, and \nvarious client analyses."
1576                +"\n\nRecognized options (with default values):\n"
1577                +padOpt( "enabled (false)", "" )
1578                +padOpt( "verbose (false)", "Print detailed information about the execution of Paddle" )
1579                +padOpt( "conf", "Select Paddle configuration" )
1580                +padVal( "ofcg (default)", "On-the fly call graph" )
1581                
1582                +padVal( "cha", "CHA only" )
1583                
1584                +padVal( "cha-aot", "CHA ahead-of-time callgraph" )
1585                
1586                +padVal( "ofcg-aot", "OFCG-AOT callgraph" )
1587                
1588                +padVal( "cha-context-aot", "CHA-Context-AOT callgraph" )
1589                
1590                +padVal( "ofcg-context-aot", "OFCG-Context-AOT callgraph" )
1591                
1592                +padVal( "cha-context", "CHA-Context callgraph" )
1593                
1594                +padVal( "ofcg-context", "OFCG-Context callgraph" )
1595                
1596                +padOpt( "bdd (false)", "Use BDD version of Paddle" )
1597                +padOpt( "order (32)", "" )
1598                +padOpt( "dynamic-order", "" )
1599                +padOpt( "profile (false)", "Profile BDDs using JeddProfiler" )
1600                +padOpt( "q", "Select queue implementation" )
1601                +padVal( "auto (default)", "Select queue implementation based on bdd option" )
1602                
1603                +padVal( "trad", "Normal worklist queue implementation" )
1604                
1605                +padVal( "bdd", "BDD-based queue implementation" )
1606                
1607                +padVal( "debug", "Debugging queue implementation" )
1608                
1609                +padVal( "trace", "Tracing queue implementation" )
1610                
1611                +padVal( "numtrace", "Number-tracing queue implementation" )
1612                
1613                +padOpt( "backend", "Select BDD backend" )
1614                +padVal( "buddy (default)", "BuDDy backend" )
1615                
1616                +padVal( "cudd", "CUDD backend" )
1617                
1618                +padVal( "sable", "SableJBDD backend" )
1619                
1620                +padVal( "javabdd", "JavaBDD backend" )
1621                
1622                +padVal( "none", "No BDDs" )
1623                
1624                +padOpt( "ignore-types (false)", "Make Paddle completely ignore declared types of variables" )
1625                +padOpt( "pre-jimplify (false)", "Jimplify all methods before starting Paddle" )
1626                +padOpt( "context", "Select context-sensitivity level" )
1627                +padVal( "insens (default)", "Builds a context-insensitive call graph" )
1628                
1629                +padVal( "1cfa", "Builds a 1-CFA call graph" )
1630                
1631                +padVal( "kcfa", "Builds a k-CFA call graph" )
1632                
1633                +padVal( "objsens", "Builds an object-sensitive call graph" )
1634                
1635                +padVal( "kobjsens", "Builds a k-object-sensitive call graph" )
1636                
1637                +padVal( "uniqkobjsens", "Builds a unique-k-object-sensitive call graph" )
1638                
1639                +padOpt( "k (2)", "" )
1640                +padOpt( "context-heap (false)", "Treat allocation sites context-sensitively" )
1641                +padOpt( "rta (false)", "Emulate Rapid Type Analysis" )
1642                +padOpt( "field-based (false)", "Use a field-based rather than field-sensitive representation" )
1643                +padOpt( "types-for-sites (false)", "Represent objects by their actual type rather than allocation site" )
1644                +padOpt( "merge-stringbuffer (true)", "Represent all StringBuffers as one object" )
1645                +padOpt( "string-constants (false)", "Propagate all string constants, not just class names" )
1646                +padOpt( "simulate-natives (true)", "Simulate effects of native methods in standard class library" )
1647                +padOpt( "global-nodes-in-natives (false)", "Use global node to model variables in simulations of native methods" )
1648                +padOpt( "simple-edges-bidirectional (false)", "Equality-based analysis between variable nodes" )
1649                +padOpt( "this-edges (false)", "Use pointer assignment edges to model this parameters" )
1650                +padOpt( "precise-newinstance (true)", "Make newInstance only allocate objects of dynamic classes" )
1651                +padOpt( "propagator", "Select propagation algorithm" )
1652                +padVal( "auto (default)", "Select propagation algorithm based on bdd option" )
1653                
1654                +padVal( "iter", "Simple iterative algorithm" )
1655                
1656                +padVal( "worklist", "Fast, worklist-based algorithm" )
1657                
1658                +padVal( "alias", "Alias-edge based algorithm" )
1659                
1660                +padVal( "bdd", "BDD-based propagator" )
1661                
1662                +padVal( "incbdd", "Incrementalized BDD-based propagator" )
1663                
1664                +padOpt( "set-impl", "Select points-to set implementation" )
1665                +padVal( "hash", "Use Java HashSet" )
1666                
1667                +padVal( "bit", "Bit vector" )
1668                
1669                +padVal( "hybrid", "Hybrid representation using bit vector for large sets" )
1670                
1671                +padVal( "array", "Sorted array representation" )
1672                
1673                +padVal( "double (default)", "Double set representation for incremental propagation" )
1674                
1675                +padOpt( "double-set-old", "Select implementation of points-to set for old part of double set" )
1676                +padVal( "hash", "Use Java HashSet" )
1677                
1678                +padVal( "bit", "Bit vector" )
1679                
1680                +padVal( "hybrid (default)", "Hybrid representation using bit vector for large sets" )
1681                
1682                +padVal( "array", "Sorted array representation" )
1683                
1684                +padOpt( "double-set-new", "Select implementation of points-to set for new part of double set" )
1685                +padVal( "hash", "Use Java HashSet" )
1686                
1687                +padVal( "bit", "Bit vector" )
1688                
1689                +padVal( "hybrid (default)", "Hybrid representation using bit vector for large sets" )
1690                
1691                +padVal( "array", "Sorted array representation" )
1692                
1693                +padOpt( "context-counts (false)", "Print number of contexts for each method" )
1694                +padOpt( "total-context-counts (false)", "Print total number of contexts" )
1695                +padOpt( "method-context-counts (false)", "Print number of contexts for each method" )
1696                +padOpt( "set-mass (false)", "Calculate statistics about points-to set sizes" )
1697                +padOpt( "number-nodes (true)", "Print node numbers in dumps" );
1698    
1699        if( phaseName.equals( "wstp" ) )
1700            return "Phase "+phaseName+":\n"+
1701                "\nSoot can perform whole-program analyses. In whole-shimple \nmode, Soot applies the contents of the Whole-Shimple \nTransformation Pack to the scene as a whole after constructing a \ncall graph for the program. In an unmodified copy of Soot the \nWhole-Shimple Transformation Pack is empty."
1702                +"\n\nRecognized options (with default values):\n"
1703                +padOpt( "enabled (true)", "" );
1704    
1705        if( phaseName.equals( "wsop" ) )
1706            return "Phase "+phaseName+":\n"+
1707                "\nIf Soot is running in whole shimple mode and the Whole-Shimple \nOptimization Pack is enabled, the pack's transformations are \napplied to the scene as a whole after construction of the call \ngraph and application of any enabled Whole-Shimple \nTransformations. In an unmodified copy of Soot the Whole-Shimple \nOptimization Pack is empty."
1708                +"\n\nRecognized options (with default values):\n"
1709                +padOpt( "enabled (false)", "" );
1710    
1711        if( phaseName.equals( "wjtp" ) )
1712            return "Phase "+phaseName+":\n"+
1713                "\nSoot can perform whole-program analyses. In whole-program \nmode, Soot applies the contents of the Whole-Jimple \nTransformation Pack to the scene as a whole after constructing a \ncall graph for the program. In an unmodified copy of Soot the \nWhole-Jimple Transformation Pack is empty."
1714                +"\n\nRecognized options (with default values):\n"
1715                +padOpt( "enabled (true)", "" );
1716    
1717        if( phaseName.equals( "wjop" ) )
1718            return "Phase "+phaseName+":\n"+
1719                "\nIf Soot is running in whole program mode and the Whole-Jimple \nOptimization Pack is enabled, the pack's transformations are \napplied to the scene as a whole after construction of the call \ngraph and application of any enabled Whole-Jimple \nTransformations."
1720                +"\n\nRecognized options (with default values):\n"
1721                +padOpt( "enabled (false)", "" );
1722    
1723        if( phaseName.equals( "wjop.smb" ) )
1724            return "Phase "+phaseName+":\n"+
1725                "\nThe Static Method Binder statically binds monomorphic call \nsites. That is, it searches the call graph for virtual method \ninvocations that can be determined statically to call only a \nsingle implementation of the called method. Then it replaces \nsuch virtual invocations with invocations of a static copy of \nthe single called implementation. "
1726                +"\n\nRecognized options (with default values):\n"
1727                +padOpt( "enabled (false)", "" )
1728                +padOpt( "insert-null-checks (true)", "" )
1729                +padOpt( "insert-redundant-casts (true)", "" )
1730                +padOpt( "allowed-modifier-changes", "" )
1731                +padVal( "unsafe (default)", "" )
1732                
1733                +padVal( "safe", "" )
1734                
1735                +padVal( "none", "" )
1736                ;
1737    
1738        if( phaseName.equals( "wjop.si" ) )
1739            return "Phase "+phaseName+":\n"+
1740                "\nThe Static Inliner visits all call sites in the call graph in a \nbottom-up fashion, replacing monomorphic calls with inlined \ncopies of the invoked methods. "
1741                +"\n\nRecognized options (with default values):\n"
1742                +padOpt( "enabled (true)", "" )
1743                +padOpt( "rerun-jb (true)", "" )
1744                +padOpt( "insert-null-checks (true)", "" )
1745                +padOpt( "insert-redundant-casts (true)", "" )
1746                +padOpt( "allowed-modifier-changes", "" )
1747                +padVal( "unsafe (default)", "" )
1748                
1749                +padVal( "safe", "" )
1750                
1751                +padVal( "none", "" )
1752                
1753                +padOpt( "expansion-factor (3)", "" )
1754                +padOpt( "max-container-size (5000)", "" )
1755                +padOpt( "max-inlinee-size (20)", "" );
1756    
1757        if( phaseName.equals( "wjap" ) )
1758            return "Phase "+phaseName+":\n"+
1759                "\nSome analyses do not transform Jimple body directly, but \nannotate statements or values with tags. Whole-Jimple annotation \npack provides a place for annotation-oriented analyses in whole \nprogram mode."
1760                +"\n\nRecognized options (with default values):\n"
1761                +padOpt( "enabled (true)", "" );
1762    
1763        if( phaseName.equals( "wjap.ra" ) )
1764            return "Phase "+phaseName+":\n"+
1765                "\nThe Rectangular Array Finder traverses Jimple statements based \non the static call graph, and finds array variables which always \nhold rectangular two-dimensional array objects. In Java, a \nmulti-dimensional array is an array of arrays, which means the \nshape of the array can be ragged. Nevertheless, many \napplications use rectangular arrays. Knowing that an array is \nrectangular can be very helpful in proving safe array bounds \nchecks. The Rectangular Array Finder does not change the program \nbeing analyzed. Its results are used by the Array Bound Checker."
1766                +"\n\nRecognized options (with default values):\n"
1767                +padOpt( "enabled (false)", "" );
1768    
1769        if( phaseName.equals( "wjap.umt" ) )
1770            return "Phase "+phaseName+":\n"+
1771                "\nUses the call graph to determine which methods are unreachable \nand adds color tags so they can be highlighted in a source \nbrowser."
1772                +"\n\nRecognized options (with default values):\n"
1773                +padOpt( "enabled (false)", "" );
1774    
1775        if( phaseName.equals( "wjap.uft" ) )
1776            return "Phase "+phaseName+":\n"+
1777                "\nUses the call graph to determine which fields are unreachable \nand adds color tags so they can be highlighted in a source \nbrowser."
1778                +"\n\nRecognized options (with default values):\n"
1779                +padOpt( "enabled (false)", "" );
1780    
1781        if( phaseName.equals( "wjap.tqt" ) )
1782            return "Phase "+phaseName+":\n"+
1783                "\nDetermines which methods and fields have qualifiers that could \nbe tightened. For example: if a field or method has the \nqualifier of public but is only used within the declaring class \nit could be private. This, this field or method is tagged with \ncolor tags so that the results can be highlighted in a source \nbrowser."
1784                +"\n\nRecognized options (with default values):\n"
1785                +padOpt( "enabled (false)", "" );
1786    
1787        if( phaseName.equals( "wjap.cgg" ) )
1788            return "Phase "+phaseName+":\n"+
1789                "\nCreates graphical call graph."
1790                +"\n\nRecognized options (with default values):\n"
1791                +padOpt( "enabled (false)", "" )
1792                +padOpt( "show-lib-meths (false)", "" );
1793    
1794        if( phaseName.equals( "wjap.purity" ) )
1795            return "Phase "+phaseName+":\n"+
1796                "\nPurity anaysis implemented by Antoine Mine and based on the \npaper A Combined Pointer and Purity Analysis for Java Programs \nby Alexandru Salcianu and Martin Rinard. "
1797                +"\n\nRecognized options (with default values):\n"
1798                +padOpt( "enabled (false)", "" )
1799                +padOpt( "dump-summaries (true)", "" )
1800                +padOpt( "dump-cg (false)", "" )
1801                +padOpt( "dump-intra (false)", "" )
1802                +padOpt( "print (true)", "" )
1803                +padOpt( "verbose (false)", "" );
1804    
1805        if( phaseName.equals( "shimple" ) )
1806            return "Phase "+phaseName+":\n"+
1807                "\nShimple Control sets parameters which apply throughout the \ncreation and manipulation of Shimple bodies. Shimple is Soot's \nSSA representation."
1808                +"\n\nRecognized options (with default values):\n"
1809                +padOpt( "enabled (true)", "" )
1810                +padOpt( "node-elim-opt (true)", "Node elimination optimizations" )
1811                +padOpt( "standard-local-names (false)", "Uses naming scheme of the Local Name Standardizer." )
1812                +padOpt( "extended (false)", "Compute extended SSA (SSI) form." )
1813                +padOpt( "debug (false)", "Enables debugging output, if any." );
1814    
1815        if( phaseName.equals( "stp" ) )
1816            return "Phase "+phaseName+":\n"+
1817                "\nWhen the Shimple representation is produced, Soot \napplies the contents of the Shimple Transformation \nPack to each method under analysis. This pack \ncontains no transformations in an unmodified version \nof Soot. "
1818                +"\n\nRecognized options (with default values):\n"
1819                +padOpt( "enabled (true)", "" );
1820    
1821        if( phaseName.equals( "sop" ) )
1822            return "Phase "+phaseName+":\n"+
1823                "\nThe Shimple Optimization Pack contains \ntransformations that perform optimizations on \nShimple, Soot's SSA representation. "
1824                +"\n\nRecognized options (with default values):\n"
1825                +padOpt( "enabled (false)", "" );
1826    
1827        if( phaseName.equals( "sop.cpf" ) )
1828            return "Phase "+phaseName+":\n"+
1829                "\nA powerful constant propagator and folder based \non an algorithm sketched by Cytron et al that \ntakes conditional control flow into account. This \noptimization demonstrates some of the benefits of \nSSA -- particularly the fact that Phi nodes \nrepresent natural merge points in the control \nflow. "
1830                +"\n\nRecognized options (with default values):\n"
1831                +padOpt( "enabled (true)", "" )
1832                +padOpt( "prune-cfg (true)", "Take advantage of CFG optimization opportunities." );
1833    
1834        if( phaseName.equals( "jtp" ) )
1835            return "Phase "+phaseName+":\n"+
1836                "\nSoot applies the contents of the Jimple Transformation Pack to \neach method under analysis. This pack contains no \ntransformations in an unmodified version of Soot. "
1837                +"\n\nRecognized options (with default values):\n"
1838                +padOpt( "enabled (true)", "" );
1839    
1840        if( phaseName.equals( "jop" ) )
1841            return "Phase "+phaseName+":\n"+
1842                "\nWhen Soot's Optimize option is on, Soot applies the Jimple \nOptimization Pack to every JimpleBody in application classes. \nThis section lists the default transformations in the Jimple \nOptimization Pack. "
1843                +"\n\nRecognized options (with default values):\n"
1844                +padOpt( "enabled (false)", "Eliminates common subexpressions" );
1845    
1846        if( phaseName.equals( "jop.cse" ) )
1847            return "Phase "+phaseName+":\n"+
1848                "\nThe Common Subexpression Eliminator runs an available \nexpressions analysis on the method body, then eliminates common \nsubexpressions. This implementation is especially slow, as it \nruns on individual statements rather than on basic blocks. A \nbetter implementation (which would find most common \nsubexpressions, but not all) would use basic blocks instead. \nThis implementation is also slow because the flow universe is \nexplicitly created; it need not be. A better implementation \nwould implicitly compute the kill sets at every node. Because \nof its current slowness, this transformation is not enabled by \ndefault. "
1849                +"\n\nRecognized options (with default values):\n"
1850                +padOpt( "enabled (false)", "" )
1851                +padOpt( "naive-side-effect (false)", "Use naive side effect analysis even if interprocedural information is available" );
1852    
1853        if( phaseName.equals( "jop.bcm" ) )
1854            return "Phase "+phaseName+":\n"+
1855                "\nBusy Code Motion is a straightforward implementation of Partial \nRedundancy Elimination. This implementation is not very \naggressive. Lazy Code Motion is an improved version which \nshould be used instead of Busy Code Motion. "
1856                +"\n\nRecognized options (with default values):\n"
1857                +padOpt( "enabled (false)", "" )
1858                +padOpt( "naive-side-effect (false)", "Use a naive side effect analysis even if interprocedural information is available" );
1859    
1860        if( phaseName.equals( "jop.lcm" ) )
1861            return "Phase "+phaseName+":\n"+
1862                "\nLazy Code Motion is an enhanced version of Busy Code Motion, a \nPartial Redundancy Eliminator. Before doing Partial Redundancy \nElimination, this optimization performs loop inversion (turning \nwhile loops into do while loops inside an if statement). This \nallows the Partial Redundancy Eliminator to optimize loop \ninvariants of while loops. "
1863                +"\n\nRecognized options (with default values):\n"
1864                +padOpt( "enabled (false)", "" )
1865                +padOpt( "safety", "" )
1866                +padVal( "safe (default)", "" )
1867                
1868                +padVal( "medium", "" )
1869                
1870                +padVal( "unsafe", "" )
1871                
1872                +padOpt( "unroll (true)", "" )
1873                +padOpt( "naive-side-effect (false)", "Use a naive side effect analysis even if interprocedural information is available" );
1874    
1875        if( phaseName.equals( "jop.cp" ) )
1876            return "Phase "+phaseName+":\n"+
1877                "\nThis phase performs cascaded copy propagation."
1878                +"\n\nRecognized options (with default values):\n"
1879                +padOpt( "enabled (true)", "" )
1880                +padOpt( "only-regular-locals (false)", "" )
1881                +padOpt( "only-stack-locals (false)", "" );
1882    
1883        if( phaseName.equals( "jop.cpf" ) )
1884            return "Phase "+phaseName+":\n"+
1885                "\nThe Jimple Constant Propagator and Folder evaluates any \nexpressions consisting entirely of compile-time constants, for \nexample 2 * 3, and replaces the expression with the constant \nresult, in this case 6. "
1886                +"\n\nRecognized options (with default values):\n"
1887                +padOpt( "enabled (true)", "" );
1888    
1889        if( phaseName.equals( "jop.cbf" ) )
1890            return "Phase "+phaseName+":\n"+
1891                "\nThe Conditional Branch Folder statically evaluates the \nconditional expression of Jimple if statements. If the \ncondition is identically true or false, the Folder replaces the \nconditional branch statement with an unconditional goto \nstatement. "
1892                +"\n\nRecognized options (with default values):\n"
1893                +padOpt( "enabled (true)", "" );
1894    
1895        if( phaseName.equals( "jop.dae" ) )
1896            return "Phase "+phaseName+":\n"+
1897                "\nThe Dead Assignment Eliminator eliminates assignment statements \nto locals whose values are not subsequently used, unless \nevaluating the right-hand side of the assignment may cause \nside-effects. "
1898                +"\n\nRecognized options (with default values):\n"
1899                +padOpt( "enabled (true)", "" )
1900                +padOpt( "only-tag (false)", "" )
1901                +padOpt( "only-stack-locals (false)", "" );
1902    
1903        if( phaseName.equals( "jop.uce1" ) )
1904            return "Phase "+phaseName+":\n"+
1905                "\nThe Unreachable Code Eliminator removes unreachable code and \ntraps whose catch blocks are empty. "
1906                +"\n\nRecognized options (with default values):\n"
1907                +padOpt( "enabled (true)", "" )
1908                +padOpt( "remove-unreachable-traps (false)", "" );
1909    
1910        if( phaseName.equals( "jop.ubf1" ) )
1911            return "Phase "+phaseName+":\n"+
1912                "\nThe Unconditional Branch Folder removes unnecessary `goto' \nstatements from a JimpleBody. If a goto statement's target is \nthe next instruction, then the statement is removed. If a \ngoto's target is another goto, with target y, then the first \nstatement's target is changed to y. If some if statement's \ntarget is a goto statement, then the if's target can be replaced \nwith the goto's target. (These situations can result from other \noptimizations, and branch folding may itself generate more \nunreachable code.)"
1913                +"\n\nRecognized options (with default values):\n"
1914                +padOpt( "enabled (true)", "" );
1915    
1916        if( phaseName.equals( "jop.uce2" ) )
1917            return "Phase "+phaseName+":\n"+
1918                "\nAnother iteration of the Unreachable Code Eliminator. "
1919                +"\n\nRecognized options (with default values):\n"
1920                +padOpt( "enabled (true)", "" )
1921                +padOpt( "remove-unreachable-traps (false)", "" );
1922    
1923        if( phaseName.equals( "jop.ubf2" ) )
1924            return "Phase "+phaseName+":\n"+
1925                "\nAnother iteration of the Unconditional Branch Folder. "
1926                +"\n\nRecognized options (with default values):\n"
1927                +padOpt( "enabled (true)", "" );
1928    
1929        if( phaseName.equals( "jop.ule" ) )
1930            return "Phase "+phaseName+":\n"+
1931                "\nThe Unused Local Eliminator phase removes any unused locals \nfrom the method. "
1932                +"\n\nRecognized options (with default values):\n"
1933                +padOpt( "enabled (true)", "" );
1934    
1935        if( phaseName.equals( "jap" ) )
1936            return "Phase "+phaseName+":\n"+
1937                "\nThe Jimple Annotation Pack contains phases which add \nannotations to Jimple bodies individually (as opposed to the \nWhole-Jimple Annotation Pack, which adds annotations based on \nthe analysis of the whole program). "
1938                +"\n\nRecognized options (with default values):\n"
1939                +padOpt( "enabled (true)", "" );
1940    
1941        if( phaseName.equals( "jap.npc" ) )
1942            return "Phase "+phaseName+":\n"+
1943                "\nThe Null Pointer Checker finds instruction which have the \npotential to throw NullPointerExceptions and adds annotations \nindicating whether or not the pointer being dereferenced can be \ndetermined statically not to be null. "
1944                +"\n\nRecognized options (with default values):\n"
1945                +padOpt( "enabled (false)", "" )
1946                +padOpt( "only-array-ref (false)", "Annotate only array references" )
1947                +padOpt( "profiling (false)", "Insert instructions to count safe pointer accesses" );
1948    
1949        if( phaseName.equals( "jap.npcolorer" ) )
1950            return "Phase "+phaseName+":\n"+
1951                "\nProduce colour tags that the Soot plug-in for Eclipse can use \nto highlight null and non-null references. "
1952                +"\n\nRecognized options (with default values):\n"
1953                +padOpt( "enabled (false)", "" );
1954    
1955        if( phaseName.equals( "jap.abc" ) )
1956            return "Phase "+phaseName+":\n"+
1957                "\nThe Array Bound Checker performs a static analysis to determine \nwhich array bounds checks may safely be eliminated and then \nannotates statements with the results of the analysis. If Soot \nis in whole-program mode, the Array Bound Checker can use the \nresults provided by the Rectangular Array Finder."
1958                +"\n\nRecognized options (with default values):\n"
1959                +padOpt( "enabled (false)", "" )
1960                +padOpt( "with-all (false)", "" )
1961                +padOpt( "with-cse (false)", "" )
1962                +padOpt( "with-arrayref (false)", "" )
1963                +padOpt( "with-fieldref (false)", "" )
1964                +padOpt( "with-classfield (false)", "" )
1965                +padOpt( "with-rectarray (false)", "" )
1966                +padOpt( "profiling (false)", "Profile the results of array bounds check analysis." )
1967                +padOpt( "add-color-tags (false)", "Add color tags to results of array bound check analysis." );
1968    
1969        if( phaseName.equals( "jap.profiling" ) )
1970            return "Phase "+phaseName+":\n"+
1971                "\nThe Profiling Generator inserts the method invocations required \nto initialize and to report the results of any profiling \nperformed by the Null Pointer Checker and Array Bound Checker. \nUsers of the Profiling Generator must provide a MultiCounter \nclass implementing the methods invoked. For details, see the \nProfilingGenerator source code. "
1972                +"\n\nRecognized options (with default values):\n"
1973                +padOpt( "enabled (false)", "" )
1974                +padOpt( "notmainentry (false)", "Instrument runBenchmark() instead of main()" );
1975    
1976        if( phaseName.equals( "jap.sea" ) )
1977            return "Phase "+phaseName+":\n"+
1978                "\nThe Side Effect Tagger uses the active invoke graph to produce \nside-effect attributes, as described in the Spark thesis, \nchapter 6."
1979                +"\n\nRecognized options (with default values):\n"
1980                +padOpt( "enabled (false)", "" )
1981                +padOpt( "naive (false)", "" );
1982    
1983        if( phaseName.equals( "jap.fieldrw" ) )
1984            return "Phase "+phaseName+":\n"+
1985                "\nThe Field Read/Write Tagger uses the active invoke graph to \nproduce tags indicating which fields may be read or written by \neach statement, including invoke statements."
1986                +"\n\nRecognized options (with default values):\n"
1987                +padOpt( "enabled (false)", "" )
1988                +padOpt( "threshold (100)", "" );
1989    
1990        if( phaseName.equals( "jap.cgtagger" ) )
1991            return "Phase "+phaseName+":\n"+
1992                "\nThe Call Graph Tagger produces LinkTags based on the call \ngraph. The Eclipse plugin uses these tags to produce linked \npopup lists which indicate the source and target methods of the \nstatement. Selecting a link from the list moves the cursor to \nthe indicated method. "
1993                +"\n\nRecognized options (with default values):\n"
1994                +padOpt( "enabled (false)", "" );
1995    
1996        if( phaseName.equals( "jap.parity" ) )
1997            return "Phase "+phaseName+":\n"+
1998                "\nThe Parity Tagger produces StringTags and ColorTags indicating \nthe parity of a variable (even, odd, top, or bottom). The \neclipse plugin can use tooltips and variable colouring to \ndisplay the information in these tags. For example, even \nvariables (such as x in x = 2) are coloured yellow. "
1999                +"\n\nRecognized options (with default values):\n"
2000                +padOpt( "enabled (false)", "" );
2001    
2002        if( phaseName.equals( "jap.pat" ) )
2003            return "Phase "+phaseName+":\n"+
2004                "\nFor each method with parameters of reference type, this tagger \nindicates the aliasing relationships between the parameters \nusing colour tags. Parameters that may be aliased are the same \ncolour. Parameters that may not be aliased are in different \ncolours."
2005                +"\n\nRecognized options (with default values):\n"
2006                +padOpt( "enabled (false)", "" );
2007    
2008        if( phaseName.equals( "jap.lvtagger" ) )
2009            return "Phase "+phaseName+":\n"+
2010                "\nColors live variables."
2011                +"\n\nRecognized options (with default values):\n"
2012                +padOpt( "enabled (false)", "" );
2013    
2014        if( phaseName.equals( "jap.rdtagger" ) )
2015            return "Phase "+phaseName+":\n"+
2016                "\nFor each use of a local in a stmt creates a link to the reaching \ndef."
2017                +"\n\nRecognized options (with default values):\n"
2018                +padOpt( "enabled (false)", "" );
2019    
2020        if( phaseName.equals( "jap.che" ) )
2021            return "Phase "+phaseName+":\n"+
2022                "\nIndicates whether cast checks can be eliminated."
2023                +"\n\nRecognized options (with default values):\n"
2024                +padOpt( "enabled (false)", "" );
2025    
2026        if( phaseName.equals( "jap.umt" ) )
2027            return "Phase "+phaseName+":\n"+
2028                "\nWhen the whole-program analysis determines a method to be \nunreachable, this transformer inserts an assertion into the \nmethod to check that it is indeed unreachable."
2029                +"\n\nRecognized options (with default values):\n"
2030                +padOpt( "enabled (false)", "" );
2031    
2032        if( phaseName.equals( "jap.lit" ) )
2033            return "Phase "+phaseName+":\n"+
2034                "\nAn expression whose operands are constant or have reaching \ndefinitions from outside the loop body are tagged as loop \ninvariant."
2035                +"\n\nRecognized options (with default values):\n"
2036                +padOpt( "enabled (false)", "" );
2037    
2038        if( phaseName.equals( "jap.aet" ) )
2039            return "Phase "+phaseName+":\n"+
2040                "\nA each statement a set of available expressions is after the \nstatement is added as a tag."
2041                +"\n\nRecognized options (with default values):\n"
2042                +padOpt( "enabled (false)", "" )
2043                +padOpt( "kind", "" )
2044                +padVal( "optimistic (default)", "" )
2045                
2046                +padVal( "pessimistic", "" )
2047                ;
2048    
2049        if( phaseName.equals( "jap.dmt" ) )
2050            return "Phase "+phaseName+":\n"+
2051                "\nProvides link tags at a statement to all of the satements \ndominators."
2052                +"\n\nRecognized options (with default values):\n"
2053                +padOpt( "enabled (false)", "" );
2054    
2055        if( phaseName.equals( "gb" ) )
2056            return "Phase "+phaseName+":\n"+
2057                "\nThe Grimp Body Creation phase creates a GrimpBody for each \nsource method. It is run only if the output format is grimp or \ngrimple, or if class files are being output and the Via Grimp \noption has been specified. "
2058                +"\n\nRecognized options (with default values):\n"
2059                +padOpt( "enabled (true)", "" );
2060    
2061        if( phaseName.equals( "gb.a1" ) )
2062            return "Phase "+phaseName+":\n"+
2063                "\nThe Grimp Pre-folding Aggregator combines some local variables, \nfinding definitions with only a single use and removing the \ndefinition after replacing the use with the definition's \nright-hand side, if it is safe to do so. While the mechanism is \nthe same as that employed by the Jimple Local Aggregator, there \nis more scope for aggregation because of Grimp's more \ncomplicated expressions. "
2064                +"\n\nRecognized options (with default values):\n"
2065                +padOpt( "enabled (true)", "" )
2066                +padOpt( "only-stack-locals (true)", "" );
2067    
2068        if( phaseName.equals( "gb.cf" ) )
2069            return "Phase "+phaseName+":\n"+
2070                "\nThe Grimp Constructor Folder combines new statements with the \nspecialinvoke statement that calls the new object's constructor. \nFor example, it turns r2 = new java.util.ArrayList; r2.init(); \ninto r2 = new java.util.ArrayList(); "
2071                +"\n\nRecognized options (with default values):\n"
2072                +padOpt( "enabled (true)", "" );
2073    
2074        if( phaseName.equals( "gb.a2" ) )
2075            return "Phase "+phaseName+":\n"+
2076                "\nThe Grimp Post-folding Aggregator combines local variables \nafter constructors have been folded. Constructor folding \ntypically introduces new opportunities for aggregation, since \nwhen a sequence of instructions like r2 = new \njava.util.ArrayList; r2.init(); r3 = r2 is replaced by r2 = new \njava.util.ArrayList(); r3 = r2 the invocation of init no longer \nrepresents a potential side-effect separating the two \ndefinitions, so they can be combined into r3 = new \njava.util.ArrayList(); (assuming there are no subsequent uses of \nr2). "
2077                +"\n\nRecognized options (with default values):\n"
2078                +padOpt( "enabled (true)", "" )
2079                +padOpt( "only-stack-locals (true)", "" );
2080    
2081        if( phaseName.equals( "gb.ule" ) )
2082            return "Phase "+phaseName+":\n"+
2083                "\nThis phase removes any locals that are unused after constructor \nfolding and aggregation. "
2084                +"\n\nRecognized options (with default values):\n"
2085                +padOpt( "enabled (true)", "" );
2086    
2087        if( phaseName.equals( "gop" ) )
2088            return "Phase "+phaseName+":\n"+
2089                "\nThe Grimp Optimization pack performs optimizations on \nGrimpBodys (currently there are no optimizations performed \nspecifically on GrimpBodys, and the pack is empty). It is run \nonly if the output format is grimp or grimple, or if class files \nare being output and the Via Grimp option has been specified. "
2090                +"\n\nRecognized options (with default values):\n"
2091                +padOpt( "enabled (false)", "" );
2092    
2093        if( phaseName.equals( "bb" ) )
2094            return "Phase "+phaseName+":\n"+
2095                "\nThe Baf Body Creation phase creates a BafBody from each source \nmethod. It is run if the output format is baf or b, or if class \nfiles are being output and the Via Grimp option has not been \nspecified. "
2096                +"\n\nRecognized options (with default values):\n"
2097                +padOpt( "enabled (true)", "" );
2098    
2099        if( phaseName.equals( "bb.lso" ) )
2100            return "Phase "+phaseName+":\n"+
2101                "\nThe Load Store Optimizer replaces some combinations of loads to \nand stores from local variables with stack instructions. A \nsimple example would be the replacement of store.r $r2; load.r \n$r2; with dup1.r in cases where the value of r2 is not used \nsubsequently. "
2102                +"\n\nRecognized options (with default values):\n"
2103                +padOpt( "enabled (true)", "" )
2104                +padOpt( "debug (false)", "" )
2105                +padOpt( "inter (false)", "" )
2106                +padOpt( "sl (true)", "" )
2107                +padOpt( "sl2 (false)", "" )
2108                +padOpt( "sll (true)", "" )
2109                +padOpt( "sll2 (false)", "" );
2110    
2111        if( phaseName.equals( "bb.pho" ) )
2112            return "Phase "+phaseName+":\n"+
2113                "\nApplies peephole optimizations to the Baf intermediate \nrepresentation. Individual optimizations must be implemented by \nclasses implementing the Peephole interface. The Peephole \nOptimizer reads the names of the Peephole classes at runtime \nfrom the file peephole.dat and loads them dynamically. Then it \ncontinues to apply the Peepholes repeatedly until none of them \nare able to perform any further optimizations. Soot provides \nonly one Peephole, named ExamplePeephole, which is not enabled \nby the delivered peephole.dat file. ExamplePeephole removes all \ncheckcast instructions."
2114                +"\n\nRecognized options (with default values):\n"
2115                +padOpt( "enabled (true)", "" );
2116    
2117        if( phaseName.equals( "bb.ule" ) )
2118            return "Phase "+phaseName+":\n"+
2119                "\nThis phase removes any locals that are unused after load store \noptimization and peephole optimization. "
2120                +"\n\nRecognized options (with default values):\n"
2121                +padOpt( "enabled (true)", "" );
2122    
2123        if( phaseName.equals( "bb.lp" ) )
2124            return "Phase "+phaseName+":\n"+
2125                "\nThe Local Packer attempts to minimize the number of local \nvariables required in a method by reusing the same variable for \ndisjoint DU-UD webs. Conceptually, it is the inverse of the \nLocal Splitter. "
2126                +"\n\nRecognized options (with default values):\n"
2127                +padOpt( "enabled (true)", "" )
2128                +padOpt( "unsplit-original-locals (false)", "" );
2129    
2130        if( phaseName.equals( "bop" ) )
2131            return "Phase "+phaseName+":\n"+
2132                "\nThe Baf Optimization pack performs optimizations on BafBodys \n(currently there are no optimizations performed specifically on \nBafBodys, and the pack is empty). It is run only if the output \nformat is baf or b, or if class files are being output and the \nVia Grimp option has not been specified. "
2133                +"\n\nRecognized options (with default values):\n"
2134                +padOpt( "enabled (false)", "" );
2135    
2136        if( phaseName.equals( "tag" ) )
2137            return "Phase "+phaseName+":\n"+
2138                "\nThe Tag Aggregator pack aggregates tags attached to individual \nunits into a code attribute for each method, so that these \nattributes can be encoded in Java class files."
2139                +"\n\nRecognized options (with default values):\n"
2140                +padOpt( "enabled (true)", "" );
2141    
2142        if( phaseName.equals( "tag.ln" ) )
2143            return "Phase "+phaseName+":\n"+
2144                "\nThe Line Number Tag Aggregator aggregates line number tags."
2145                +"\n\nRecognized options (with default values):\n"
2146                +padOpt( "enabled (true)", "" );
2147    
2148        if( phaseName.equals( "tag.an" ) )
2149            return "Phase "+phaseName+":\n"+
2150                "\nThe Array Bounds and Null Pointer Tag Aggregator aggregates \ntags produced by the Array Bound Checker and Null Pointer \nChecker."
2151                +"\n\nRecognized options (with default values):\n"
2152                +padOpt( "enabled (false)", "" );
2153    
2154        if( phaseName.equals( "tag.dep" ) )
2155            return "Phase "+phaseName+":\n"+
2156                "\nThe Dependence Tag Aggregator aggregates tags produced by the \nSide Effect Tagger."
2157                +"\n\nRecognized options (with default values):\n"
2158                +padOpt( "enabled (false)", "" );
2159    
2160        if( phaseName.equals( "tag.fieldrw" ) )
2161            return "Phase "+phaseName+":\n"+
2162                "\nThe Field Read/Write Tag Aggregator aggregates field read/write \ntags produced by the Field Read/Write Tagger, phase jap.fieldrw. \n"
2163                +"\n\nRecognized options (with default values):\n"
2164                +padOpt( "enabled (false)", "" );
2165    
2166        if( phaseName.equals( "db" ) )
2167            return "Phase "+phaseName+":\n"+
2168                "\nThe decompile (Dava) option is set using the -f dava options in \nSoot. Options provided by Dava are added to this dummy phase so \nas not to clutter the soot general arguments. -p db (option \nname):(value) will be used to set all required values for Dava. \n"
2169                +"\n\nRecognized options (with default values):\n"
2170                +padOpt( "enabled (true)", "" );
2171    
2172        if( phaseName.equals( "db.transformations" ) )
2173            return "Phase "+phaseName+":\n"+
2174                "\n The transformations implemented using AST Traversal and \nstructural flow analses on Dava's AST "
2175                +"\n\nRecognized options (with default values):\n"
2176                +padOpt( "enabled (true)", "" );
2177    
2178        if( phaseName.equals( "db.renamer" ) )
2179            return "Phase "+phaseName+":\n"+
2180                "\nIf set, the renaming analyses implemented in Dava are applied to \neach method body being decompiled. The analyses use heuristics \nto choose potentially better names for local variables. (As of \nFebruary 14th 2006, work is still under progress on these \nanalyses (dava.toolkits.base.renamer). "
2181                +"\n\nRecognized options (with default values):\n"
2182                +padOpt( "enabled (false)", "" )
2183                +padOpt( "remove-fully-qualified (false)", "Convert fully qualified names to smaller names" );
2184    
2185        if( phaseName.equals( "db.deobfuscate" ) )
2186            return "Phase "+phaseName+":\n"+
2187                "\nCertain analyses make sense only when the bytecode is obfuscated \ncode. There are plans to implement such analyses and apply them \non methods only if this flag is set. Dead Code elimination \nwhich includes removing code guarded by some condition which is \nalways false or always true is one such analysis. Another \nsuggested analysis is giving default names to classes and \nfields. Onfuscators love to use weird names for fields and \nclasses and even a simple re-naming of these could be a good \nhelp to the user. Another more advanced analysis would be to \ncheck for redundant constant fields added by obfuscators and \nthen remove uses of these constant fields from the code."
2188                +"\n\nRecognized options (with default values):\n"
2189                +padOpt( "enabled (true)", "" );
2190    
2191        if( phaseName.equals( "db.force-recompile" ) )
2192            return "Phase "+phaseName+":\n"+
2193                "\nWhile decompiling we have to be clear what our aim is: do we \nwant to convert bytecode to Java syntax and stay as close to the \nactual execution of bytecode or do we want recompilably Java \nsource representing the bytecode. This distinction is important \nbecause some restrictions present in Java source are absent from \nthe bytecode. Examples of this include that fact that in Java a \ncall to a constructor or super needs to be the first statement \nin a constructors body. This restriction is absent from the \nbytecode. Similarly final fields HAVE to be initialized once and \nonly once in either the static initializer (static fields) or \nall the constructors (non-static fields). Additionally the \nfields should be initialized on all possible execution paths. \nThese restrictions are again absent from the bytecode. In doing \na one-one conversion of bytecode to Java source then no attempt \nshould be made to fix any of these and similar problems in the \nJava source. However, if the aim is to get recompilable code \nthen these and similar issues need to be fixed. Setting the \nforce-recompilability flag will ensure that the decompiler tries \nits best to produce recompilable Java source."
2194                +"\n\nRecognized options (with default values):\n"
2195                +padOpt( "enabled (true)", "" );
2196    
2197
2198        return "Unrecognized phase: "+phaseName;
2199    }
2200  
2201    public static String JavaDoc getDeclaredOptionsForPhase( String JavaDoc phaseName ) {
2202    
2203        if( phaseName.equals( "jb" ) )
2204            return ""
2205                +"enabled "
2206                +"use-original-names ";
2207    
2208        if( phaseName.equals( "jb.ls" ) )
2209            return ""
2210                +"enabled ";
2211    
2212        if( phaseName.equals( "jb.a" ) )
2213            return ""
2214                +"enabled "
2215                +"only-stack-locals ";
2216    
2217        if( phaseName.equals( "jb.ule" ) )
2218            return ""
2219                +"enabled ";
2220    
2221        if( phaseName.equals( "jb.tr" ) )
2222            return ""
2223                +"enabled ";
2224    
2225        if( phaseName.equals( "jb.ulp" ) )
2226            return ""
2227                +"enabled "
2228                +"unsplit-original-locals ";
2229    
2230        if( phaseName.equals( "jb.lns" ) )
2231            return ""
2232                +"enabled "
2233                +"only-stack-locals ";
2234    
2235        if( phaseName.equals( "jb.cp" ) )
2236            return ""
2237                +"enabled "
2238                +"only-regular-locals "
2239                +"only-stack-locals ";
2240    
2241        if( phaseName.equals( "jb.dae" ) )
2242            return ""
2243                +"enabled "
2244                +"only-stack-locals ";
2245    
2246        if( phaseName.equals( "jb.cp-ule" ) )
2247            return ""
2248                +"enabled ";
2249    
2250        if( phaseName.equals( "jb.lp" ) )
2251            return ""
2252                +"enabled "
2253                +"unsplit-original-locals ";
2254    
2255        if( phaseName.equals( "jb.ne" ) )
2256            return ""
2257                +"enabled ";
2258    
2259        if( phaseName.equals( "jb.uce" ) )
2260            return ""
2261                +"enabled "
2262                +"remove-unreachable-traps ";
2263    
2264        if( phaseName.equals( "jb.tt" ) )
2265            return ""
2266                +"enabled ";
2267    
2268        if( phaseName.equals( "jj" ) )
2269            return ""
2270                +"enabled "
2271                +"use-original-names ";
2272    
2273        if( phaseName.equals( "jj.ls" ) )
2274            return ""
2275                +"enabled ";
2276    
2277        if( phaseName.equals( "jj.a" ) )
2278            return ""
2279                +"enabled "
2280                +"only-stack-locals ";
2281    
2282        if( phaseName.equals( "jj.ule" ) )
2283            return ""
2284                +"enabled ";
2285    
2286        if( phaseName.equals( "jj.tr" ) )
2287            return ""
2288                +"enabled ";
2289    
2290        if( phaseName.equals( "jj.ulp" ) )
2291            return ""
2292                +"enabled "
2293                +"unsplit-original-locals ";
2294    
2295        if( phaseName.equals( "jj.lns" ) )
2296            return ""
2297                +"enabled "
2298                +"only-stack-locals ";
2299    
2300        if( phaseName.equals( "jj.cp" ) )
2301            return ""
2302                +"enabled "
2303                +"only-regular-locals "
2304                +"only-stack-locals ";
2305    
2306        if( phaseName.equals( "jj.dae" ) )
2307            return ""
2308                +"enabled "
2309                +"only-stack-locals ";
2310    
2311        if( phaseName.equals( "jj.cp-ule" ) )
2312            return ""
2313                +"enabled ";
2314    
2315        if( phaseName.equals( "jj.lp" ) )
2316            return ""
2317                +"enabled "
2318                +"unsplit-original-locals ";
2319    
2320        if( phaseName.equals( "jj.ne" ) )
2321            return ""
2322                +"enabled ";
2323    
2324        if( phaseName.equals( "jj.uce" ) )
2325            return ""
2326                +"enabled ";
2327    
2328        if( phaseName.equals( "cg" ) )
2329            return ""
2330                +"enabled "
2331                +"safe-forname "
2332                +"safe-newinstance "
2333                +"verbose "
2334                +"jdkver "
2335                +"all-reachable "
2336                +"implicit-entry "
2337                +"trim-clinit ";
2338    
2339        if( phaseName.equals( "cg.cha" ) )
2340            return ""
2341                +"enabled "
2342                +"verbose ";
2343    
2344        if( phaseName.equals( "cg.spark" ) )
2345            return ""
2346                +"enabled "
2347                +"verbose "
2348                +"ignore-types "
2349                +"force-gc "
2350                +"pre-jimplify "
2351                +"vta "
2352                +"rta "
2353                +"field-based "
2354                +"types-for-sites "
2355                +"merge-stringbuffer "
2356                +"string-constants "
2357                +"simulate-natives "
2358                +"simple-edges-bidirectional "
2359                +"on-fly-cg "
2360                +"simplify-offline "
2361                +"simplify-sccs "
2362                +"ignore-types-for-sccs "
2363                +"propagator "
2364                +"set-impl "
2365                +"double-set-old "
2366                +"double-set-new "
2367                +"dump-html "
2368                +"dump-pag "
2369                +"dump-solution "
2370                +"topo-sort "
2371                +"dump-types "
2372                +"class-method-var "
2373                +"dump-answer "
2374                +"add-tags "
2375                +"set-mass ";
2376    
2377        if( phaseName.equals( "cg.paddle" ) )
2378            return ""
2379                +"enabled "
2380                +"verbose "
2381                +"conf "
2382                +"bdd "
2383                +"order "
2384                +"dynamic-order "
2385                +"profile "
2386                +"q "
2387                +"backend "
2388                +"ignore-types "
2389                +"pre-jimplify "
2390                +"context "
2391                +"k "
2392                +"context-heap "
2393                +"rta "
2394                +"field-based "
2395                +"types-for-sites "
2396                +"merge-stringbuffer "
2397                +"string-constants "
2398                +"simulate-natives "
2399                +"global-nodes-in-natives "
2400                +"simple-edges-bidirectional "
2401                +"this-edges "
2402                +"precise-newinstance "
2403                +"propagator "
2404                +"set-impl "
2405                +"double-set-old "
2406                +"double-set-new "
2407                +"context-counts "
2408                +"total-context-counts "
2409                +"method-context-counts "
2410                +"set-mass "
2411                +"number-nodes ";
2412    
2413        if( phaseName.equals( "wstp" ) )
2414            return ""
2415                +"enabled ";
2416    
2417        if( phaseName.equals( "wsop" ) )
2418            return ""
2419                +"enabled ";
2420    
2421        if( phaseName.equals( "wjtp" ) )
2422            return ""
2423                +"enabled ";
2424    
2425        if( phaseName.equals( "wjop" ) )
2426            return ""
2427                +"enabled ";
2428    
2429        if( phaseName.equals( "wjop.smb" ) )
2430            return ""
2431                +"enabled "
2432                +"insert-null-checks "
2433                +"insert-redundant-casts "
2434                +"allowed-modifier-changes ";
2435    
2436        if( phaseName.equals( "wjop.si" ) )
2437            return ""
2438                +"enabled "
2439                +"rerun-jb "
2440                +"insert-null-checks "
2441                +"insert-redundant-casts "
2442                +"allowed-modifier-changes "
2443                +"expansion-factor "
2444                +"max-container-size "
2445                +"max-inlinee-size ";
2446    
2447        if( phaseName.equals( "wjap" ) )
2448            return ""
2449                +"enabled ";
2450    
2451        if( phaseName.equals( "wjap.ra" ) )
2452            return ""
2453                +"enabled ";
2454    
2455        if( phaseName.equals( "wjap.umt" ) )
2456            return ""
2457                +"enabled ";
2458    
2459        if( phaseName.equals( "wjap.uft" ) )
2460            return ""
2461                +"enabled ";
2462    
2463        if( phaseName.equals( "wjap.tqt" ) )
2464            return ""
2465                +"enabled ";
2466    
2467        if( phaseName.equals( "wjap.cgg" ) )
2468            return ""
2469                +"enabled "
2470                +"show-lib-meths ";
2471    
2472        if( phaseName.equals( "wjap.purity" ) )
2473            return ""
2474                +"enabled "
2475                +"dump-summaries "
2476                +"dump-cg "
2477                +"dump-intra "
2478                +"print "
2479                +"verbose ";
2480    
2481        if( phaseName.equals( "shimple" ) )
2482            return ""
2483                +"enabled "
2484                +"node-elim-opt "
2485                +"standard-local-names "
2486                +"extended "
2487                +"debug ";
2488    
2489        if( phaseName.equals( "stp" ) )
2490            return ""
2491                +"enabled ";
2492    
2493        if( phaseName.equals( "sop" ) )
2494            return ""
2495                +"enabled ";
2496    
2497        if( phaseName.equals( "sop.cpf" ) )
2498            return ""
2499                +"enabled "
2500                +"prune-cfg ";
2501    
2502        if( phaseName.equals( "jtp" ) )
2503            return ""
2504                +"enabled ";
2505    
2506        if( phaseName.equals( "jop" ) )
2507            return ""
2508                +"enabled ";
2509    
2510        if( phaseName.equals( "jop.cse" ) )
2511            return ""
2512                +"enabled "
2513                +"naive-side-effect ";
2514    
2515        if( phaseName.equals( "jop.bcm" ) )
2516            return ""
2517                +"enabled "
2518                +"naive-side-effect ";
2519    
2520        if( phaseName.equals( "jop.lcm" ) )
2521            return ""
2522                +"enabled "
2523                +"safety "
2524                +"unroll "
2525                +"naive-side-effect ";
2526    
2527        if( phaseName.equals( "jop.cp" ) )
2528            return ""
2529                +"enabled "
2530                +"only-regular-locals "
2531                +"only-stack-locals ";
2532    
2533        if( phaseName.equals( "jop.cpf" ) )
2534            return ""
2535                +"enabled ";
2536    
2537        if( phaseName.equals( "jop.cbf" ) )
2538            return ""
2539                +"enabled ";
2540    
2541        if( phaseName.equals( "jop.dae" ) )
2542            return ""
2543                +"enabled "
2544                +"only-tag "
2545                +"only-stack-locals ";
2546    
2547        if( phaseName.equals( "jop.uce1" ) )
2548            return ""
2549                +"enabled "
2550                +"remove-unreachable-traps ";
2551    
2552        if( phaseName.equals( "jop.ubf1" ) )
2553            return ""
2554                +"enabled ";
2555    
2556        if( phaseName.equals( "jop.uce2" ) )
2557            return ""
2558                +"enabled "
2559                +"remove-unreachable-traps ";
2560    
2561        if( phaseName.equals( "jop.ubf2" ) )
2562            return ""
2563                +"enabled ";
2564    
2565        if( phaseName.equals( "jop.ule" ) )
2566            return ""
2567                +"enabled ";
2568    
2569        if( phaseName.equals( "jap" ) )
2570            return ""
2571                +"enabled ";
2572    
2573        if( phaseName.equals( "jap.npc" ) )
2574            return ""
2575                +"enabled "
2576                +"only-array-ref "
2577                +"profiling ";
2578    
2579        if( phaseName.equals( "jap.npcolorer" ) )
2580            return ""
2581                +"enabled ";
2582    
2583        if( phaseName.equals( "jap.abc" ) )
2584            return ""
2585                +"enabled "
2586                +"with-all "
2587                +"with-cse "
2588                +"with-arrayref "
2589                +"with-fieldref "
2590                +"with-classfield "
2591                +"with-rectarray "
2592                +"profiling "
2593                +"add-color-tags ";
2594    
2595        if( phaseName.equals( "jap.profiling" ) )
2596            return ""
2597                +"enabled "
2598                +"notmainentry ";
2599    
2600        if( phaseName.equals( "jap.sea" ) )
2601            return ""
2602                +"enabled "
2603                +"naive ";
2604    
2605        if( phaseName.equals( "jap.fieldrw" ) )
2606            return ""
2607                +"enabled "
2608                +"threshold ";
2609    
2610        if( phaseName.equals( "jap.cgtagger" ) )
2611            return ""
2612                +"enabled ";
2613    
2614        if( phaseName.equals( "jap.parity" ) )
2615            return ""
2616                +"enabled ";
2617    
2618        if( phaseName.equals( "jap.pat" ) )
2619            return ""
2620                +"enabled ";
2621    
2622        if( phaseName.equals( "jap.lvtagger" ) )
2623            return ""
2624                +"enabled ";
2625    
2626        if( phaseName.equals( "jap.rdtagger" ) )
2627            return ""
2628                +"enabled ";
2629    
2630        if( phaseName.equals( "jap.che" ) )
2631            return ""
2632                +"enabled ";
2633    
2634        if( phaseName.equals( "jap.umt" ) )
2635            return ""
2636                +"enabled ";
2637    
2638        if( phaseName.equals( "jap.lit" ) )
2639            return ""
2640                +"enabled ";
2641    
2642        if( phaseName.equals( "jap.aet" ) )
2643            return ""
2644                +"enabled "
2645                +"kind ";
2646    
2647        if( phaseName.equals( "jap.dmt" ) )
2648            return ""
2649                +"enabled ";
2650    
2651        if( phaseName.equals( "gb" ) )
2652            return ""
2653                +"enabled ";
2654    
2655        if( phaseName.equals( "gb.a1" ) )
2656            return ""
2657                +"enabled "
2658                +"only-stack-locals ";
2659    
2660        if( phaseName.equals( "gb.cf" ) )
2661            return ""
2662                +"enabled ";
2663    
2664        if( phaseName.equals( "gb.a2" ) )
2665            return ""
2666                +"enabled "
2667                +"only-stack-locals ";
2668    
2669        if( phaseName.equals( "gb.ule" ) )
2670            return ""
2671                +"enabled ";
2672    
2673        if( phaseName.equals( "gop" ) )
2674            return ""
2675                +"enabled ";
2676    
2677        if( phaseName.equals( "bb" ) )
2678            return ""
2679                +"enabled ";
2680    
2681        if( phaseName.equals( "bb.lso" ) )
2682            return ""
2683                +"enabled "
2684                +"debug "
2685                +"inter "
2686                +"sl "
2687                +"sl2 "
2688                +"sll "
2689                +"sll2 ";
2690    
2691        if( phaseName.equals( "bb.pho" ) )
2692            return ""
2693                +"enabled ";
2694    
2695        if( phaseName.equals( "bb.ule" ) )
2696            return ""
2697                +"enabled ";
2698    
2699        if( phaseName.equals( "bb.lp" ) )
2700            return ""
2701                +"enabled "
2702                +"unsplit-original-locals ";
2703    
2704        if( phaseName.equals( "bop" ) )
2705            return ""
2706                +"enabled ";
2707    
2708        if( phaseName.equals( "tag" ) )
2709            return ""
2710                +"enabled ";
2711    
2712        if( phaseName.equals( "tag.ln" ) )
2713            return ""
2714                +"enabled ";
2715    
2716        if( phaseName.equals( "tag.an" ) )
2717            return ""
2718                +"enabled ";
2719    
2720        if( phaseName.equals( "tag.dep" ) )
2721            return ""
2722                +"enabled ";
2723    
2724        if( phaseName.equals( "tag.fieldrw" ) )
2725            return ""
2726                +"enabled ";
2727    
2728        if( phaseName.equals( "db" ) )
2729            return ""
2730                +"enabled ";
2731    
2732        if( phaseName.equals( "db.transformations" ) )
2733            return ""
2734                +"enabled ";
2735    
2736        if( phaseName.equals( "db.renamer" ) )
2737            return ""
2738                +"enabled "
2739                +"remove-fully-qualified ";
2740    
2741        if( phaseName.equals( "db.deobfuscate" ) )
2742            return ""
2743                +"enabled ";
2744    
2745        if( phaseName.equals( "db.force-recompile" ) )
2746            return ""
2747                +"enabled ";
2748    
2749        // The default set of options is just enabled.
2750
return "enabled";
2751    }
2752
2753    public static String JavaDoc getDefaultOptionsForPhase( String JavaDoc phaseName ) {
2754    
2755        if( phaseName.equals( "jb" ) )
2756            return ""
2757              +"enabled:true "
2758              +"use-original-names:false ";
2759    
2760        if( phaseName.equals( "jb.ls" ) )
2761            return ""
2762              +"enabled:true ";
2763    
2764        if( phaseName.equals( "jb.a" ) )
2765            return ""
2766              +"enabled:true "
2767              +"only-stack-locals:true ";
2768    
2769        if( phaseName.equals( "jb.ule" ) )
2770            return ""
2771              +"enabled:true ";
2772    
2773        if( phaseName.equals( "jb.tr" ) )
2774            return ""
2775              +"enabled:true ";
2776    
2777        if( phaseName.equals( "jb.ulp" ) )
2778            return ""
2779              +"enabled:true "
2780              +"unsplit-original-locals:true ";
2781    
2782        if( phaseName.equals( "jb.lns" ) )
2783            return ""
2784              +"enabled:true "
2785              +"only-stack-locals:false ";
2786    
2787        if( phaseName.equals( "jb.cp" ) )
2788            return ""
2789              +"enabled:true "
2790              +"only-regular-locals:false "
2791              +"only-stack-locals:true ";
2792    
2793        if( phaseName.equals( "jb.dae" ) )
2794            return ""
2795              +"enabled:true "
2796              +"only-stack-locals:true ";
2797    
2798        if( phaseName.equals( "jb.cp-ule" ) )
2799            return ""
2800              +"enabled:true ";
2801    
2802        if( phaseName.equals( "jb.lp" ) )
2803            return ""
2804              +"enabled:false "
2805              +"unsplit-original-locals:false ";
2806    
2807        if( phaseName.equals( "jb.ne" ) )
2808            return ""
2809              +"enabled:true ";
2810    
2811        if( phaseName.equals( "jb.uce" ) )
2812            return ""
2813              +"enabled:true "
2814              +"remove-unreachable-traps:false ";
2815    
2816        if( phaseName.equals( "jb.tt" ) )
2817            return ""
2818              +"enabled:false ";
2819    
2820        if( phaseName.equals( "jj" ) )
2821            return ""
2822              +"enabled:true "
2823              +"use-original-names:true ";
2824    
2825        if( phaseName.equals( "jj.ls" ) )
2826            return ""
2827              +"enabled:false ";
2828    
2829        if( phaseName.equals( "jj.a" ) )
2830            return ""
2831              +"enabled:true "
2832              +"only-stack-locals:true ";
2833    
2834        if( phaseName.equals( "jj.ule" ) )
2835            return ""
2836              +"enabled:true ";
2837    
2838        if( phaseName.equals( "jj.tr" ) )
2839            return ""
2840              +"enabled:false ";
2841    
2842        if( phaseName.equals( "jj.ulp" ) )
2843            return ""
2844              +"enabled:false "
2845              +"unsplit-original-locals:false ";
2846    
2847        if( phaseName.equals( "jj.lns" ) )
2848            return ""
2849              +"enabled:true "
2850              +"only-stack-locals:false ";
2851    
2852        if( phaseName.equals( "jj.cp" ) )
2853            return ""
2854              +"enabled:true "
2855              +"only-regular-locals:false "
2856              +"only-stack-locals:true ";
2857    
2858        if( phaseName.equals( "jj.dae" ) )
2859            return ""
2860              +"enabled:true "
2861              +"only-stack-locals:true ";
2862    
2863        if( phaseName.equals( "jj.cp-ule" ) )
2864            return ""
2865              +"enabled:true ";
2866    
2867        if( phaseName.equals( "jj.lp" ) )
2868            return ""
2869              +"enabled:false "
2870              +"unsplit-original-locals:false ";
2871    
2872        if( phaseName.equals( "jj.ne" ) )
2873            return ""
2874              +"enabled:true ";
2875    
2876        if( phaseName.equals( "jj.uce" ) )
2877            return ""
2878              +"enabled:true ";
2879    
2880        if( phaseName.equals( "cg" ) )
2881            return ""
2882              +"enabled:true "
2883              +"safe-forname:false "
2884              +"safe-newinstance:false "
2885              +"verbose:false "
2886              +"jdkver:3 "
2887              +"all-reachable:false "
2888              +"implicit-entry:true "
2889              +"trim-clinit:true ";
2890    
2891        if( phaseName.equals( "cg.cha" ) )
2892            return ""
2893              +"enabled:true "
2894              +"verbose:false ";
2895    
2896        if( phaseName.equals( "cg.spark" ) )
2897            return ""
2898              +"enabled:false "
2899              +"verbose:false "
2900              +"ignore-types:false "
2901              +"force-gc:false "
2902              +"pre-jimplify:false "
2903              +"vta:false "
2904              +"rta:false "
2905              +"field-based:false "
2906              +"types-for-sites:false "
2907              +"merge-stringbuffer:true "
2908              +"string-constants:false "
2909              +"simulate-natives:true "
2910              +"simple-edges-bidirectional:false "
2911              +"on-fly-cg:true "
2912              +"simplify-offline:false "
2913              +"simplify-sccs:false "
2914              +"ignore-types-for-sccs:false "
2915              +"propagator:worklist "
2916              +"set-impl:double "
2917              +"double-set-old:hybrid "
2918              +"double-set-new:hybrid "
2919              +"dump-html:false "
2920              +"dump-pag:false "
2921              +"dump-solution:false "
2922              +"topo-sort:false "
2923              +"dump-types:true "
2924              +"class-method-var:true "
2925              +"dump-answer:false "
2926              +"add-tags:false "
2927              +"set-mass:false ";
2928    
2929        if( phaseName.equals( "cg.paddle" ) )
2930            return ""
2931              +"enabled:false "
2932              +"verbose:false "
2933              +"conf:ofcg "
2934              +"bdd:false "
2935              +"order:32 "
2936              +"profile:false "
2937              +"q:auto "
2938              +"backend:buddy "
2939              +"ignore-types:false "
2940              +"pre-jimplify:false "
2941              +"context:insens "
2942              +"k:2 "
2943              +"context-heap:false "
2944              +"rta:false "
2945              +"field-based:false "
2946              +"types-for-sites:false "
2947              +"merge-stringbuffer:true "
2948              +"string-constants:false "
2949              +"simulate-natives:true "
2950              +"global-nodes-in-natives:false "
2951              +"simple-edges-bidirectional:false "
2952              +"this-edges:false "
2953              +"precise-newinstance:true "
2954              +"propagator:auto "
2955              +"set-impl:double "
2956              +"double-set-old:hybrid "
2957              +"double-set-new:hybrid "
2958              +"context-counts:false "
2959              +"total-context-counts:false "
2960              +"method-context-counts:false "
2961              +"set-mass:false "
2962              +"number-nodes:true ";
2963    
2964        if( phaseName.equals( "wstp" ) )
2965            return ""
2966              +"enabled:true ";
2967    
2968        if( phaseName.equals( "wsop" ) )
2969            return ""
2970              +"enabled:false ";
2971    
2972        if( phaseName.equals( "wjtp" ) )
2973            return ""
2974              +"enabled:true ";
2975    
2976        if( phaseName.equals( "wjop" ) )
2977            return ""
2978              +"enabled:false ";
2979    
2980        if( phaseName.equals( "wjop.smb" ) )
2981            return ""
2982              +"enabled:false "
2983              +"insert-null-checks:true "
2984              +"insert-redundant-casts:true "
2985              +"allowed-modifier-changes:unsafe ";
2986    
2987        if( phaseName.equals( "wjop.si" ) )
2988            return ""
2989              +"enabled:true "
2990              +"rerun-jb:true "
2991              +"insert-null-checks:true "
2992              +"insert-redundant-casts:true "
2993              +"allowed-modifier-changes:unsafe "
2994              +"expansion-factor:3 "
2995              +"max-container-size:5000 "
2996              +"max-inlinee-size:20 ";
2997    
2998        if( phaseName.equals( "wjap" ) )
2999            return ""
3000              +"enabled:true ";
3001    
3002        if( phaseName.equals( "wjap.ra" ) )
3003            return ""
3004              +"enabled:false ";
3005    
3006        if( phaseName.equals( "wjap.umt" ) )
3007            return ""
3008              +"enabled:false ";
3009    
3010        if( phaseName.equals( "wjap.uft" ) )
3011            return ""
3012              +"enabled:false ";
3013    
3014        if( phaseName.equals( "wjap.tqt" ) )
3015            return ""
3016              +"enabled:false ";
3017    
3018        if( phaseName.equals( "wjap.cgg" ) )
3019            return ""
3020              +"enabled:false "
3021              +"show-lib-meths:false ";
3022    
3023        if( phaseName.equals( "wjap.purity" ) )
3024            return ""
3025              +"enabled:false "
3026              +"dump-summaries:true "
3027              +"dump-cg:false "
3028              +"dump-intra:false "
3029              +"print:true "
3030              +"verbose:false ";
3031    
3032        if( phaseName.equals( "shimple" ) )
3033            return ""
3034              +"enabled:true "
3035              +"node-elim-opt:true "
3036              +"standard-local-names:false "
3037              +"extended:false "
3038              +"debug:false ";
3039    
3040        if( phaseName.equals( "stp" ) )
3041            return ""
3042              +"enabled:true ";
3043    
3044        if( phaseName.equals( "sop" ) )
3045            return ""
3046              +"enabled:false ";
3047    
3048        if( phaseName.equals( "sop.cpf" ) )
3049            return ""
3050              +"enabled:true "
3051              +"prune-cfg:true ";
3052    
3053        if( phaseName.equals( "jtp" ) )
3054            return ""
3055              +"enabled:true ";
3056    
3057        if( phaseName.equals( "jop" ) )
3058            return ""
3059              +"enabled:false ";
3060    
3061        if( phaseName.equals( "jop.cse" ) )
3062            return ""
3063              +"enabled:false "
3064              +"naive-side-effect:false ";
3065    
3066        if( phaseName.equals( "jop.bcm" ) )
3067            return ""
3068              +"enabled:false "
3069              +"naive-side-effect:false ";
3070    
3071        if( phaseName.equals( "jop.lcm" ) )
3072            return ""
3073              +"enabled:false "
3074              +"safety:safe "
3075              +"unroll:true "
3076              +"naive-side-effect:false ";
3077    
3078        if( phaseName.equals( "jop.cp" ) )
3079            return ""
3080              +"enabled:true "
3081              +"only-regular-locals:false "
3082              +"only-stack-locals:false ";
3083    
3084        if( phaseName.equals( "jop.cpf" ) )
3085            return ""
3086              +"enabled:true ";
3087    
3088        if( phaseName.equals( "jop.cbf" ) )
3089            return ""
3090              +"enabled:true ";
3091    
3092        if( phaseName.equals( "jop.dae" ) )
3093            return ""
3094              +"enabled:true "
3095              +"only-tag:false "
3096              +"only-stack-locals:false ";
3097    
3098        if( phaseName.equals( "jop.uce1" ) )
3099            return ""
3100              +"enabled:true "
3101              +"remove-unreachable-traps:false ";
3102    
3103        if( phaseName.equals( "jop.ubf1" ) )
3104            return ""
3105              +"enabled:true ";
3106    
3107        if( phaseName.equals( "jop.uce2" ) )
3108            return ""
3109              +"enabled:true "
3110              +"remove-unreachable-traps:false ";
3111    
3112        if( phaseName.equals( "jop.ubf2" ) )
3113            return ""
3114              +"enabled:true ";
3115    
3116        if( phaseName.equals( "jop.ule" ) )
3117            return ""
3118              +"enabled:true ";
3119    
3120        if( phaseName.equals( "jap" ) )
3121            return ""
3122              +"enabled:true ";
3123    
3124        if( phaseName.equals( "jap.npc" ) )
3125            return ""
3126              +"enabled:false "
3127              +"only-array-ref:false "
3128              +"profiling:false ";
3129    
3130        if( phaseName.equals( "jap.npcolorer" ) )
3131            return ""
3132              +"enabled:false ";
3133    
3134        if( phaseName.equals( "jap.abc" ) )
3135            return ""
3136              +"enabled:false "
3137              +"with-all:false "
3138              +"with-cse:false "
3139              +"with-arrayref:false "
3140              +"with-fieldref:false "
3141              +"with-classfield:false "
3142              +"with-rectarray:false "
3143              +"profiling:false "
3144              +"add-color-tags:false ";
3145    
3146        if( phaseName.equals( "jap.profiling" ) )
3147            return ""
3148              +"enabled:false "
3149              +"notmainentry:false ";
3150    
3151        if( phaseName.equals( "jap.sea" ) )
3152            return ""
3153              +"enabled:false "
3154              +"naive:false ";
3155    
3156        if( phaseName.equals( "jap.fieldrw" ) )
3157            return ""
3158              +"enabled:false "
3159              +"threshold:100 ";
3160    
3161        if( phaseName.equals( "jap.cgtagger" ) )
3162            return ""
3163              +"enabled:false ";
3164    
3165        if( phaseName.equals( "jap.parity" ) )
3166            return ""
3167              +"enabled:false ";
3168    
3169        if( phaseName.equals( "jap.pat" ) )
3170            return ""
3171              +"enabled:false ";
3172    
3173        if( phaseName.equals( "jap.lvtagger" ) )
3174            return ""
3175              +"enabled:false ";
3176    
3177        if( phaseName.equals( "jap.rdtagger" ) )
3178            return ""
3179              +"enabled:false ";
3180    
3181        if( phaseName.equals( "jap.che" ) )
3182            return ""
3183              +"enabled:false ";
3184    
3185        if( phaseName.equals( "jap.umt" ) )
3186            return ""
3187              +"enabled:false ";
3188    
3189        if( phaseName.equals( "jap.lit" ) )
3190            return ""
3191              +"enabled:false ";
3192    
3193        if( phaseName.equals( "jap.aet" ) )
3194            return ""
3195              +"enabled:false "
3196              +"kind:optimistic ";
3197    
3198        if( phaseName.equals( "jap.dmt" ) )
3199            return ""
3200              +"enabled:false ";
3201    
3202        if( phaseName.equals( "gb" ) )
3203            return ""
3204              +"enabled:true ";
3205    
3206        if( phaseName.equals( "gb.a1" ) )
3207            return ""
3208              +"enabled:true "
3209              +"only-stack-locals:true ";
3210    
3211        if( phaseName.equals( "gb.cf" ) )
3212            return ""
3213              +"enabled:true ";
3214    
3215        if( phaseName.equals( "gb.a2" ) )
3216            return ""
3217              +"enabled:true "
3218              +"only-stack-locals:true ";
3219    
3220        if( phaseName.equals( "gb.ule" ) )
3221            return ""
3222              +"enabled:true ";
3223    
3224        if( phaseName.equals( "gop" ) )
3225            return ""
3226              +"enabled:false ";
3227    
3228        if( phaseName.equals( "bb" ) )
3229            return ""
3230              +"enabled:true ";
3231    
3232        if( phaseName.equals( "bb.lso" ) )
3233            return ""
3234              +"enabled:true "
3235              +"debug:false "
3236              +"inter:false "
3237              +"sl:true "
3238              +"sl2:false "
3239              +"sll:true "
3240              +"sll2:false ";
3241    
3242        if( phaseName.equals( "bb.pho" ) )
3243            return ""
3244              +"enabled:true ";
3245    
3246        if( phaseName.equals( "bb.ule" ) )
3247            return ""
3248              +"enabled:true ";
3249    
3250        if( phaseName.equals( "bb.lp" ) )
3251            return ""
3252              +"enabled:true "
3253              +"unsplit-original-locals:false ";
3254    
3255        if( phaseName.equals( "bop" ) )
3256            return ""
3257              +"enabled:false ";
3258    
3259        if( phaseName.equals( "tag" ) )
3260            return ""
3261              +"enabled:true ";
3262    
3263        if( phaseName.equals( "tag.ln" ) )
3264            return ""
3265              +"enabled:true ";
3266    
3267        if( phaseName.equals( "tag.an" ) )
3268            return ""
3269              +"enabled:false ";
3270    
3271        if( phaseName.equals( "tag.dep" ) )
3272            return ""
3273              +"enabled:false ";
3274    
3275        if( phaseName.equals( "tag.fieldrw" ) )
3276            return ""
3277              +"enabled:false ";
3278    
3279        if( phaseName.equals( "db" ) )
3280            return ""
3281              +"enabled:true ";
3282    
3283        if( phaseName.equals( "db.transformations" ) )
3284            return ""
3285              +"enabled:true ";
3286    
3287        if( phaseName.equals( "db.renamer" ) )
3288            return ""
3289              +"enabled:false "
3290              +"remove-fully-qualified:false ";
3291    
3292        if( phaseName.equals( "db.deobfuscate" ) )
3293            return ""
3294              +"enabled:true ";
3295    
3296        if( phaseName.equals( "db.force-recompile" ) )
3297            return ""
3298              +"enabled:true ";
3299    
3300        // The default default value is enabled.
3301
return "enabled";
3302    }
3303  
3304    public void warnForeignPhase( String JavaDoc phaseName ) {
3305    
3306        if( phaseName.equals( "jb" ) ) return;
3307        if( phaseName.equals( "jb.ls" ) ) return;
3308        if( phaseName.equals( "jb.a" ) ) return;
3309        if( phaseName.equals( "jb.ule" ) ) return;
3310        if( phaseName.equals( "jb.tr" ) ) return;
3311        if( phaseName.equals( "jb.ulp" ) ) return;
3312        if( phaseName.equals( "jb.lns" ) ) return;
3313        if( phaseName.equals( "jb.cp" ) ) return;
3314        if( phaseName.equals( "jb.dae" ) ) return;
3315        if( phaseName.equals( "jb.cp-ule" ) ) return;
3316        if( phaseName.equals( "jb.lp" ) ) return;
3317        if( phaseName.equals( "jb.ne" ) ) return;
3318        if( phaseName.equals( "jb.uce" ) ) return;
3319        if( phaseName.equals( "jb.tt" ) ) return;
3320        if( phaseName.equals( "jj" ) ) return;
3321        if( phaseName.equals( "jj.ls" ) ) return;
3322        if( phaseName.equals( "jj.a" ) ) return;
3323        if( phaseName.equals( "jj.ule" ) ) return;
3324        if( phaseName.equals( "jj.tr" ) ) return;
3325        if( phaseName.equals( "jj.ulp" ) ) return;
3326        if( phaseName.equals( "jj.lns" ) ) return;
3327        if( phaseName.equals( "jj.cp" ) ) return;
3328        if( phaseName.equals( "jj.dae" ) ) return;
3329        if( phaseName.equals( "jj.cp-ule" ) ) return;
3330        if( phaseName.equals( "jj.lp" ) ) return;
3331        if( phaseName.equals( "jj.ne" ) ) return;
3332        if( phaseName.equals( "jj.uce" ) ) return;
3333        if( phaseName.equals( "cg" ) ) return;
3334        if( phaseName.equals( "cg.cha" ) ) return;
3335        if( phaseName.equals( "cg.spark" ) ) return;
3336        if( phaseName.equals( "cg.paddle" ) ) return;
3337        if( phaseName.equals( "wstp" ) ) return;
3338        if( phaseName.equals( "wsop" ) ) return;
3339        if( phaseName.equals( "wjtp" ) ) return;
3340        if( phaseName.equals( "wjop" ) ) return;
3341        if( phaseName.equals( "wjop.smb" ) ) return;
3342        if( phaseName.equals( "wjop.si" ) ) return;
3343        if( phaseName.equals( "wjap" ) ) return;
3344        if( phaseName.equals( "wjap.ra" ) ) return;
3345        if( phaseName.equals( "wjap.umt" ) ) return;
3346        if( phaseName.equals( "wjap.uft" ) ) return;
3347        if( phaseName.equals( "wjap.tqt" ) ) return;
3348        if( phaseName.equals( "wjap.cgg" ) ) return;
3349        if( phaseName.equals( "wjap.purity" ) ) return;
3350        if( phaseName.equals( "shimple" ) ) return;
3351        if( phaseName.equals( "stp" ) ) return;
3352        if( phaseName.equals( "sop" ) ) return;
3353        if( phaseName.equals( "sop.cpf" ) ) return;
3354        if( phaseName.equals( "jtp" ) ) return;
3355        if( phaseName.equals( "jop" ) ) return;
3356        if( phaseName.equals( "jop.cse" ) ) return;
3357        if( phaseName.equals( "jop.bcm" ) ) return;
3358        if( phaseName.equals( "jop.lcm" ) ) return;
3359        if( phaseName.equals( "jop.cp" ) ) return;
3360        if( phaseName.equals( "jop.cpf" ) ) return;
3361        if( phaseName.equals( "jop.cbf" ) ) return;
3362        if( phaseName.equals( "jop.dae" ) ) return;
3363        if( phaseName.equals( "jop.uce1" ) ) return;
3364        if( phaseName.equals( "jop.ubf1" ) ) return;
3365        if( phaseName.equals( "jop.uce2" ) ) return;
3366        if( phaseName.equals( "jop.ubf2" ) ) return;
3367        if( phaseName.equals( "jop.ule" ) ) return;
3368        if( phaseName.equals( "jap" ) ) return;
3369        if( phaseName.equals( "jap.npc" ) ) return;
3370        if( phaseName.equals( "jap.npcolorer" ) ) return;
3371        if( phaseName.equals( "jap.abc" ) ) return;
3372        if( phaseName.equals( "jap.profiling" ) ) return;
3373        if( phaseName.equals( "jap.sea" ) ) return;
3374        if( phaseName.equals( "jap.fieldrw" ) ) return;
3375        if( phaseName.equals( "jap.cgtagger" ) ) return;
3376        if( phaseName.equals( "jap.parity" ) ) return;
3377        if( phaseName.equals( "jap.pat" ) ) return;
3378        if( phaseName.equals( "jap.lvtagger" ) ) return;
3379        if( phaseName.equals( "jap.rdtagger" ) ) return;
3380        if( phaseName.equals( "jap.che" ) ) return;
3381        if( phaseName.equals( "jap.umt" ) ) return;
3382        if( phaseName.equals( "jap.lit" ) ) return;
3383        if( phaseName.equals( "jap.aet" ) ) return;
3384        if( phaseName.equals( "jap.dmt" ) ) return;
3385        if( phaseName.equals( "gb" ) ) return;
3386        if( phaseName.equals( "gb.a1" ) ) return;
3387        if( phaseName.equals( "gb.cf" ) ) return;
3388        if( phaseName.equals( "gb.a2" ) ) return;
3389        if( phaseName.equals( "gb.ule" ) ) return;
3390        if( phaseName.equals( "gop" ) ) return;
3391        if( phaseName.equals( "bb" ) ) return;
3392        if( phaseName.equals( "bb.lso" ) ) return;
3393        if( phaseName.equals( "bb.pho" ) ) return;
3394        if( phaseName.equals( "bb.ule" ) ) return;
3395        if( phaseName.equals( "bb.lp" ) ) return;
3396        if( phaseName.equals( "bop" ) ) return;
3397        if( phaseName.equals( "tag" ) ) return;
3398        if( phaseName.equals( "tag.ln" ) ) return;
3399        if( phaseName.equals( "tag.an" ) ) return;
3400        if( phaseName.equals( "tag.dep" ) ) return;
3401        if( phaseName.equals( "tag.fieldrw" ) ) return;
3402        if( phaseName.equals( "db" ) ) return;
3403        if( phaseName.equals( "db.transformations" ) ) return;
3404        if( phaseName.equals( "db.renamer" ) ) return;
3405        if( phaseName.equals( "db.deobfuscate" ) ) return;
3406        if( phaseName.equals( "db.force-recompile" ) ) return;
3407        G.v().out.println( "Warning: Phase "+phaseName+" is not a standard Soot phase listed in XML files." );
3408    }
3409
3410    public void warnNonexistentPhase() {
3411    
3412        if( !PackManager.v().hasPhase( "jb" ) )
3413            G.v().out.println( "Warning: Options exist for non-existent phase jb" );
3414        if( !PackManager.v().hasPhase( "jb.ls" ) )
3415            G.v().out.println( "Warning: Options exist for non-existent phase jb.ls" );
3416        if( !PackManager.v().hasPhase( "jb.a" ) )
3417            G.v().out.println( "Warning: Options exist for non-existent phase jb.a" );
3418        if( !PackManager.v().hasPhase( "jb.ule" ) )
3419            G.v().out.println( "Warning: Options exist for non-existent phase jb.ule" );
3420        if( !PackManager.v().hasPhase( "jb.tr" ) )
3421            G.v().out.println( "Warning: Options exist for non-existent phase jb.tr" );
3422        if( !PackManager.v().hasPhase( "jb.ulp" ) )
3423            G.v().out.println( "Warning: Options exist for non-existent phase jb.ulp" );
3424        if( !PackManager.v().hasPhase( "jb.lns" ) )
3425            G.v().out.println( "Warning: Options exist for non-existent phase jb.lns" );
3426        if( !PackManager.v().hasPhase( "jb.cp" ) )
3427            G.v().out.println( "Warning: Options exist for non-existent phase jb.cp" );
3428        if( !PackManager.v().hasPhase( "jb.dae" ) )
3429            G.v().out.println( "Warning: Options exist for non-existent phase jb.dae" );
3430        if( !PackManager.v().hasPhase( "jb.cp-ule" ) )
3431            G.v().out.println( "Warning: Options exist for non-existent phase jb.cp-ule" );
3432        if( !PackManager.v().hasPhase( "jb.lp" ) )
3433            G.v().out.println( "Warning: Options exist for non-existent phase jb.lp" );
3434        if( !PackManager.v().hasPhase( "jb.ne" ) )
3435            G.v().out.println( "Warning: Options exist for non-existent phase jb.ne" );
3436        if( !PackManager.v().hasPhase( "jb.uce" ) )
3437            G.v().out.println( "Warning: Options exist for non-existent phase jb.uce" );
3438        if( !PackManager.v().hasPhase( "jb.tt" ) )
3439            G.v().out.println( "Warning: Options exist for non-existent phase jb.tt" );
3440        if( !PackManager.v().hasPhase( "jj" ) )
3441            G.v().out.println( "Warning: Options exist for non-existent phase jj" );
3442        if( !PackManager.v().hasPhase( "jj.ls" ) )
3443            G.v().out.println( "Warning: Options exist for non-existent phase jj.ls" );
3444        if( !PackManager.v().hasPhase( "jj.a" ) )
3445            G.v().out.println( "Warning: Options exist for non-existent phase jj.a" );
3446        if( !PackManager.v().hasPhase( "jj.ule" ) )
3447            G.v().out.println( "Warning: Options exist for non-existent phase jj.ule" );
3448        if( !PackManager.v().hasPhase( "jj.tr" ) )
3449            G.v().out.println( "Warning: Options exist for non-existent phase jj.tr" );
3450        if( !PackManager.v().hasPhase( "jj.ulp" ) )
3451            G.v().out.println( "Warning: Options exist for non-existent phase jj.ulp" );
3452        if( !PackManager.v().hasPhase( "jj.lns" ) )
3453            G.v().out.println( "Warning: Options exist for non-existent phase jj.lns" );
3454        if( !PackManager.v().hasPhase( "jj.cp" ) )
3455            G.v().out.println( "Warning: Options exist for non-existent phase jj.cp" );
3456        if( !PackManager.v().hasPhase( "jj.dae" ) )
3457            G.v().out.println( "Warning: Options exist for non-existent phase jj.dae" );
3458        if( !PackManager.v().hasPhase( "jj.cp-ule" ) )
3459            G.v().out.println( "Warning: Options exist for non-existent phase jj.cp-ule" );
3460        if( !PackManager.v().hasPhase( "jj.lp" ) )
3461            G.v().out.println( "Warning: Options exist for non-existent phase jj.lp" );
3462        if( !PackManager.v().hasPhase( "jj.ne" ) )
3463            G.v().out.println( "Warning: Options exist for non-existent phase jj.ne" );
3464        if( !PackManager.v().hasPhase( "jj.uce" ) )
3465            G.v().out.println( "Warning: Options exist for non-existent phase jj.uce" );
3466        if( !PackManager.v().hasPhase( "cg" ) )
3467            G.v().out.println( "Warning: Options exist for non-existent phase cg" );
3468        if( !PackManager.v().hasPhase( "cg.cha" ) )
3469            G.v().out.println( "Warning: Options exist for non-existent phase cg.cha" );
3470        if( !PackManager.v().hasPhase( "cg.spark" ) )
3471            G.v().out.println( "Warning: Options exist for non-existent phase cg.spark" );
3472        if( !PackManager.v().hasPhase( "cg.paddle" ) )
3473            G.v().out.println( "Warning: Options exist for non-existent phase cg.paddle" );
3474        if( !PackManager.v().hasPhase( "wstp" ) )
3475            G.v().out.println( "Warning: Options exist for non-existent phase wstp" );
3476        if( !PackManager.v().hasPhase( "wsop" ) )
3477            G.v().out.println( "Warning: Options exist for non-existent phase wsop" );
3478        if( !PackManager.v().hasPhase( "wjtp" ) )
3479            G.v().out.println( "Warning: Options exist for non-existent phase wjtp" );
3480        if( !PackManager.v().hasPhase( "wjop" ) )
3481            G.v().out.println( "Warning: Options exist for non-existent phase wjop" );
3482        if( !PackManager.v().hasPhase( "wjop.smb" ) )
3483            G.v().out.println( "Warning: Options exist for non-existent phase wjop.smb" );
3484        if( !PackManager.v().hasPhase( "wjop.si" ) )
3485            G.v().out.println( "Warning: Options exist for non-existent phase wjop.si" );
3486        if( !PackManager.v().hasPhase( "wjap" ) )
3487            G.v().out.println( "Warning: Options exist for non-existent phase wjap" );
3488        if( !PackManager.v().hasPhase( "wjap.ra" ) )
3489            G.v().out.println( "Warning: Options exist for non-existent phase wjap.ra" );
3490        if( !PackManager.v().hasPhase( "wjap.umt" ) )
3491            G.v().out.println( "Warning: Options exist for non-existent phase wjap.umt" );
3492        if( !PackManager.v().hasPhase( "wjap.uft" ) )
3493            G.v().out.println( "Warning: Options exist for non-existent phase wjap.uft" );
3494        if( !PackManager.v().hasPhase( "wjap.tqt" ) )
3495            G.v().out.println( "Warning: Options exist for non-existent phase wjap.tqt" );
3496        if( !PackManager.v().hasPhase( "wjap.cgg" ) )
3497            G.v().out.println( "Warning: Options exist for non-existent phase wjap.cgg" );
3498        if( !PackManager.v().hasPhase( "wjap.purity" ) )
3499            G.v().out.println( "Warning: Options exist for non-existent phase wjap.purity" );
3500        if( !PackManager.v().hasPhase( "shimple" ) )
3501            G.v().out.println( "Warning: Options exist for non-existent phase shimple" );
3502        if( !PackManager.v().hasPhase( "stp" ) )
3503            G.v().out.println( "Warning: Options exist for non-existent phase stp" );
3504        if( !PackManager.v().hasPhase( "sop" ) )
3505            G.v().out.println( "Warning: Options exist for non-existent phase sop" );
3506        if( !PackManager.v().hasPhase( "sop.cpf" ) )
3507            G.v().out.println( "Warning: Options exist for non-existent phase sop.cpf" );
3508        if( !PackManager.v().hasPhase( "jtp" ) )
3509            G.v().out.println( "Warning: Options exist for non-existent phase jtp" );
3510        if( !PackManager.v().hasPhase( "jop" ) )
3511            G.v().out.println( "Warning: Options exist for non-existent phase jop" );
3512        if( !PackManager.v().hasPhase( "jop.cse" ) )
3513            G.v().out.println( "Warning: Options exist for non-existent phase jop.cse" );
3514        if( !PackManager.v().hasPhase( "jop.bcm" ) )
3515            G.v().out.println( "Warning: Options exist for non-existent phase jop.bcm" );
3516        if( !PackManager.v().hasPhase( "jop.lcm" ) )
3517            G.v().out.println( "Warning: Options exist for non-existent phase jop.lcm" );
3518        if( !PackManager.v().hasPhase( "jop.cp" ) )
3519            G.v().out.println( "Warning: Options exist for non-existent phase jop.cp" );
3520        if( !PackManager.v().hasPhase( "jop.cpf" ) )
3521            G.v().out.println( "Warning: Options exist for non-existent phase jop.cpf" );
3522        if( !PackManager.v().hasPhase( "jop.cbf" ) )
3523            G.v().out.println( "Warning: Options exist for non-existent phase jop.cbf" );
3524        if( !PackManager.v().hasPhase( "jop.dae" ) )
3525            G.v().out.println( "Warning: Options exist for non-existent phase jop.dae" );
3526        if( !PackManager.v().hasPhase( "jop.uce1" ) )
3527            G.v().out.println( "Warning: Options exist for non-existent phase jop.uce1" );
3528        if( !PackManager.v().hasPhase( "jop.ubf1" ) )
3529            G.v().out.println( "Warning: Options exist for non-existent phase jop.ubf1" );
3530        if( !PackManager.v().hasPhase( "jop.uce2" ) )
3531            G.v().out.println( "Warning: Options exist for non-existent phase jop.uce2" );
3532        if( !PackManager.v().hasPhase( "jop.ubf2" ) )
3533            G.v().out.println( "Warning: Options exist for non-existent phase jop.ubf2" );
3534        if( !PackManager.v().hasPhase( "jop.ule" ) )
3535            G.v().out.println( "Warning: Options exist for non-existent phase jop.ule" );
3536        if( !PackManager.v().hasPhase( "jap" ) )
3537            G.v().out.println( "Warning: Options exist for non-existent phase jap" );
3538        if( !PackManager.v().hasPhase( "jap.npc" ) )
3539            G.v().out.println( "Warning: Options exist for non-existent phase jap.npc" );
3540        if( !PackManager.v().hasPhase( "jap.npcolorer" ) )
3541            G.v().out.println( "Warning: Options exist for non-existent phase jap.npcolorer" );
3542        if( !PackManager.v().hasPhase( "jap.abc" ) )
3543            G.v().out.println( "Warning: Options exist for non-existent phase jap.abc" );
3544        if( !PackManager.v().hasPhase( "jap.profiling" ) )
3545            G.v().out.println( "Warning: Options exist for non-existent phase jap.profiling" );
3546        if( !PackManager.v().hasPhase( "jap.sea" ) )
3547            G.v().out.println( "Warning: Options exist for non-existent phase jap.sea" );
3548        if( !PackManager.v().hasPhase( "jap.fieldrw" ) )
3549            G.v().out.println( "Warning: Options exist for non-existent phase jap.fieldrw" );
3550        if( !PackManager.v().hasPhase( "jap.cgtagger" ) )
3551            G.v().out.println( "Warning: Options exist for non-existent phase jap.cgtagger" );
3552        if( !PackManager.v().hasPhase( "jap.parity" ) )
3553            G.v().out.println( "Warning: Options exist for non-existent phase jap.parity" );
3554        if( !PackManager.v().hasPhase( "jap.pat" ) )
3555            G.v().out.println( "Warning: Options exist for non-existent phase jap.pat" );
3556        if( !PackManager.v().hasPhase( "jap.lvtagger" ) )
3557            G.v().out.println( "Warning: Options exist for non-existent phase jap.lvtagger" );
3558        if( !PackManager.v().hasPhase( "jap.rdtagger" ) )
3559            G.v().out.println( "Warning: Options exist for non-existent phase jap.rdtagger" );
3560        if( !PackManager.v().hasPhase( "jap.che" ) )
3561            G.v().out.println( "Warning: Options exist for non-existent phase jap.che" );
3562        if( !PackManager.v().hasPhase( "jap.umt" ) )
3563            G.v().out.println( "Warning: Options exist for non-existent phase jap.umt" );
3564        if( !PackManager.v().hasPhase( "jap.lit" ) )
3565            G.v().out.println( "Warning: Options exist for non-existent phase jap.lit" );
3566        if( !PackManager.v().hasPhase( "jap.aet" ) )
3567            G.v().out.println( "Warning: Options exist for non-existent phase jap.aet" );
3568        if( !PackManager.v().hasPhase( "jap.dmt" ) )
3569            G.v().out.println( "Warning: Options exist for non-existent phase jap.dmt" );
3570        if( !PackManager.v().hasPhase( "gb" ) )
3571            G.v().out.println( "Warning: Options exist for non-existent phase gb" );
3572        if( !PackManager.v().hasPhase( "gb.a1" ) )
3573            G.v().out.println( "Warning: Options exist for non-existent phase gb.a1" );
3574        if( !PackManager.v().hasPhase( "gb.cf" ) )
3575            G.v().out.println( "Warning: Options exist for non-existent phase gb.cf" );
3576        if( !PackManager.v().hasPhase( "gb.a2" ) )
3577            G.v().out.println( "Warning: Options exist for non-existent phase gb.a2" );
3578        if( !PackManager.v().hasPhase( "gb.ule" ) )
3579            G.v().out.println( "Warning: Options exist for non-existent phase gb.ule" );
3580        if( !PackManager.v().hasPhase( "gop" ) )
3581            G.v().out.println( "Warning: Options exist for non-existent phase gop" );
3582        if( !PackManager.v().hasPhase( "bb" ) )
3583            G.v().out.println( "Warning: Options exist for non-existent phase bb" );
3584        if( !PackManager.v().hasPhase( "bb.lso" ) )
3585            G.v().out.println( "Warning: Options exist for non-existent phase bb.lso" );
3586        if( !PackManager.v().hasPhase( "bb.pho" ) )
3587            G.v().out.println( "Warning: Options exist for non-existent phase bb.pho" );
3588        if( !PackManager.v().hasPhase( "bb.ule" ) )
3589            G.v().out.println( "Warning: Options exist for non-existent phase bb.ule" );
3590        if( !PackManager.v().hasPhase( "bb.lp" ) )
3591            G.v().out.println( "Warning: Options exist for non-existent phase bb.lp" );
3592        if( !PackManager.v().hasPhase( "bop" ) )
3593            G.v().out.println( "Warning: Options exist for non-existent phase bop" );
3594        if( !PackManager.v().hasPhase( "tag" ) )
3595            G.v().out.println( "Warning: Options exist for non-existent phase tag" );
3596        if( !PackManager.v().hasPhase( "tag.ln" ) )
3597            G.v().out.println( "Warning: Options exist for non-existent phase tag.ln" );
3598        if( !PackManager.v().hasPhase( "tag.an" ) )
3599            G.v().out.println( "Warning: Options exist for non-existent phase tag.an" );
3600        if( !PackManager.v().hasPhase( "tag.dep" ) )
3601            G.v().out.println( "Warning: Options exist for non-existent phase tag.dep" );
3602        if( !PackManager.v().hasPhase( "tag.fieldrw" ) )
3603            G.v().out.println( "Warning: Options exist for non-existent phase tag.fieldrw" );
3604        if( !PackManager.v().hasPhase( "db" ) )
3605            G.v().out.println( "Warning: Options exist for non-existent phase db" );
3606        if( !PackManager.v().hasPhase( "db.transformations" ) )
3607            G.v().out.println( "Warning: Options exist for non-existent phase db.transformations" );
3608        if( !PackManager.v().hasPhase( "db.renamer" ) )
3609            G.v().out.println( "Warning: Options exist for non-existent phase db.renamer" );
3610        if( !PackManager.v().hasPhase( "db.deobfuscate" ) )
3611            G.v().out.println( "Warning: Options exist for non-existent phase db.deobfuscate" );
3612        if( !PackManager.v().hasPhase( "db.force-recompile" ) )
3613            G.v().out.println( "Warning: Options exist for non-existent phase db.force-recompile" );
3614    }
3615  
3616}
3617
Popular Tags