ggen-cli-lib 26.7.3

CLI interface for ggen
Documentation
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ggen: <https://ggen.io/marketplace/> .
@prefix lnctrl: <https://ggen.io/ontology/ln_ctrl#> .

# ln_ctrl Kernel IR Ontology
# Defines 11 kernel primitives for deterministic control flow
# Generated by ggen wizard

# ============================================================================
# Core Classes
# ============================================================================

lnctrl:KernelNode a rdfs:Class ;
    rdfs:label "KernelNode" ;
    rdfs:comment "Base class for all kernel IR nodes" .

lnctrl:Act a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Act" ;
    rdfs:comment "Atomic action primitive - executes a single indivisible operation" .

lnctrl:Eff a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Eff" ;
    rdfs:comment "Effect declaration primitive - declares observable side effects" .

lnctrl:Seq a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Seq" ;
    rdfs:comment "Sequential composition primitive - executes children in order" .

lnctrl:Par a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Par" ;
    rdfs:comment "Parallel composition primitive - executes children concurrently" .

lnctrl:Join a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Join" ;
    rdfs:comment "Synchronization primitive - waits for multiple branches to complete" .

lnctrl:Choice a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Choice" ;
    rdfs:comment "Branching primitive - selects one path based on condition" .

lnctrl:Loop a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Loop" ;
    rdfs:comment "Iteration primitive - repeats body while condition holds" .

lnctrl:Wait a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Wait" ;
    rdfs:comment "Temporal delay primitive - suspends execution for duration" .

lnctrl:Scope a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Scope" ;
    rdfs:comment "Resource boundary primitive - manages resource lifecycle" .

lnctrl:Cancel a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Cancel" ;
    rdfs:comment "Cancellation primitive - aborts execution of target" .

lnctrl:Stop a rdfs:Class ;
    rdfs:subClassOf lnctrl:KernelNode ;
    rdfs:label "Stop" ;
    rdfs:comment "Termination primitive - halts execution immediately" .

# ============================================================================
# Common Properties (All Nodes)
# ============================================================================

lnctrl:id a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:string ;
    rdfs:label "id" ;
    rdfs:comment "Unique identifier for the node (canonical form)" .

lnctrl:type a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:string ;
    rdfs:label "type" ;
    rdfs:comment "Node type (Act, Eff, Seq, Par, Join, Choice, Loop, Wait, Scope, Cancel, Stop)" .

lnctrl:children a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range rdf:List ;
    rdfs:label "children" ;
    rdfs:comment "Ordered list of child nodes (for composite primitives)" .

lnctrl:metadata a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range rdfs:Literal ;
    rdfs:label "metadata" ;
    rdfs:comment "Optional metadata annotations (source location, tags)" .

# ============================================================================
# Act Properties
# ============================================================================

lnctrl:action a rdf:Property ;
    rdfs:domain lnctrl:Act ;
    rdfs:range xsd:string ;
    rdfs:label "action" ;
    rdfs:comment "Name of the action to execute" .

lnctrl:parameters a rdf:Property ;
    rdfs:domain lnctrl:Act ;
    rdfs:range rdfs:Literal ;
    rdfs:label "parameters" ;
    rdfs:comment "Parameters passed to the action (JSON object)" .

lnctrl:timeout a rdf:Property ;
    rdfs:domain lnctrl:Act ;
    rdfs:range xsd:integer ;
    rdfs:label "timeout" ;
    rdfs:comment "Maximum execution time in milliseconds" .

lnctrl:idempotent a rdf:Property ;
    rdfs:domain lnctrl:Act ;
    rdfs:range xsd:boolean ;
    rdfs:label "idempotent" ;
    rdfs:comment "Whether the action can be safely retried" .

# ============================================================================
# Eff Properties
# ============================================================================

lnctrl:effect a rdf:Property ;
    rdfs:domain lnctrl:Eff ;
    rdfs:range xsd:string ;
    rdfs:label "effect" ;
    rdfs:comment "Name of the effect being declared" .

lnctrl:handler a rdf:Property ;
    rdfs:domain lnctrl:Eff ;
    rdfs:range xsd:string ;
    rdfs:label "handler" ;
    rdfs:comment "Handler implementation for the effect" .

