forked from cleveragents/cleveragents-core
89eaee008d
Implement Layer 3 technology-specific UKO vocabulary extensions for Python, TypeScript, Rust, and Java with language-specific classes, properties, and DetailLevelMap insertions. - 4 OWL/Turtle ontology files with language-specific semantic classes - DetailLevelMap insertion logic with correct integer reassignment - Provenance contract (5 required fields per spec) - Full 4-layer chain resolution (Layer 3 -> Layer 2 -> Layer 1 -> Layer 0) - Comprehensive Behave test suite (63 scenarios) ISSUES CLOSED: #576
89 lines
3.9 KiB
Turtle
89 lines
3.9 KiB
Turtle
@prefix uko: <https://cleveragents.ai/ontology/uko#> .
|
|
@prefix uko-code: <https://cleveragents.ai/ontology/uko/code#> .
|
|
@prefix uko-oo: <https://cleveragents.ai/ontology/uko/oo#> .
|
|
@prefix uko-ts: <https://cleveragents.ai/ontology/uko/ts#> .
|
|
@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#> .
|
|
|
|
<https://cleveragents.ai/ontology/uko/ts#> a owl:Ontology ;
|
|
rdfs:label "UKO TypeScript Vocabulary" ;
|
|
rdfs:comment "Layer 3 technology vocabulary for TypeScript." .
|
|
|
|
# ===========================================================================
|
|
# UKO Layer 3: TypeScript-specific vocabulary (uko-ts:)
|
|
#
|
|
# Extends uko-oo: (Layer 2 OO paradigm) with TypeScript-specific classes
|
|
# and properties. Extends at SIGNATURES level with export/default
|
|
# export markers, declare ambient types, generic type parameters,
|
|
# mapped/conditional types.
|
|
#
|
|
# Based on docs/specification.md ~lines 44405-44420.
|
|
# ===========================================================================
|
|
|
|
# NOTE: Properties with multiple rdfs:domain values use OWL intersection
|
|
# semantics (AND). This is intentional — the domain tuple serves as an
|
|
# informational hint for tooling, not a formal OWL restriction.
|
|
# See PR #660 review finding #18.
|
|
|
|
# -- Classes --
|
|
|
|
uko-ts:TypeScriptModule a owl:Class ;
|
|
rdfs:subClassOf uko-code:Module ;
|
|
rdfs:label "TypeScriptModule" ;
|
|
rdfs:comment "A TypeScript module (.ts/.tsx file) — extends uko-code:Module." .
|
|
|
|
uko-ts:TypeScriptClass a owl:Class ;
|
|
rdfs:subClassOf uko-oo:Class ;
|
|
rdfs:label "TypeScriptClass" ;
|
|
rdfs:comment "A TypeScript class definition — extends uko-oo:Class." .
|
|
|
|
uko-ts:TypeScriptInterface a owl:Class ;
|
|
rdfs:subClassOf uko-oo:Interface ;
|
|
rdfs:label "TypeScriptInterface" ;
|
|
rdfs:comment "A TypeScript interface — extends uko-oo:Interface. Includes generic type parameters, mapped and conditional types." .
|
|
|
|
uko-ts:TypeScriptFunction a owl:Class ;
|
|
rdfs:subClassOf uko-oo:Method ;
|
|
rdfs:label "TypeScriptFunction" ;
|
|
rdfs:comment "A TypeScript function or method — extends uko-oo:Method. Includes export markers and generic type parameters." .
|
|
|
|
# -- Properties --
|
|
|
|
uko-ts:exportKind a owl:DatatypeProperty ;
|
|
rdfs:domain uko-ts:TypeScriptClass , uko-ts:TypeScriptInterface , uko-ts:TypeScriptFunction , uko-ts:TypeScriptModule ;
|
|
rdfs:range xsd:string ;
|
|
rdfs:label "exportKind" ;
|
|
rdfs:comment "Export marker: 'named', 'default', 'none'. Indicates how this symbol is exported from its module." .
|
|
|
|
uko-ts:isAmbient a owl:DatatypeProperty ;
|
|
rdfs:domain uko-ts:TypeScriptClass , uko-ts:TypeScriptInterface , uko-ts:TypeScriptFunction ;
|
|
rdfs:range xsd:boolean ;
|
|
rdfs:label "isAmbient" ;
|
|
rdfs:comment "Whether this is a 'declare' ambient type definition (e.g. in a .d.ts file)." .
|
|
|
|
uko-ts:genericParameters a owl:DatatypeProperty ;
|
|
rdfs:domain uko-ts:TypeScriptClass , uko-ts:TypeScriptInterface , uko-ts:TypeScriptFunction ;
|
|
rdfs:range xsd:string ;
|
|
rdfs:label "genericParameters" ;
|
|
rdfs:comment "Generic type parameter string (e.g. '<T extends Foo, U = Bar>')." .
|
|
|
|
uko-ts:isMappedType a owl:DatatypeProperty ;
|
|
rdfs:domain uko-ts:TypeScriptInterface ;
|
|
rdfs:range xsd:boolean ;
|
|
rdfs:label "isMappedType" ;
|
|
rdfs:comment "Whether this interface defines a mapped type." .
|
|
|
|
uko-ts:isConditionalType a owl:DatatypeProperty ;
|
|
rdfs:domain uko-ts:TypeScriptInterface ;
|
|
rdfs:range xsd:boolean ;
|
|
rdfs:label "isConditionalType" ;
|
|
rdfs:comment "Whether this interface/type alias uses conditional types." .
|
|
|
|
uko-ts:implementsInterface a owl:ObjectProperty ;
|
|
rdfs:label "implementsInterface" ;
|
|
rdfs:comment "Links a TypeScript class to the interface(s) it implements." ;
|
|
rdfs:domain uko-ts:TypeScriptClass ;
|
|
rdfs:range uko-ts:TypeScriptInterface .
|