/** * POWL8 Process DAG Builder * * Provides a Fluent API / Builder pattern to construct * POWL8 (Process Ontology Web Language) DAGs easily for the HardenedAtomVM. */ export class Powl8Builder { dag: any[]; /** * Spawns a sequential process task. * @param {Array} children - Microtasks to execute sequentially. * @returns {Powl8Builder} */ spawnSeq(children: Array): Powl8Builder; /** * Spawns a choice gateway (XOR split). * @param {string|function} predicate - The condition to evaluate. * @param {Object} branches - Map of branch outcomes to microtasks. * @returns {Powl8Builder} */ spawnChoice(predicate: string | Function, branches: any): Powl8Builder; /** * Spawns a synchronization barrier (AND join). * @param {Array} dependencies - Process IDs to wait for. * @returns {Powl8Builder} */ awaitSync(dependencies: Array): Powl8Builder; /** * Spawns a standard microtask (not POWL8 specific). * @param {Object} task - The task payload. * @returns {Powl8Builder} */ addTask(task: any): Powl8Builder; /** * Returns the constructed DAG ready for execution. * @returns {Array} */ build(): Array; }