lnctrl:body a rdf:Property ;
    rdfs:domain lnctrl:Eff ;
    rdfs:range lnctrl:KernelNode ;
    rdfs:label "body" ;
    rdfs:comment "Body expression that may perform the effect" .

# ============================================================================
# Seq Properties
# ============================================================================

lnctrl:steps a rdf:Property ;
    rdfs:domain lnctrl:Seq ;
    rdfs:range rdf:List ;
    rdfs:label "steps" ;
    rdfs:comment "Ordered list of steps to execute sequentially" .

lnctrl:short_circuit a rdf:Property ;
    rdfs:domain lnctrl:Seq ;
    rdfs:range xsd:boolean ;
    rdfs:label "short_circuit" ;
    rdfs:comment "Whether to stop on first error" .

# ============================================================================
# Par Properties
# ============================================================================

lnctrl:branches a rdf:Property ;
    rdfs:domain lnctrl:Par ;
    rdfs:range rdf:List ;
    rdfs:label "branches" ;
    rdfs:comment "List of branches to execute concurrently" .

lnctrl:strategy a rdf:Property ;
    rdfs:domain lnctrl:Par ;
    rdfs:range xsd:string ;
    rdfs:label "strategy" ;
    rdfs:comment "Execution strategy (all, any, race)" .

lnctrl:max_concurrency a rdf:Property ;
    rdfs:domain lnctrl:Par ;
    rdfs:range xsd:integer ;
    rdfs:label "max_concurrency" ;
    rdfs:comment "Maximum number of concurrent branches (0 = unlimited)" .

# ============================================================================
# Join Properties
# ============================================================================

lnctrl:targets a rdf:Property ;
    rdfs:domain lnctrl:Join ;
    rdfs:range rdf:List ;
    rdfs:label "targets" ;
    rdfs:comment "List of node IDs to synchronize on" .

lnctrl:join_mode a rdf:Property ;
    rdfs:domain lnctrl:Join ;
    rdfs:range xsd:string ;
    rdfs:label "join_mode" ;
    rdfs:comment "Join mode (all, any, N)" .

lnctrl:join_count a rdf:Property ;
    rdfs:domain lnctrl:Join ;
    rdfs:range xsd:integer ;
    rdfs:label "join_count" ;
    rdfs:comment "Number of targets to wait for (when join_mode=N)" .

# ============================================================================
# Choice Properties
# ============================================================================

lnctrl:condition a rdf:Property ;
    rdfs:domain lnctrl:Choice ;
    rdfs:range xsd:string ;
    rdfs:label "condition" ;
    rdfs:comment "Condition expression to evaluate" .

lnctrl:then_branch a rdf:Property ;
    rdfs:domain lnctrl:Choice ;
    rdfs:range lnctrl:KernelNode ;
    rdfs:label "then_branch" ;
    rdfs:comment "Branch to execute if condition is true" .

lnctrl:else_branch a rdf:Property ;
    rdfs:domain lnctrl:Choice ;
    rdfs:range lnctrl:KernelNode ;
    rdfs:label "else_branch" ;
    rdfs:comment "Branch to execute if condition is false" .

lnctrl:cases a rdf:Property ;
    rdfs:domain lnctrl:Choice ;
    rdfs:range rdf:List ;
    rdfs:label "cases" ;
    rdfs:comment "List of (pattern, branch) pairs for pattern matching" .

# ============================================================================
# Loop Properties
# ============================================================================

lnctrl:loop_condition a rdf:Property ;
    rdfs:domain lnctrl:Loop ;
    rdfs:range xsd:string ;
    rdfs:label "loop_condition" ;
    rdfs:comment "Condition to evaluate on each iteration" .

lnctrl:loop_body a rdf:Property ;
    rdfs:domain lnctrl:Loop ;
    rdfs:range lnctrl:KernelNode ;
    rdfs:label "loop_body" ;
    rdfs:comment "Body to execute on each iteration" .

lnctrl:max_iterations a rdf:Property ;
    rdfs:domain lnctrl:Loop ;
    rdfs:range xsd:integer ;
    rdfs:label "max_iterations" ;
    rdfs:comment "Maximum number of iterations (0 = unlimited)" .

