import type { ModuleParams } from "./clingo.js"; import { Witness } from "./witnesses.js"; /** Called with each model as clingo finds it, while solving is running. */ export type OnModel = (model: Witness) => void; export interface ClingoResult { Solver?: string; Calls: number; Call: { Witnesses: Witness[]; }[]; Models: { More: "yes" | "no"; Number: number; Brave?: "yes" | "no"; Consequences?: any; }; Result: "SATISFIABLE" | "UNSATISFIABLE" | "UNKNOWN" | "OPTIMUM FOUND"; Time: { CPU: number; Model: number; Solve: number; Total: number; Unsat: number; }; Warnings: string[]; } export interface ClingoError { Result: "ERROR"; Error: string; } export type ClingoParams = ModuleParams & { /** Force the single-threaded build even when threads are supported. */ singleThreaded?: boolean; }; export declare class Runner { private extraParams; private results; private errors; private parser?; private clingo; constructor(extraParams?: ClingoParams); init(): Promise; private static ERROR_STATUS; run(program: string, models?: number, options?: string[], onModel?: OnModel): ClingoResult | ClingoError; } export type RunFunction = typeof Runner.prototype.run; /** The shape of the promise-based run functions exported by the entry points. */ export type AsyncRunFunction = (...args: Parameters) => Promise>; export declare function init(extraParams?: ClingoParams): Promise;