UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

348 lines (347 loc) 14.5 kB
/** * This interface describes options, that every script *must* provide. */ export interface CommonOptions { /** Enables the most verbose logging option available. */ verbose: boolean; /** * Shows the respective help including usage examples, * see {@link processCommandLineArgs} or {@link helpForOptions} for more information. */ help: boolean; } export declare const benchmarkOptions: [{ readonly name: "verbose"; readonly alias: "v"; readonly type: BooleanConstructor; readonly description: "Run with verbose logging [do not use for the real benchmark as this affects the time measurements, but only to find errors]"; }, { readonly name: "help"; readonly alias: "h"; readonly type: BooleanConstructor; readonly description: "Print this usage guide"; }, { readonly name: "limit"; readonly alias: "l"; readonly type: NumberConstructor; readonly description: "Limit the number of files to process (if given, this will choose these files randomly and add the chosen names to the output"; }, { readonly name: "runs"; readonly alias: "r"; readonly type: NumberConstructor; readonly description: "The amount of benchmark runs that should be done, out of which an average will be calculated"; }, { readonly name: "seed"; readonly type: StringConstructor; readonly description: "The random seed for sampling the files if a limit is set, and for sampling the slicing criteria if a maximum is set"; }, { readonly name: "input"; readonly alias: "i"; readonly type: StringConstructor; readonly description: "Pass a folder or file as src to read from. Alternatively, pass a single JSON file that contains a list of paths."; readonly multiple: true; readonly defaultOption: true; readonly defaultValue: readonly []; readonly typeLabel: "{underline files/folders}"; }, { readonly name: "parallel"; readonly alias: "p"; readonly type: StringConstructor; readonly description: "Number of parallel executors (defaults to {italic max(cpu.count-1, 1)})"; readonly defaultValue: number; readonly typeLabel: "{underline number}"; }, { readonly name: "slice"; readonly alias: "s"; readonly type: StringConstructor; readonly description: "Automatically slice for *all* variables (default) or *no* slicing and only parsing/dataflow construction. Numbers will indicate: sample X random slices from all."; readonly defaultValue: "all"; readonly typeLabel: "{underline all/no}"; }, { readonly name: "output"; readonly alias: "o"; readonly type: StringConstructor; readonly description: `Folder to write all the measurements to in a per-file-basis (defaults to {italic benchmark-${string}})`; readonly defaultValue: `benchmark-${string}`; readonly typeLabel: "{underline folder}"; }, { readonly name: "parser"; readonly type: StringConstructor; readonly description: "The parser to use for the benchmark"; readonly defaultValue: "r-shell"; readonly typeLabel: "{underline parser}"; }, { readonly name: "dataframe-shape-inference"; readonly type: BooleanConstructor; readonly description: "Infer the shape of data frames using abstract interpretation (includes control flow graph extraction)"; readonly defaultValue: false; }, { readonly name: "max-file-slices"; readonly type: NumberConstructor; readonly description: "If file has more than passed number of slices, the file is not processed"; readonly defaultValue: -1; readonly typeLabel: "{underline number}"; }, { readonly name: "threshold"; readonly alias: "t"; readonly type: NumberConstructor; readonly description: "How many re-visits of the same node are ok?"; readonly defaultValue: undefined; readonly typeLabel: "{underline number}"; }, { readonly name: "per-file-time-limit"; readonly type: NumberConstructor; readonly description: "Time limit in milliseconds to process single file (disabled by default)"; readonly defaultValue: undefined; readonly typeLabel: "{underline number}"; }, { readonly name: "sampling-strategy"; readonly type: StringConstructor; readonly description: "Which strategy to use, when sampling is enabled"; readonly defaultValue: "random"; readonly typeLabel: "{underline random/equidistant}"; }, { readonly name: "cfg"; readonly alias: "c"; readonly type: BooleanConstructor; readonly description: "Extract the control flow graph of the file (benchmark it too)"; }, { readonly name: "cg"; readonly type: BooleanConstructor; readonly description: "Extract the call graph of the file (benchmark it too)"; }, { readonly name: "no-extra-phases"; readonly type: BooleanConstructor; readonly description: "Skip the dependencies query, the linter run and the calibration, which cost suite runtime"; readonly defaultValue: false; }]; export declare const benchmarkHelperOptions: [{ readonly name: "verbose"; readonly alias: "v"; readonly type: BooleanConstructor; readonly description: "Run with verbose logging [do not use for the real benchmark as this affects the time measurements, but only to find errors]"; }, { readonly name: "help"; readonly alias: "h"; readonly type: BooleanConstructor; readonly description: "Print this usage guide"; }, { readonly name: "input"; readonly alias: "i"; readonly type: StringConstructor; readonly description: "Pass a single file as src to read from"; readonly multiple: false; readonly defaultOption: true; readonly typeLabel: "{underline file}"; }, { readonly name: "file-id"; readonly alias: "d"; readonly type: NumberConstructor; readonly description: "A numeric file id that can be used to match an input and run-num to a file"; }, { readonly name: "run-num"; readonly alias: "r"; readonly type: NumberConstructor; readonly description: "The n-th time that the file with the given file-id is being benchmarked"; }, { readonly name: "slice"; readonly alias: "s"; readonly type: StringConstructor; readonly description: "Automatically slice for *all* variables (default) or *no* slicing and only parsing/dataflow construction. Numbers will indicate: sample X random slices from all."; readonly defaultValue: "all"; readonly typeLabel: "{underline all/no}"; }, { readonly name: "cfg"; readonly alias: "c"; readonly type: BooleanConstructor; readonly description: "Extract the control flow graph of the file (benchmark it too)"; }, { readonly name: "cg"; readonly type: BooleanConstructor; readonly description: "Extract the call graph of the file (benchmark it too)"; }, { readonly name: "output"; readonly alias: "o"; readonly type: StringConstructor; readonly description: "File to write the measurements to (appends a single line in JSON format)"; readonly typeLabel: "{underline file}"; }, { readonly name: "parser"; readonly type: StringConstructor; readonly description: "The parser to use for the benchmark"; readonly defaultValue: "r-shell"; readonly typeLabel: "{underline parser}"; }, { readonly name: "dataframe-shape-inference"; readonly type: BooleanConstructor; readonly description: "Infer the shape of data frames using abstract interpretation (includes control flow graph extraction)"; readonly defaultValue: false; }, { readonly name: "max-slices"; readonly type: NumberConstructor; readonly description: "If file has more than passed number of slices, the file is not processed"; readonly defaultValue: -1; readonly typeLabel: "{underline number}"; }, { readonly name: "threshold"; readonly alias: "t"; readonly type: NumberConstructor; readonly description: "How many re-visits of the same node are ok?"; readonly defaultValue: undefined; readonly typeLabel: "{underline number}"; }, { readonly name: "sampling-strategy"; readonly type: StringConstructor; readonly description: "Which strategy to use, when sampling is enabled"; readonly defaultValue: "random"; readonly typeLabel: "{underline random/equidistant}"; }, { readonly name: "no-extra-phases"; readonly type: BooleanConstructor; readonly description: "Skip the dependencies query, the linter run and the calibration, which cost suite runtime"; readonly defaultValue: false; }, { readonly name: "calibrate"; readonly type: BooleanConstructor; readonly description: "Run the machine calibration workload, which describes the machine and not the file, so only a few files of a suite carry it"; readonly defaultValue: false; }, { readonly name: "seed"; readonly type: StringConstructor; readonly description: "The random seed for sampling the slicing criteria if a maximum is set"; }]; export declare const slicerOptions: [{ readonly name: "verbose"; readonly alias: "v"; readonly type: BooleanConstructor; readonly description: "Run with verbose logging"; }, { readonly name: "help"; readonly alias: "h"; readonly type: BooleanConstructor; readonly description: "Print this usage guide"; }, { readonly name: "input"; readonly alias: "i"; readonly type: StringConstructor; readonly description: "(Required) Pass a single file to slice"; readonly multiple: false; readonly defaultOption: true; readonly typeLabel: "{underline files}"; }, { readonly name: "input-is-text"; readonly alias: "r"; readonly type: BooleanConstructor; readonly description: "Indicate, that the input is *not* a file, but R code to directly consume"; }, { readonly name: "diff"; readonly alias: "d"; readonly type: BooleanConstructor; readonly description: "This requires ansi-output and only works if the api option is not set. It visualizes the slice as a diff."; }, { readonly name: "criterion"; readonly alias: "c"; readonly type: StringConstructor; readonly description: "(Required) Slicing criterion either in the form {underline line:col} or {underline line@variable}, multiple can be separated by '{bold ;}'. If you do not want to slice but only process the file, pass an empty string."; readonly multiple: false; }, { readonly name: "stats"; readonly alias: "s"; readonly type: BooleanConstructor; readonly description: "Print stats and write them to {italic <output>.stats} (runtimes etc.)"; readonly multiple: false; }, { readonly name: "output"; readonly alias: "o"; readonly type: StringConstructor; readonly description: "File to write all the generated quads to (defaults to the commandline)"; readonly typeLabel: "{underline file}"; }, { readonly name: "no-magic-comments"; readonly alias: "m"; readonly type: BooleanConstructor; readonly description: "Disable the effects of magic comments which force lines to be included."; }, { readonly name: "inline"; readonly type: BooleanConstructor; readonly description: "Inline resolvable {italic source()} calls into the reconstruction so the slice is a single self-contained R text."; }, { readonly name: "inline-full"; readonly alias: "I"; readonly type: BooleanConstructor; readonly description: "Inline {italic all} files into one, in flowR's loading order (respecting implicit sources), independent of whether they are sourced explicitly."; }, { readonly name: "inline-banner"; readonly alias: "B"; readonly type: BooleanConstructor; readonly description: "Together with {bold --inline-full}: precede every inlined file with a banner comment naming it."; }, { readonly name: "include-callees"; readonly type: BooleanConstructor; readonly description: "If slicing backward, continue past a function-definition boundary, also including the definition's binding and call sites."; }, { readonly name: "api"; readonly type: BooleanConstructor; readonly description: "Instead of human-readable output, dump a lot of json with the results of all intermediate steps."; }, { readonly name: "config-file"; readonly type: StringConstructor; readonly description: "The name of the configuration file to use"; readonly multiple: false; }, { readonly name: "config-json"; readonly type: StringConstructor; readonly description: "The flowR configuration to use, as a JSON string"; readonly multiple: false; }]; export declare const summarizerOptions: [{ readonly name: "verbose"; readonly alias: "v"; readonly type: BooleanConstructor; readonly description: "Run with verbose logging"; }, { readonly name: "help"; readonly alias: "h"; readonly type: BooleanConstructor; readonly description: "Print this usage guide"; }, { readonly name: "type"; readonly alias: "t"; readonly type: StringConstructor; readonly description: "Manually specify if you want to post-process benchmark results (defaults to auto)."; readonly defaultValue: "auto"; }, { readonly name: "graph"; readonly alias: "g"; readonly type: BooleanConstructor; readonly description: "Produce data to be used for visualizing benchmarks over time"; }, { readonly name: "categorize"; readonly type: BooleanConstructor; readonly description: "Categorize the results (e.g., \"test\", \"example\", ...)"; readonly defaultValue: false; }, { readonly name: "project-skip"; readonly type: NumberConstructor; readonly description: "Skip the first n folders to find the location of projects"; readonly defaultValue: 0; }, { readonly name: "ultimate-only"; readonly alias: "u"; readonly type: BooleanConstructor; readonly description: "Only perform the second summary-stage, with this, the input is used to find the summary-output."; }, { readonly name: "input"; readonly alias: "i"; readonly type: StringConstructor; readonly description: "The {italic output} produced by the benchmark"; readonly defaultOption: true; readonly multiple: false; readonly typeLabel: "{underline file.json/output}"; }, { readonly name: "output"; readonly alias: "o"; readonly type: StringConstructor; readonly description: "Basename of the summaries (defaults to {italic <input>-summary})"; readonly typeLabel: "{underline file}"; }];