# Editable RDFS vocabulary source. Assemble distributions with scripts/build_rdf.py.
# Copyright (c) 2026 CoreStory, Inc. — Apache-2.0

@prefix export: <https://ontologies.corestory.ai/sao/export/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sao: <https://ontologies.corestory.ai/sao/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sao:ConcurrencyPattern a rdfs:Class ;
    rdfs:label "ConcurrencyPattern" ;
    rdfs:comment "A high-level concurrency pattern used in the system." ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf sao:NamedEntity .

sao:ConcurrencyPrimitive a rdfs:Class ;
    rdfs:label "ConcurrencyPrimitive" ;
    rdfs:comment "A low-level synchronization primitive used in concurrent code." ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf sao:NamedEntity .

sao:is_reentrant a rdf:Property ;
    rdfs:label "is_reentrant" ;
    rdfs:comment "Whether reentrant.",
        "[ConcurrencyPrimitive] Whether reentrant." ;
    rdfs:domain sao:ConcurrencyPrimitive ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:boolean .

sao:max_concurrency a rdf:Property ;
    rdfs:label "max_concurrency" ;
    rdfs:comment "Maximum concurrency level.",
        "[ConcurrencyPattern] Maximum concurrency level." ;
    rdfs:domain sao:ConcurrencyPattern ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:pattern_type a rdf:Property ;
    rdfs:label "pattern_type" ;
    rdfs:comment "Kind of pattern.",
        "[ConcurrencyPattern] Kind of pattern." ;
    rdfs:domain sao:ConcurrencyPattern ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ConcurrencyPatternType .

sao:pattern_used_by_component a rdf:Property ;
    rdfs:label "pattern_used_by_component" ;
    rdfs:comment "Components using this pattern.",
        "[ConcurrencyPattern] Components using this pattern." ;
    rdfs:domain sao:ConcurrencyPattern ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:Component .

sao:primitive_type a rdf:Property ;
    rdfs:label "primitive_type" ;
    rdfs:comment "Kind of primitive.",
        "[ConcurrencyPrimitive] Kind of primitive." ;
    rdfs:domain sao:ConcurrencyPrimitive ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ConcurrencyPrimitiveType .

sao:protects_data_elements a rdf:Property ;
    rdfs:label "protects_data_elements" ;
    rdfs:comment "Data elements guarded.",
        "[ConcurrencyPrimitive] Data elements guarded." ;
    rdfs:domain sao:ConcurrencyPrimitive ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:DataElement .

sao:shared_resources a rdf:Property ;
    rdfs:label "shared_resources" ;
    rdfs:comment "Shared resources.",
        "[ConcurrencyPattern] Shared resources." ;
    rdfs:domain sao:ConcurrencyPattern ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:string .

sao:timeout_ms a rdf:Property ;
    rdfs:label "timeout_ms" ;
    rdfs:comment "Lock timeout.",
        "[ConcurrencyPrimitive] Lock timeout." ;
    rdfs:domain sao:ConcurrencyPrimitive ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:ConcurrencyPatternType a rdfs:Datatype ;
    rdfs:label "ConcurrencyPatternType" ;
    rdfs:comment "Types of concurrency patterns" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf rdfs:Literal ;
    export:permissibleValue <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/actor>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/async_await>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/channel>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/csp>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/fork_join>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/future_promise>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/proactor>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/producer_consumer>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/reactor>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/thread_pool> .

sao:ConcurrencyPrimitiveType a rdfs:Datatype ;
    rdfs:label "ConcurrencyPrimitiveType" ;
    rdfs:comment "Types of concurrency primitives" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf rdfs:Literal ;
    export:permissibleValue <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/atomic>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/barrier>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/condition_variable>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/latch>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/mutex>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/read_write_lock>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/semaphore>,
        <https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/spin_lock> .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/actor> rdf:value "actor" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/async_await> rdf:value "async_await" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/channel> rdf:value "channel" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/csp> rdf:value "csp" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/fork_join> rdf:value "fork_join" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/future_promise> rdf:value "future_promise" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/proactor> rdf:value "proactor" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/producer_consumer> rdf:value "producer_consumer" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/reactor> rdf:value "reactor" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPatternType/thread_pool> rdf:value "thread_pool" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/atomic> rdf:value "atomic" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/barrier> rdf:value "barrier" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/condition_variable> rdf:value "condition_variable" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/latch> rdf:value "latch" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/mutex> rdf:value "mutex" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/read_write_lock> rdf:value "read_write_lock" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/semaphore> rdf:value "semaphore" .

<https://ontologies.corestory.ai/sao/export/values/ConcurrencyPrimitiveType/spin_lock> rdf:value "spin_lock" .

