@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
62 lines • 2.49 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateFrameStateDomain = exports.DataFrameDomain = void 0;
const positive_interval_domain_1 = require("../domains/positive-interval-domain");
const product_domain_1 = require("../domains/product-domain");
const set_bounded_set_domain_1 = require("../domains/set-bounded-set-domain");
const state_abstract_domain_1 = require("../domains/state-abstract-domain");
/**
* The data frame abstract domain as product domain of a column names domain, column count domain, and row count domain.
*/
class DataFrameDomain extends product_domain_1.ProductDomain {
constructor(value, maxColNames) {
super({
colnames: new set_bounded_set_domain_1.SetBoundedSetDomain(value.colnames.value, maxColNames),
cols: new positive_interval_domain_1.PosIntervalDomain(value.cols.value),
rows: new positive_interval_domain_1.PosIntervalDomain(value.rows.value)
});
}
create(value, maxColNames) {
return new DataFrameDomain(value, maxColNames);
}
/**
* The current abstract value of the column names domain.
*/
get colnames() {
return this.value.colnames.value;
}
/**
* The current abstract value of the column count domain.
*/
get cols() {
return this.value.cols.value;
}
/**
* The current abstract value of the row count domain.
*/
get rows() {
return this.value.rows.value;
}
static bottom(maxColNames) {
return new DataFrameDomain({
colnames: set_bounded_set_domain_1.SetBoundedSetDomain.bottom(maxColNames),
cols: positive_interval_domain_1.PosIntervalDomain.bottom(),
rows: positive_interval_domain_1.PosIntervalDomain.bottom()
});
}
static top(maxColNames) {
return new DataFrameDomain({
colnames: set_bounded_set_domain_1.SetBoundedSetDomain.top(maxColNames),
cols: positive_interval_domain_1.PosIntervalDomain.top(),
rows: positive_interval_domain_1.PosIntervalDomain.top()
});
}
}
exports.DataFrameDomain = DataFrameDomain;
/**
* The data frame state abstract domain as state abstract domain mapping AST node IDs to inferred abstract data frame shapes.
*/
class DateFrameStateDomain extends state_abstract_domain_1.StateAbstractDomain {
}
exports.DateFrameStateDomain = DateFrameStateDomain;
//# sourceMappingURL=dataframe-domain.js.map