/**
 * @fileoverview Test generator compilation and execution utilities.
 * Provides functions to run test generators and create test files.
 */
import type { LocalGenerator, GeneratorScriptCommand, LocalTestset } from '../types';
/**
 * Runs a generator program to create a test file.
 * Executes the compiled generator with given arguments and redirects output to a file.
 *
 * @param {string} execCommand - Path to compiled generator executable
 * @param {string[]} args - Arguments to pass to the generator
 * @param {string} outputFilePath - Path where test output will be written
 *
 * @throws {Error} If generator execution fails
 * @throws {Error} If generator exceeds time or memory limits (exits process)
 *
 * @example
 * await runGenerator(
 *   './gen-random',
 *   ['1', '100'],
 *   'tests/test1.txt'
 * );
 */
export declare function runGenerator(execCommand: string, args: string[], outputFilePath: string): Promise<void>;
/**
 * Ensures generators are defined in configuration.
 * Type assertion function that throws if no generators exist.
 *
 * @param {LocalGenerator[] | undefined} generators - Generators array to validate
 *
 * @throws {Error} If no generators are defined in configuration
 *
 * @example
 * const config = readConfigFile();
 * ensureGeneratorsExist(config.generators);
 * // Now TypeScript knows generators is defined
 */
export declare function ensureGeneratorsExist(generators: LocalGenerator[] | undefined): asserts generators is LocalGenerator[];
/**
 * Compiles a generator program.
 * Wrapper around compileCPP with consistent error handling.
 *
 * @param {LocalGenerator} generator - Generator configuration
 * @returns {Promise<string>} Path to compiled generator executable
 *
 * @throws {Error} If compilation fails
 *
 * @example
 * const path = await compileGenerator({ name: 'gen', source: 'generators/gen.cpp' });
 */
export declare function compileGenerator(generator: LocalGenerator): Promise<void>;
/**
 * Compiles all generators needed for the given commands.
 * Returns a map of generator names to compiled paths.
 *
 * @param {GeneratorScriptCommand[]} commands - Generator commands to analyze
 * @param {LocalGenerator[]} generators - Available generators
 * @returns {Promise<Map<string, string>>} Map of generator name to compiled path
 *
 * @throws {Error} If any generator compilation fails
 * @throws {Error} If a required generator is not found
 *
 * @example
 * const compiledPaths = await compileAllGenerators(commands, generators);
 * const genPath = compiledPaths.get('gen-random');
 */
export declare function compileAllGenerators(commands: GeneratorScriptCommand[], generators: LocalGenerator[]): Promise<Map<string, string>>;
/**
 * Compiles all unique generators used across all testsets.
 *
 * @param {LocalTestset[]} testsets - Testsets to analyze for generator usage
 * @param {LocalGenerator[]} generators - Available generators
 * @returns {Promise<void>} Resolves when all generators are compiled
 *
 * @throws {Error} If any generator compilation fails
 *
 * @example
 * await compileGeneratorsForTestsets(config.testsets, config.generators);
 */
export declare function compileGeneratorsForTestsets(testsets: LocalTestset[], generators: LocalGenerator[]): Promise<void>;
/**
 * Executes generation script commands to create test files.
 * Processes each command in the script, handling both manual and generated tests.
 * Requires generators to be pre-compiled (use compileAllGenerators first).
 *
 * @param {GeneratorScriptCommand[]} commands - Array of generation commands
 * @param {LocalGenerator[]} generators - Available generators
 * @param {string} [outputDir] - Output directory for tests (defaults to ./tests)
 * @param {number} [startIndex] - Starting test index (defaults to 1)
 *
 * @throws {Error} If any command fails to execute
 *
 * @example
 * await executeGeneratorScript(
 *   [
 *     { type: 'manual', manualFile: './tests/manual/sample.txt' },
 *     { type: 'generator-single', generator: 'gen-random', args: ['1'] }
 *   ],
 *   generators,
 *   './tests/my-testset'
 * );
 */
export declare function executeGeneratorScript(commands: GeneratorScriptCommand[], generators: LocalGenerator[], outputDir: string): Promise<void>;
//# sourceMappingURL=generator.d.ts.map