/** * Verbose dump file -- * Filename for detailed execution log. * * If you want to save the geomPTA analysis information for future * analysis, please provide a file name. */ public String geom_dump_verbose() { return soot.PhaseOptions.getString(options, "geom-dump-verbose"); }
/** * Reflection Log -- * Uses a reflection log to resolve reflective calls. * * Load a reflection log from the given file and use this log to * resolve reflective call sites. Note that when a log is given, * the following other options have no effect: safe-forname, * safe-newinstance. */ public String reflection_log() { return soot.PhaseOptions.getString(options, "reflection-log"); }
/** * FixedClassNames -- * Set for the fixed class names.. * * Use this parameter to set some class names unchangable even they * are duplicated. The fixed class name list cannot contain * duplicated class names. Using '-' to split multiple class names * (e.g., fcn:a.b.c-a.b.d). */ public String fixed_class_names() { return soot.PhaseOptions.getString(options, "fcn fixed-class-names"); }
/** * Verification file -- * Filename for verification file. * * If you want to compare the precision of the points-to results * with other solvers (e.g. Paddle), you can use the 'verify-file' * to specify the list of methods (soot method signature format) * that are reachable by that solver. During the internal * evaluations (see the option geom-eval), we only consider the * methods that are common to both solvers. */ public String geom_verify_name() { return soot.PhaseOptions.getString(options, "geom-verify-name"); }
/** * Guarding strategy -- * Describes how to guard the program from unsound assumptions. * * Using a reflection log is only sound for method executions that * were logged. Executing the program differently may be unsound. * Soot can insert guards at program points for which the * reflection log contains no information. When these points are * reached (because the program is executed differently) then the * follwing will happen, depending on the value of this flag. * ignore: no guard is inserted, the program executes normally but * under unsound assumptions. print: the program prints a stack * trace when reaching a porgram location that was not traced but * continues to run. throw (default): the program throws an Error * instead. */ public String guards() { return soot.PhaseOptions.getString(options, "guards"); }
/** * Kind */ public int kind() { String s = soot.PhaseOptions.getString(options, "kind"); if (s == null || s.isEmpty()) return kind_optimistic; if (s.equalsIgnoreCase("optimistic")) return kind_optimistic; if (s.equalsIgnoreCase("pessimistic")) return kind_pessimistic; throw new RuntimeException(String.format("Invalid value %s of phase option kind", s)); }
/** * Allowed Modifier Changes * Specify which changes in visibility modifiers are allowed. */ public int allowed_modifier_changes() { String s = soot.PhaseOptions.getString(options, "allowed-modifier-changes"); if (s == null || s.isEmpty()) return allowed_modifier_changes_unsafe; if (s.equalsIgnoreCase("unsafe")) return allowed_modifier_changes_unsafe; if (s.equalsIgnoreCase("safe")) return allowed_modifier_changes_safe; if (s.equalsIgnoreCase("none")) return allowed_modifier_changes_none; throw new RuntimeException(String.format("Invalid value %s of phase option allowed-modifier-changes", s)); }
/** * Allowed Modifier Changes * Specify which changes in visibility modifiers are allowed. */ public int allowed_modifier_changes() { String s = soot.PhaseOptions.getString(options, "allowed-modifier-changes"); if (s == null || s.isEmpty()) return allowed_modifier_changes_unsafe; if (s.equalsIgnoreCase("unsafe")) return allowed_modifier_changes_unsafe; if (s.equalsIgnoreCase("safe")) return allowed_modifier_changes_safe; if (s.equalsIgnoreCase("none")) return allowed_modifier_changes_none; throw new RuntimeException(String.format("Invalid value %s of phase option allowed-modifier-changes", s)); }
/** * Safety * This option controls which fields and statements are candidates * for code motion. */ public int safety() { String s = soot.PhaseOptions.getString(options, "safety"); if (s == null || s.isEmpty()) return safety_safe; if (s.equalsIgnoreCase("safe")) return safety_safe; if (s.equalsIgnoreCase("medium")) return safety_medium; if (s.equalsIgnoreCase("unsafe")) return safety_unsafe; throw new RuntimeException(String.format("Invalid value %s of phase option safety", s)); }
/** * Worklist type -- * Worklist type. * * Specifies the worklist used for selecting the next propagation * pointer. All possible options are: PQ, FIFO. They stand for the * priority queue (sorted by the last fire time and topology order) * and FIFO queue. */ public int geom_worklist() { String s = soot.PhaseOptions.getString(options, "geom-worklist"); if (s == null || s.isEmpty()) return geom_worklist_PQ; if (s.equalsIgnoreCase("PQ")) return geom_worklist_PQ; if (s.equalsIgnoreCase("FIFO")) return geom_worklist_FIFO; throw new RuntimeException(String.format("Invalid value %s of phase option geom-worklist", s)); }
/** * Locking Scheme -- * Selects the granularity of the generated lock allocation. * * Selects the granularity of the generated lock allocation */ public int locking_scheme() { String s = soot.PhaseOptions.getString(options, "locking-scheme"); if (s == null || s.isEmpty()) return locking_scheme_medium_grained; if (s.equalsIgnoreCase("medium-grained")) return locking_scheme_medium_grained; if (s.equalsIgnoreCase("coarse-grained")) return locking_scheme_coarse_grained; if (s.equalsIgnoreCase("single-static")) return locking_scheme_single_static; if (s.equalsIgnoreCase("leave-original")) return locking_scheme_leave_original; throw new RuntimeException(String.format("Invalid value %s of phase option locking-scheme", s)); }
/** * Encoding methodology used -- * Encoding methodology. * * This switch specifies the encoding methodology used in the * analysis. All possible options are: Geom, HeapIns, PtIns. The * efficiency order is (from slow to fast) Geom - HeapIns - PtIns, * but the precision order is the reverse. */ public int geom_encoding() { String s = soot.PhaseOptions.getString(options, "geom-encoding"); if (s == null || s.isEmpty()) return geom_encoding_Geom; if (s.equalsIgnoreCase("Geom")) return geom_encoding_Geom; if (s.equalsIgnoreCase("HeapIns")) return geom_encoding_HeapIns; if (s.equalsIgnoreCase("PtIns")) return geom_encoding_PtIns; throw new RuntimeException(String.format("Invalid value %s of phase option geom-encoding", s)); }
/** * Double Set New -- * Select implementation of points-to set for new part of double * set. * * Select an implementation for sets of new objects in the double * points-to set implementation. This option has no effect unless * Set Implementation is set to double. */ public int double_set_new() { String s = soot.PhaseOptions.getString(options, "double-set-new"); if (s == null || s.isEmpty()) return double_set_new_hybrid; if (s.equalsIgnoreCase("hash")) return double_set_new_hash; if (s.equalsIgnoreCase("bit")) return double_set_new_bit; if (s.equalsIgnoreCase("hybrid")) return double_set_new_hybrid; if (s.equalsIgnoreCase("array")) return double_set_new_array; if (s.equalsIgnoreCase("heintze")) return double_set_new_heintze; throw new RuntimeException(String.format("Invalid value %s of phase option double-set-new", s)); }
/** * Set Implementation -- * Select points-to set implementation. * * Select an implementation of points-to sets for Paddle to use. */ public int set_impl() { String s = soot.PhaseOptions.getString(options, "set-impl"); if (s == null || s.isEmpty()) return set_impl_double; if (s.equalsIgnoreCase("hash")) return set_impl_hash; if (s.equalsIgnoreCase("bit")) return set_impl_bit; if (s.equalsIgnoreCase("hybrid")) return set_impl_hybrid; if (s.equalsIgnoreCase("array")) return set_impl_array; if (s.equalsIgnoreCase("heintze")) return set_impl_heintze; if (s.equalsIgnoreCase("double")) return set_impl_double; throw new RuntimeException(String.format("Invalid value %s of phase option set-impl", s)); }
/** * Worklist Implementation -- * Select queue implementation. * * Select the implementation of worklists to be used in Paddle. */ public int q() { String s = soot.PhaseOptions.getString(options, "q"); if (s == null || s.isEmpty()) return q_auto; if (s.equalsIgnoreCase("auto")) return q_auto; if (s.equalsIgnoreCase("trad")) return q_trad; if (s.equalsIgnoreCase("bdd")) return q_bdd; if (s.equalsIgnoreCase("debug")) return q_debug; if (s.equalsIgnoreCase("trace")) return q_trace; if (s.equalsIgnoreCase("numtrace")) return q_numtrace; throw new RuntimeException(String.format("Invalid value %s of phase option q", s)); }
/** * Propagator -- * Select propagation algorithm. * * This option tells Spark which propagation algorithm to use. */ public int propagator() { String s = soot.PhaseOptions.getString(options, "propagator"); if (s == null || s.isEmpty()) return propagator_worklist; if (s.equalsIgnoreCase("iter")) return propagator_iter; if (s.equalsIgnoreCase("worklist")) return propagator_worklist; if (s.equalsIgnoreCase("cycle")) return propagator_cycle; if (s.equalsIgnoreCase("merge")) return propagator_merge; if (s.equalsIgnoreCase("alias")) return propagator_alias; if (s.equalsIgnoreCase("none")) return propagator_none; throw new RuntimeException(String.format("Invalid value %s of phase option propagator", s)); }
/** * Double Set Old -- * Select implementation of points-to set for old part of double * set. * * Select an implementation for sets of old objects in the double * points-to set implementation. This option has no effect unless * Set Implementation is set to double. */ public int double_set_old() { String s = soot.PhaseOptions.getString(options, "double-set-old"); if (s == null || s.isEmpty()) return double_set_old_hybrid; if (s.equalsIgnoreCase("hash")) return double_set_old_hash; if (s.equalsIgnoreCase("bit")) return double_set_old_bit; if (s.equalsIgnoreCase("hybrid")) return double_set_old_hybrid; if (s.equalsIgnoreCase("array")) return double_set_old_array; if (s.equalsIgnoreCase("heintze")) return double_set_old_heintze; throw new RuntimeException(String.format("Invalid value %s of phase option double-set-old", s)); }
/** * Backend -- * Select BDD backend. * * This option tells Paddle which implementation of BDDs to use. */ public int backend() { String s = soot.PhaseOptions.getString(options, "backend"); if (s == null || s.isEmpty()) return backend_auto; if (s.equalsIgnoreCase("auto")) return backend_auto; if (s.equalsIgnoreCase("buddy")) return backend_buddy; if (s.equalsIgnoreCase("cudd")) return backend_cudd; if (s.equalsIgnoreCase("sable")) return backend_sable; if (s.equalsIgnoreCase("javabdd")) return backend_javabdd; if (s.equalsIgnoreCase("none")) return backend_none; throw new RuntimeException(String.format("Invalid value %s of phase option backend", s)); }
/** * Propagator -- * Select propagation algorithm. * * This option tells Paddle which propagation algorithm to use. */ public int propagator() { String s = soot.PhaseOptions.getString(options, "propagator"); if (s == null || s.isEmpty()) return propagator_auto; if (s.equalsIgnoreCase("auto")) return propagator_auto; if (s.equalsIgnoreCase("iter")) return propagator_iter; if (s.equalsIgnoreCase("worklist")) return propagator_worklist; if (s.equalsIgnoreCase("alias")) return propagator_alias; if (s.equalsIgnoreCase("bdd")) return propagator_bdd; if (s.equalsIgnoreCase("incbdd")) return propagator_incbdd; throw new RuntimeException(String.format("Invalid value %s of phase option propagator", s)); }
private void initialize(Map<String, String> options) { if (drawer == null) { drawer = new CFGToDotGraph(); drawer.setBriefLabels(PhaseOptions.getBoolean(options, briefLabelOptionName)); drawer.setOnePage(!PhaseOptions.getBoolean(options, multipageOptionName)); drawer.setUnexceptionalControlFlowAttr("color", "black"); drawer.setExceptionalControlFlowAttr("color", "red"); drawer.setExceptionEdgeAttr("color", "lightgray"); drawer.setShowExceptions(Options.v().show_exception_dests()); ir = CFGIntermediateRep.getIR(PhaseOptions.getString(options, irOptionName)); graphtype = CFGGraphType.getGraphType(PhaseOptions.getString(options, graphTypeOptionName)); AltClassLoader.v().setAltClassPath(PhaseOptions.getString(options, altClassPathOptionName)); AltClassLoader.v() .setAltClasses(new String[] { "soot.toolkits.graph.ArrayRefBlockGraph", "soot.toolkits.graph.Block", "soot.toolkits.graph.Block$AllMapTo", "soot.toolkits.graph.BlockGraph", "soot.toolkits.graph.BriefBlockGraph", "soot.toolkits.graph.BriefUnitGraph", "soot.toolkits.graph.CompleteBlockGraph", "soot.toolkits.graph.CompleteUnitGraph", "soot.toolkits.graph.TrapUnitGraph", "soot.toolkits.graph.UnitGraph", "soot.toolkits.graph.ZonedBlockGraph", }); } }