@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
23 lines • 871 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.executeControlFlowQuery = executeControlFlowQuery;
const log_1 = require("../../../util/log");
const cfg_kind_1 = require("../../../project/cfg-kind");
/**
* Executes the control flow query with the given simplification passes.
*/
async function executeControlFlowQuery({ analyzer }, queries) {
if (queries.length !== 1) {
log_1.log.warn('The control flow query expects only up to one query, but got', queries.length);
}
const query = queries[0];
const start = Date.now();
const controlFlow = await analyzer.controlflow(query.config?.simplificationPasses, cfg_kind_1.CfgKind.WithDataflow);
return {
'.meta': {
timing: Date.now() - start
},
controlFlow
};
}
//# sourceMappingURL=control-flow-query-executor.js.map