Package daikon
Class DynComp
- Object
-
- DynComp
-
public class DynComp extends Object
This is the main class for DynComp. It uses the -javaagent switch to Java (which allows classes to be instrumented as they are loaded). This class parses the command line arguments and starts Java with the -javaagent switch on the target program. Code based largely on daikon.Chicory.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
abridged_vars
Causes DynComp to abridge the variable names printed.static @MonotonicNonNull File
comparability_file
Output filename for a more easily human-readable file summarizing comparability sets.static boolean
debug
Output debugging information.static boolean
debug_decl_print
Print detailed information on variables being observed.static File
debug_dir
The directory in which to dump instrumented class files.static boolean
debug_transform
Print detailed information on which classes are transformed.static @Nullable String
decl_file
Output filename for .decls file suitable for input to Daikon.static boolean
dump
Dump the instrumented classes to disk.static boolean
help
Display usage information.static int
nesting_depth
Depth to which to examine structure components.static boolean
no_jdk
Do not use the instrumented JDK.static File
output_dir
The directory in which to create output files.static List<Pattern>
ppt_omit_pattern
Suppress program points that match regex.static List<Pattern>
ppt_select_pattern
Only emit program points that match regex.static @MonotonicNonNull File
premain
Path to Java agent .jar file that performs the transformation.static @Nullable File
rt_file
Specifies the location of the instrumented JDK.static long
start
starting time (msecs)static boolean
std_visibility
Causes DynComp to traverse exactly those fields visible from a given program point.static String
synopsis
Synopsis for the DynComp command line.static @MonotonicNonNull File
trace_file
If specified, write a human-readable file showing some of the interactions that occurred.static int
trace_line_depth
Controls size of the stack displayed in tracing the interactions that occurred.static boolean
verbose
Print information about the classes being transformed.
-
Constructor Summary
Constructors Constructor Description DynComp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
args_to_string(List<String> args)
Convert a list of arguments into a command-line string.static void
check_args(Options options, String[] target_args)
Check the command-line arguments for legality.static String
elapsed()
Returns elapsed time since the start of the program.static long
elapsed_msecs()
Returns number of milliseconds since the start of the program.static void
main(String[] args)
Entry point of DynComp.int
redirect_wait(Process p)
Wait for stream redirect threads to complete.
-
-
-
Field Detail
-
help
public static boolean help
Display usage information.
-
verbose
public static boolean verbose
Print information about the classes being transformed.
-
dump
public static boolean dump
Dump the instrumented classes to disk.
-
debug
public static boolean debug
Output debugging information.
-
output_dir
public static File output_dir
The directory in which to create output files.
-
decl_file
public static @Nullable String decl_file
Output filename for .decls file suitable for input to Daikon.
-
comparability_file
public static @MonotonicNonNull File comparability_file
Output filename for a more easily human-readable file summarizing comparability sets.
-
trace_file
public static @MonotonicNonNull File trace_file
If specified, write a human-readable file showing some of the interactions that occurred.
-
trace_line_depth
public static int trace_line_depth
Controls size of the stack displayed in tracing the interactions that occurred.
-
abridged_vars
public static boolean abridged_vars
Causes DynComp to abridge the variable names printed.
-
ppt_select_pattern
public static List<Pattern> ppt_select_pattern
Only emit program points that match regex.
-
ppt_omit_pattern
public static List<Pattern> ppt_omit_pattern
Suppress program points that match regex.
-
std_visibility
public static boolean std_visibility
Causes DynComp to traverse exactly those fields visible from a given program point.
-
nesting_depth
public static int nesting_depth
Depth to which to examine structure components.
-
premain
public static @MonotonicNonNull File premain
Path to Java agent .jar file that performs the transformation. The "main" procedure isPremain.premain()
.
-
debug_transform
public static boolean debug_transform
Print detailed information on which classes are transformed.
-
debug_decl_print
public static boolean debug_decl_print
Print detailed information on variables being observed.
-
no_jdk
public static boolean no_jdk
Do not use the instrumented JDK.
-
start
public static long start
starting time (msecs)
-
synopsis
public static final String synopsis
Synopsis for the DynComp command line.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DynComp
public DynComp()
-
-
Method Detail
-
main
public static void main(String[] args)
Entry point of DynComp.- Parameters:
args
- see usage for argument descriptions
-
check_args
public static void check_args(Options options, String[] target_args)
Check the command-line arguments for legality. Prints a message and exits if there was an error.- Parameters:
options
- set of legal options to DynComptarget_args
- arguments being passed to the target program
-
redirect_wait
public int redirect_wait(Process p)
Wait for stream redirect threads to complete.
-
elapsed
public static String elapsed()
Returns elapsed time since the start of the program.- Returns:
- elapsed time since the start of the program
-
elapsed_msecs
public static long elapsed_msecs()
Returns number of milliseconds since the start of the program.- Returns:
- number of milliseconds since the start of the program
-
args_to_string
public String args_to_string(List<String> args)
Convert a list of arguments into a command-line string. Only used for debugging output.- Parameters:
args
- the list of arguments- Returns:
- argument string
-
-