@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
41 lines (40 loc) • 1.97 kB
TypeScript
import type { AbstractDomain } from '../domains/abstract-domain';
import { PosIntervalDomain } from '../domains/positive-interval-domain';
import { ProductDomain } from '../domains/product-domain';
import { SetBoundedSetDomain } from '../domains/set-bounded-set-domain';
import { StateAbstractDomain } from '../domains/state-abstract-domain';
/** The type of the abstract product representing the shape of data frames */
export type AbstractDataFrameShape = {
colnames: SetBoundedSetDomain<string>;
cols: PosIntervalDomain;
rows: PosIntervalDomain;
};
/** The type of abstract values of a sub abstract domain (shape property) of the data frame shape product */
type DataFrameShapeProperty<Property extends keyof AbstractDataFrameShape> = AbstractDataFrameShape[Property] extends AbstractDomain<unknown, unknown, unknown, unknown, infer Lift> ? Lift : never;
/**
* The data frame abstract domain as product domain of a column names domain, column count domain, and row count domain.
*/
export declare class DataFrameDomain extends ProductDomain<AbstractDataFrameShape> {
constructor(value: AbstractDataFrameShape, maxColNames?: number);
create(value: AbstractDataFrameShape, maxColNames?: number): DataFrameDomain;
/**
* The current abstract value of the column names domain.
*/
get colnames(): DataFrameShapeProperty<'colnames'>;
/**
* The current abstract value of the column count domain.
*/
get cols(): DataFrameShapeProperty<'cols'>;
/**
* The current abstract value of the row count domain.
*/
get rows(): DataFrameShapeProperty<'rows'>;
static bottom(maxColNames?: number): DataFrameDomain;
static top(maxColNames?: number): DataFrameDomain;
}
/**
* The data frame state abstract domain as state abstract domain mapping AST node IDs to inferred abstract data frame shapes.
*/
export declare class DateFrameStateDomain extends StateAbstractDomain<DataFrameDomain> {
}
export {};