@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
48 lines (47 loc) • 2.17 kB
TypeScript
import type { FlowrAnalyzerContext } from './flowr-analyzer-context';
import type { IEnvironment, REnvironmentInformation } from '../../dataflow/environments/environment';
import type { DeepReadonly } from 'ts-essentials';
import type { Fingerprint } from '../../slicing/static/fingerprint';
/**
* This is the read-only interface to the {@link FlowrAnalyzerEnvironmentContext},
* which provides access to the built-in environment used during analysis.
*/
export interface ReadOnlyFlowrAnalyzerEnvironmentContext {
/**
* Get the built-in environment used during analysis.
*/
get builtInEnvironment(): DeepReadonly<IEnvironment>;
/**
* Get the empty built-in environment used during analysis.
* The empty built-in environment only contains primitive definitions.
*/
get emptyBuiltInEnvironment(): DeepReadonly<IEnvironment>;
/**
* Create a new {@link REnvironmentInformation|environment} with the configured built-in environment as base.
*/
makeCleanEnv(): REnvironmentInformation;
/**
* Get the fingerprint of the clean environment with the configured built-in environment as base.
*/
getCleanEnvFingerprint(): Fingerprint;
/**
* Create a new {@link REnvironmentInformation|environment} with an empty built-in environment as base.
*/
makeCleanEnvWithEmptyBuiltIns(): REnvironmentInformation;
}
/**
* This context is responsible for providing the built-in environment.
* It creates the built-in environment based on the configuration provided in the {@link FlowrAnalyzerContext}.
*/
export declare class FlowrAnalyzerEnvironmentContext implements ReadOnlyFlowrAnalyzerEnvironmentContext {
readonly name = "flowr-analyzer-environment-context";
private readonly builtInEnv;
private readonly emptyBuiltInEnv;
private builtInEnvFingerprint;
constructor(ctx: FlowrAnalyzerContext);
get builtInEnvironment(): DeepReadonly<IEnvironment>;
get emptyBuiltInEnvironment(): DeepReadonly<IEnvironment>;
makeCleanEnv(): REnvironmentInformation;
getCleanEnvFingerprint(): Fingerprint;
makeCleanEnvWithEmptyBuiltIns(): REnvironmentInformation;
}