# 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 skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sao:ProgrammingLanguage a rdfs:Class ;
    rdfs:label "ProgrammingLanguage" ;
    rdfs:comment "A programming language with its paradigms, type system, and runtime characteristics" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf sao:NamedEntity ;
    skos:note "Enables structured cross-language analysis. Query \"show me all Rust modules\" without resorting to string matching on format or language fields." .

sao:has_default_error_model a rdf:Property ;
    rdfs:label "has_default_error_model" ;
    rdfs:comment "The default error handling model for this language.",
        "[ProgrammingLanguage] The default error handling model for this language." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ErrorModel .

sao:has_default_memory_model a rdf:Property ;
    rdfs:label "has_default_memory_model" ;
    rdfs:comment "The default memory management model for this language.",
        "[ProgrammingLanguage] The default memory management model for this language." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:MemoryModel .

sao:has_gc a rdf:Property ;
    rdfs:label "has_gc" ;
    rdfs:comment "Whether the language has garbage collection.",
        "[ProgrammingLanguage] Whether the language has garbage collection." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:boolean .

sao:has_preprocessor a rdf:Property ;
    rdfs:label "has_preprocessor" ;
    rdfs:comment "Whether the language has a preprocessor.",
        "[ProgrammingLanguage] Whether the language has a preprocessor." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:boolean .

sao:language_used_by_containers a rdf:Property ;
    rdfs:label "language_used_by_containers" ;
    rdfs:comment "Code containers written in this language.",
        "[ProgrammingLanguage] Code containers written in this language." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:CodeContainer .

sao:paradigms a rdf:Property ;
    rdfs:label "paradigms" ;
    rdfs:comment "Programming paradigms supported.",
        "[ProgrammingLanguage] Programming paradigms supported." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range sao:ProgrammingParadigm .

sao:type_discipline a rdf:Property ;
    rdfs:label "type_discipline" ;
    rdfs:comment "Type system characterization (e.g., \"static_strong\", \"dynamic_strong\")",
        "[ProgrammingLanguage] Type system characterization (e.g., \"static_strong\", \"dynamic_strong\")" ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:string .

sao:year_introduced a rdf:Property ;
    rdfs:label "year_introduced" ;
    rdfs:comment "Year the language was first released.",
        "[ProgrammingLanguage] Year the language was first released." ;
    rdfs:domain sao:ProgrammingLanguage ;
    rdfs:isDefinedBy sao: ;
    rdfs:range xsd:integer .

sao:ProgrammingParadigm a rdfs:Datatype ;
    rdfs:label "ProgrammingParadigm" ;
    rdfs:comment "Programming paradigms" ;
    rdfs:isDefinedBy sao: ;
    rdfs:subClassOf rdfs:Literal ;
    export:permissibleValue <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/concatenative>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/data_driven>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/functional>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/logic>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/multi_paradigm>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/object_oriented>,
        <https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/procedural> .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/concatenative> rdf:value "concatenative" ;
    rdfs:comment "Concatenative programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/data_driven> rdf:value "data_driven" ;
    rdfs:comment "Data-driven programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/functional> rdf:value "functional" ;
    rdfs:comment "Functional programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/logic> rdf:value "logic" ;
    rdfs:comment "Logic programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/multi_paradigm> rdf:value "multi_paradigm" ;
    rdfs:comment "Multi-paradigm programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/object_oriented> rdf:value "object_oriented" ;
    rdfs:comment "Object-oriented programming." .

<https://ontologies.corestory.ai/sao/export/values/ProgrammingParadigm/procedural> rdf:value "procedural" ;
    rdfs:comment "Procedural programming." .

