/** * Tree Formatter - Generates Mermaid diagram from tree structure * * By default, uses clause variable names instead of internal Prolog names. * With --debug:internal-vars, shows both: "Z (_2008) = value" */ import { TreeNode } from './tree.js'; import { TimelineStep, Solution } from './timeline.js'; import { DebugFlag } from './cli.js'; export interface TreeFormatterOptions { debugFlags?: Set; } /** * Format tree as Mermaid diagram */ export declare function formatTreeAsMermaid(root: TreeNode | null, options?: TreeFormatterOptions): string; /** * Format the execution timeline as a Mermaid derivation diagram. * * Reads as the actual execution flow rather than a static call tree: goals are * chained in the order they run, and backtracking shows up as a loop — a dotted * "backtrack to Ⓝ" edge from the dead end back to the choice point, then a thick * "retry" edge on to the re-solution. It inherits everything the timeline gets * right (query-named goals, real results, conjunction siblings, nested retries), * and ends on a ✓ node carrying the answer. */ export declare function formatTimelineAsMermaid(steps: TimelineStep[], query: string, finalAnswer?: string, options?: TreeFormatterOptions, solutions?: Solution[]): string; /** * Handle backtracking visualization in tree */ export declare function markBacktrackingPaths(root: TreeNode): void; //# sourceMappingURL=tree-formatter.d.ts.map