lnctrl:loop_mode a rdf:Property ;
    rdfs:domain lnctrl:Loop ;
    rdfs:range xsd:string ;
    rdfs:label "loop_mode" ;
    rdfs:comment "Loop mode (while, until, foreach)" .

# ============================================================================
# Wait Properties
# ============================================================================

lnctrl:duration a rdf:Property ;
    rdfs:domain lnctrl:Wait ;
    rdfs:range xsd:integer ;
    rdfs:label "duration" ;
    rdfs:comment "Duration to wait in milliseconds" .

lnctrl:unit a rdf:Property ;
    rdfs:domain lnctrl:Wait ;
    rdfs:range xsd:string ;
    rdfs:label "unit" ;
    rdfs:comment "Time unit (ms, s, m, h)" .

lnctrl:until a rdf:Property ;
    rdfs:domain lnctrl:Wait ;
    rdfs:range xsd:string ;
    rdfs:label "until" ;
    rdfs:comment "Condition to wait for (alternative to duration)" .

# ============================================================================
# Scope Properties
# ============================================================================

lnctrl:resource a rdf:Property ;
    rdfs:domain lnctrl:Scope ;
    rdfs:range xsd:string ;
    rdfs:label "resource" ;
    rdfs:comment "Name of the resource being scoped" .

lnctrl:acquire a rdf:Property ;
    rdfs:domain lnctrl:Scope ;
    rdfs:range xsd:string ;
    rdfs:label "acquire" ;
    rdfs:comment "Resource acquisition expression" .

lnctrl:release a rdf:Property ;
    rdfs:domain lnctrl:Scope ;
    rdfs:range xsd:string ;
    rdfs:label "release" ;
    rdfs:comment "Resource release expression" .

lnctrl:scope_body a rdf:Property ;
    rdfs:domain lnctrl:Scope ;
    rdfs:range lnctrl:KernelNode ;
    rdfs:label "scope_body" ;
    rdfs:comment "Body to execute within the resource scope" .

# ============================================================================
# Cancel Properties
# ============================================================================

lnctrl:target a rdf:Property ;
    rdfs:domain lnctrl:Cancel ;
    rdfs:range xsd:string ;
    rdfs:label "target" ;
    rdfs:comment "ID of the node to cancel" .

lnctrl:reason a rdf:Property ;
    rdfs:domain lnctrl:Cancel ;
    rdfs:range xsd:string ;
    rdfs:label "reason" ;
    rdfs:comment "Reason for cancellation" .

lnctrl:graceful a rdf:Property ;
    rdfs:domain lnctrl:Cancel ;
    rdfs:range xsd:boolean ;
    rdfs:label "graceful" ;
    rdfs:comment "Whether to allow graceful cleanup" .

# ============================================================================
# Stop Properties
# ============================================================================

lnctrl:exit_code a rdf:Property ;
    rdfs:domain lnctrl:Stop ;
    rdfs:range xsd:integer ;
    rdfs:label "exit_code" ;
    rdfs:comment "Exit code to return (0 = success)" .

lnctrl:message a rdf:Property ;
    rdfs:domain lnctrl:Stop ;
    rdfs:range xsd:string ;
    rdfs:label "message" ;
    rdfs:comment "Termination message" .

# ============================================================================
# Reduction Rules Properties
# ============================================================================

lnctrl:reduction_rule a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:string ;
    rdfs:label "reduction_rule" ;
    rdfs:comment "Name of the reduction rule that created this node" .

lnctrl:canonical_form a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:boolean ;
    rdfs:label "canonical_form" ;
    rdfs:comment "Whether this node is in canonical form" .

lnctrl:reducible a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:boolean ;
    rdfs:label "reducible" ;
    rdfs:comment "Whether this node can be further reduced" .

# ============================================================================
# Tree Structure Properties
# ============================================================================

lnctrl:parent a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:string ;
    rdfs:label "parent" ;
    rdfs:comment "ID of the parent node (null for root)" .

lnctrl:depth a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:integer ;
    rdfs:label "depth" ;
    rdfs:comment "Depth in the tree (0 for root)" .

lnctrl:position a rdf:Property ;
    rdfs:domain lnctrl:KernelNode ;
    rdfs:range xsd:integer ;
    rdfs:label "position" ;
    rdfs:comment "Position among siblings (0-indexed)" .