KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > options > ABCOptions


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 java.util.*;
25
26 /** Option parser for Array Bound Checker. */
27 public class ABCOptions
28 {
29     private Map options;
30
31     public ABCOptions( Map options ) {
32         this.options = options;
33     }
34     
35     /** Enabled --
36     
37      * .
38     
39      *
40      */

41     public boolean enabled() {
42         return soot.PhaseOptions.getBoolean( options, "enabled" );
43     }
44     
45     /** With All --
46     
47      * .
48     
49      * Setting the With All option to true is equivalent to setting
50      * each of With CSE, With Array Ref, With Field Ref, With Class
51      * Field, and With Rectangular Array to true.
52      */

53     public boolean with_all() {
54         return soot.PhaseOptions.getBoolean( options, "with-all" );
55     }
56     
57     /** With Common Sub-expressions --
58     
59      * .
60     
61      * The analysis will consider common subexpressions. For example,
62      * consider the situation where r1 is assigned a*b; later, r2 is
63      * assigned a*b, where neither a nor b have changed between the two
64      * statements. The analysis can conclude that r2 has the same value
65      * as r1. Experiments show that this option can improve the result
66      * slightly.
67      */

68     public boolean with_cse() {
69         return soot.PhaseOptions.getBoolean( options, "with-cse" );
70     }
71     
72     /** With Array References --
73     
74      * .
75     
76      * With this option enabled, array references can be considered as
77      * common subexpressions; however, we are more conservative when
78      * writing into an array, because array objects may be aliased. We
79      * also assume that the application is single-threaded or that the
80      * array references occur in a synchronized block. That is, we
81      * assume that an array element may not be changed by other threads
82      * between two array references.
83      */

84     public boolean with_arrayref() {
85         return soot.PhaseOptions.getBoolean( options, "with-arrayref" );
86     }
87     
88     /** With Field References --
89     
90      * .
91     
92      * The analysis treats field references (static and instance) as
93      * common subexpressions; however, we are more conservative when
94      * writing to a field, because the base of the field reference may
95      * be aliased. We also assume that the application is
96      * single-threaded or that the field references occur in a
97      * synchronized block. That is, we assume that a field may not be
98      * changed by other threads between two field references.
99      */

100     public boolean with_fieldref() {
101         return soot.PhaseOptions.getBoolean( options, "with-fieldref" );
102     }
103     
104     /** With Class Field --
105     
106      * .
107     
108      * This option makes the analysis work on the class level. The
109      * algorithm analyzes final or private class fields first. It can
110      * recognize the fields that hold array objects of constant length.
111      * In an application using lots of array fields, this option can
112      * improve the analysis results dramatically.
113      */

114     public boolean with_classfield() {
115         return soot.PhaseOptions.getBoolean( options, "with-classfield" );
116     }
117     
118     /** With Rectangular Array --
119     
120      * .
121     
122      * This option is used together with wjap.ra to make Soot run the
123      * whole-program analysis for rectangular array objects. This
124      * analysis is based on the call graph, and it usually takes a long
125      * time. If the application uses rectangular arrays, these options
126      * can improve the analysis result.
127      */

128     public boolean with_rectarray() {
129         return soot.PhaseOptions.getBoolean( options, "with-rectarray" );
130     }
131     
132     /** Profiling --
133     
134      * Profile the results of array bounds check analysis..
135     
136      * Profile the results of array bounds check analysis. The
137      * inserted profiling code assumes the existence of a MultiCounter
138      * class implementing the methods invoked. For details, see the
139      * ArrayBoundsChecker source code.
140      */

141     public boolean profiling() {
142         return soot.PhaseOptions.getBoolean( options, "profiling" );
143     }
144     
145     /** Add Color Tags --
146     
147      * Add color tags to results of array bound check analysis..
148     
149      * Add color tags to the results of the array bounds check
150      * analysis.
151      */

152     public boolean add_color_tags() {
153         return soot.PhaseOptions.getBoolean( options, "add-color-tags" );
154     }
155     
156 }
157         
Popular Tags