@@ -33,7 +33,7 @@ object FlowSensitiveAnalysis {
3333 def select (kind : Analysis .Value , options : AnalysisOption .Value , cfg : FragmentCfg )(implicit declData : DeclarationData ): Option [FlowSensitiveAnalysis [_]] = {
3434
3535 val typedCfg = options match {
36- case AnalysisOption .iwli | AnalysisOption .iwlip | AnalysisOption .`csiwlip ` | AnalysisOption .`cfiwlip ` | AnalysisOption .`ide` =>
36+ case AnalysisOption .`iwlr` | AnalysisOption .`iwlrp` | AnalysisOption .`csiwlrp ` | AnalysisOption .`cfiwlrp ` | AnalysisOption .`ide` =>
3737 cfg match {
3838 case w : InterproceduralProgramCfg => Right (w)
3939 case _ => throw new RuntimeException (s " Whole CFG needed " )
@@ -67,43 +67,43 @@ object FlowSensitiveAnalysis {
6767 case Analysis .constprop => new ConstantPropagationAnalysisWorklistSolver (typedCfg.left.get)
6868 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
6969 })
70- case AnalysisOption .`wli ` =>
70+ case AnalysisOption .`wlr ` =>
7171 Some (kind match {
72- case Analysis .sign => new IntraprocSignAnalysisWorklistSolverWithInit (typedCfg.left.get)
73- case Analysis .interval => new IntervalAnalysisWorklistSolverWithInit (typedCfg.left.get)
72+ case Analysis .sign => new IntraprocSignAnalysisWorklistSolverWithReachability (typedCfg.left.get)
73+ case Analysis .interval => new IntervalAnalysisWorklistSolverWithReachability (typedCfg.left.get)
7474 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
7575 })
76- case AnalysisOption .`wliw ` =>
76+ case AnalysisOption .`wlrw ` =>
7777 Some (kind match {
7878 case Analysis .interval => new IntervalAnalysisWorklistSolverWithWidening (typedCfg.left.get)
7979 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
8080 })
81- case AnalysisOption .`wliwn ` =>
81+ case AnalysisOption .`wlrwn ` =>
8282 Some (kind match {
8383 case Analysis .interval => new IntervalAnalysisWorklistSolverWithWideningAndNarrowing (typedCfg.left.get)
8484 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
8585 })
86- case AnalysisOption .`wlip ` =>
86+ case AnalysisOption .`wlrp ` =>
8787 Some (kind match {
88- case Analysis .sign => new IntraprocSignAnalysisWorklistSolverWithInitAndPropagation (typedCfg.left.get)
88+ case Analysis .sign => new IntraprocSignAnalysisWorklistSolverWithReachabilityAndPropagation (typedCfg.left.get)
8989 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
9090 })
91- case AnalysisOption .`iwli ` =>
91+ case AnalysisOption .`iwlr ` =>
9292 Some (kind match {
93- case Analysis .sign => new InterprocSignAnalysisWorklistSolverWithInit (typedCfg.right.get)
93+ case Analysis .sign => new InterprocSignAnalysisWorklistSolverWithReachability (typedCfg.right.get)
9494 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
9595 })
96- case AnalysisOption .`iwlip ` =>
96+ case AnalysisOption .`iwlrp ` =>
9797 Some (kind match {
98- case Analysis .sign => new InterprocSignAnalysisWorklistSolverWithInitAndPropagation (typedCfg.right.get)
98+ case Analysis .sign => new InterprocSignAnalysisWorklistSolverWithReachabilityAndPropagation (typedCfg.right.get)
9999 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
100100 })
101- case AnalysisOption .`csiwlip ` =>
101+ case AnalysisOption .`csiwlrp ` =>
102102 Some (kind match {
103103 case Analysis .sign => new CallStringSignAnalysis (typedCfg.right.get)
104104 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
105105 })
106- case AnalysisOption .`cfiwlip ` =>
106+ case AnalysisOption .`cfiwlrp ` =>
107107 Some (kind match {
108108 case Analysis .sign => new FunctionalSignAnalysis (typedCfg.right.get)
109109 case _ => throw new RuntimeException (s " Unsupported solver option ` $options` for the analysis $kind" )
@@ -121,40 +121,40 @@ object FlowSensitiveAnalysis {
121121 *
122122 * - Enabled: use the simple fixpoint solver
123123 * - wl: use the worklist solver
124- * - wli : use the worklist solver with init
125- * - wliw : use the worklist solver with init and widening
126- * - wliwn : use the worklist solver with init , widening, and narrowing
127- * - wlip : use the worklist solver with init and propagation
128- * - iwli : use the worklist solver with init , interprocedural version
129- * - iwlip : use the worklist solver with init and propagation, interprocedural version
130- * - csiwlip : use the worklist solver with init and propagation, context-sensitive (with call string) interprocedural version
131- * - cfiwlip : use the worklist solver with init and propagation, context-sensitive (with functional approach) interprocedural version
124+ * - wlr : use the worklist solver with reachability
125+ * - wlrw : use the worklist solver with reachability and widening
126+ * - wlrwn : use the worklist solver with reachability , widening, and narrowing
127+ * - wlrp : use the worklist solver with reachability and propagation
128+ * - iwlr : use the worklist solver with reachability , interprocedural version
129+ * - iwlrp : use the worklist solver with reachability and propagation, interprocedural version
130+ * - csiwlrp : use the worklist solver with reachability and propagation, context-sensitive (with call string) interprocedural version
131+ * - cfiwlrp : use the worklist solver with reachability and propagation, context-sensitive (with functional approach) interprocedural version
132132 * - ide: use the IDE solver
133133 */
134134 object AnalysisOption extends Enumeration {
135- val simple, Disabled, wl, wli, wliw, wliwn, wlip, iwli, iwlip, csiwlip, cfiwlip , ide = Value
135+ val simple, Disabled, wl, wlr, wlrw, wlrwn, wlrp, iwlr, iwlrp, csiwlrp, cfiwlrp , ide = Value
136136
137137 def interprocedural (v : Value ): Boolean =
138138 v match {
139- case `iwli ` => true
140- case `iwlip ` => true
141- case `csiwlip ` => true
142- case `cfiwlip ` => true
139+ case `iwlr ` => true
140+ case `iwlrp ` => true
141+ case `csiwlrp ` => true
142+ case `cfiwlrp ` => true
143143 case `ide` => true
144144 case _ => false
145145 }
146146
147147 def contextsensitive (v : Value ): Boolean =
148148 v match {
149- case `csiwlip ` => true
150- case `cfiwlip ` => true
149+ case `csiwlrp ` => true
150+ case `cfiwlrp ` => true
151151 case _ => false
152152 }
153153
154154 def withWidening (v : Value ): Boolean =
155155 v match {
156- case `wliw ` => true
157- case `wliwn ` => true
156+ case `wlrw ` => true
157+ case `wlrwn ` => true
158158 case _ => false
159159 }
160160 }
0 commit comments