From 3c267b8f893d8de202e5f5040da34f081bceac8c Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Tue, 16 Jun 2026 18:47:36 +0200 Subject: [PATCH 01/18] updated --- broken.log | 2 + llm-validation/README.md | 0 llm-validation/docs/milestone2_experiment.md | 30 + llm-validation/docs/validation_analysis.md | 18 + llm-validation/llm_explainer.py | 217 ++++++ llm-validation/results/comment_violation.txt | 23 + llm-validation/results/foaf_violation.txt | 24 + llm-validation/results/sample_violation.txt | 23 + llm-validation/results_output.json | 38 ++ llm-validation/test_llm.py | 10 + ontologies/tbox.ttl | 1 - ontologies/tbox_broken.ttl | 662 +++++++++++++++++++ ontologies/tbox_comment_test.ttl | 661 ++++++++++++++++++ ontologies/tbox_foaf_test.ttl | 662 +++++++++++++++++++ ontologies/tbox_test.ttl | 662 +++++++++++++++++++ test.log | 2 + test_fail.ttl | 4 + test_fail2.ttl | 4 + 18 files changed, 3042 insertions(+), 1 deletion(-) create mode 100644 broken.log create mode 100644 llm-validation/README.md create mode 100644 llm-validation/docs/milestone2_experiment.md create mode 100644 llm-validation/docs/validation_analysis.md create mode 100644 llm-validation/llm_explainer.py create mode 100644 llm-validation/results/comment_violation.txt create mode 100644 llm-validation/results/foaf_violation.txt create mode 100644 llm-validation/results/sample_violation.txt create mode 100644 llm-validation/results_output.json create mode 100644 llm-validation/test_llm.py create mode 100644 ontologies/tbox_broken.ttl create mode 100644 ontologies/tbox_comment_test.ttl create mode 100644 ontologies/tbox_foaf_test.ttl create mode 100644 ontologies/tbox_test.ttl create mode 100644 test.log create mode 100644 test_fail.ttl create mode 100644 test_fail2.ttl diff --git a/broken.log b/broken.log new file mode 100644 index 0000000..0c16da6 --- /dev/null +++ b/broken.log @@ -0,0 +1,2 @@ +Validation Report +Conforms: True diff --git a/llm-validation/README.md b/llm-validation/README.md new file mode 100644 index 0000000..e69de29 diff --git a/llm-validation/docs/milestone2_experiment.md b/llm-validation/docs/milestone2_experiment.md new file mode 100644 index 0000000..16b3bb0 --- /dev/null +++ b/llm-validation/docs/milestone2_experiment.md @@ -0,0 +1,30 @@ +# Milestone 2 Experiment: SHACL + LLM-style Explanation Layer + +## Objective +Evaluate whether SHACL validation results can be transformed into human-readable explanations. + +## Setup +- FSL ontology (tbox.ttl) +- pySHACL validation engine +- Custom SHACL shapes for: + - documentation completeness (rdfs:comment) + - external reference completeness (foaf links) + +## Experiments + +### Experiment 1: Missing rdfs:comment +- Removed rdfs:comment from :Entity (owl:Class) +- Result: SHACL violation detected successfully + +### Experiment 2: Missing FOAF link +- Removed foaf:page from :Entity (owl:Class) +- Result: SHACL violation detected successfully + +## Result +Both violations were successfully detected and transformed into structured explanations. + +## Observation +SHACL outputs are machine-readable but not human-friendly. A transformation layer is required. + +## Conclusion +A rule-based interpretation layer can bridge SHACL validation outputs and human-readable explanations. diff --git a/llm-validation/docs/validation_analysis.md b/llm-validation/docs/validation_analysis.md new file mode 100644 index 0000000..2bbf3e2 --- /dev/null +++ b/llm-validation/docs/validation_analysis.md @@ -0,0 +1,18 @@ +# Validation Coverage Analysis + +## ClassDeclarationsMustHaveCommentShape + +Purpose: +Ensures ontology classes contain an rdfs:comment annotation. + +Target: +Resources explicitly declared as owl:Class or rdfs:Class. + +Experiment: +Removed the rdfs:comment annotation from :Entity. + +Result: +SHACL validation failed as expected. + +Observation: +The shape does not apply to entities typed as :ConceptualEntity. diff --git a/llm-validation/llm_explainer.py b/llm-validation/llm_explainer.py new file mode 100644 index 0000000..8b0a331 --- /dev/null +++ b/llm-validation/llm_explainer.py @@ -0,0 +1,217 @@ +import re +import json +import ollama + +# ----------------------------------- +# Extract JSON from LLM output +# ----------------------------------- + +def safe_parse_llm_output(raw): + try: + return json.loads(raw) + + except: + match = re.search(r"\{.*\}", raw, re.DOTALL) + + if match: + try: + return json.loads(match.group(0)) + except: + return { + "error": "invalid_json", + "raw": raw + } + + return { + "error": "no_json_found", + "raw": raw + } + + +# ----------------------------------- +# Files containing SHACL violations +# ----------------------------------- + +files = [ + "results/comment_violation.txt", + "results/foaf_violation.txt" +] + +# ----------------------------------- +# Parse SHACL report +# ----------------------------------- + +def parse(report): + + focus = re.search(r"Focus Node:\s*(.*)", report) + + message = re.search( + r'sh:message Literal\("(.*?)"\)', + report, + re.DOTALL + ) + + shape = re.search( + r"Source Shape:\s*(.*)", + report + ) + + return { + "focus_node": focus.group(1) if focus else None, + "message": message.group(1) if message else None, + "shape": shape.group(1) if shape else None + } + + +# ----------------------------------- +# Ask LLM +# ----------------------------------- + +def explain_with_llm(v): + + prompt = f""" +You are an ontology validation assistant. + +You MUST return ONLY valid JSON. + +Focus Node: {v['focus_node']} +Shape: {v['shape']} +Message: {v['message']} + +Return ONLY valid JSON. + +Rules: +- Do NOT include markdown +- Do NOT include explanations outside JSON +- fix_rdf must contain Turtle RDF +- Do NOT return JSON inside fix_rdf + +Format: + +{{ + "focus_node": "...", + "shape": "...", + "issue": "...", + "why_it_matters": "...", + "fix_rdf": "..." +}} +""" + + response = ollama.chat( + model="llama3.1", + messages=[ + { + "role": "system", + "content": "Return only valid JSON." + }, + { + "role": "user", + "content": prompt + } + ] + ) + + return response["message"]["content"] + + +# ----------------------------------- +# Quality checks +# ----------------------------------- + +def evaluate_output(parsed): + + warnings = [] + + fix = parsed.get("fix_rdf", "") + if fix.startswith("'") or fix.endswith("'"): + warnings.append( + "Fix RDF wrapped in quotes" + ) + + if "rdf:type ve:Class" in fix: + warnings.append( + "Fix recreates class instead of modifying existing class" + ) + + if fix.startswith("http://"): + warnings.append( + "Subject URI missing angle brackets" + ) + + if "<:" in fix: + warnings.append( + "Invalid Turtle syntax detected (<:Entity)" + ) + + if "example.org" in fix: + warnings.append( + "Placeholder URI detected" + ) + + if parsed.get("why_it_matters", "") == "": + warnings.append( + "Empty explanation" + ) + + if fix == "": + warnings.append( + "Missing RDF fix" + ) + + return warnings + + +# ----------------------------------- +# Main execution +# ----------------------------------- + +results = [] + +for file in files: + + print("\n==============================") + + report = open(file).read() + + v = parse(report) + + print("\nParsed:") + print(v) + + raw = explain_with_llm(v) + + parsed = safe_parse_llm_output(raw) + + warnings = evaluate_output(parsed) + + print("\nLLM Output:\n") + print(json.dumps(parsed, indent=2)) + + if warnings: + + print("\nWarnings:") + + for w in warnings: + print("-", w) + + else: + print("\nNo warnings detected.") + + results.append({ + "file": file, + "parsed_violation": v, + "llm_output": parsed, + "warnings": warnings + }) + + +# ----------------------------------- +# Save results +# ----------------------------------- + +with open("results_output.json", "w") as f: + json.dump(results, f, indent=2) + +print("\n====================================") +print("Results saved to results_output.json") +print("====================================") diff --git a/llm-validation/results/comment_violation.txt b/llm-validation/results/comment_violation.txt new file mode 100644 index 0000000..85361f9 --- /dev/null +++ b/llm-validation/results/comment_violation.txt @@ -0,0 +1,23 @@ +Validation Report +Conforms: False +Results (1): +Constraint Violation in SPARQLConstraintComponent (http://www.w3.org/ns/shacl#SPARQLConstraintComponent): + Severity: sh:Violation + Source Shape: ve:ClassDeclarationsMustHaveCommentShape + Focus Node: :Entity + Value Node: :Entity + Source Constraint: [ rdf:type sh:SPARQLConstraint ; sh:message Literal("Class declaration is missing an rdfs:comment.") ; sh:select Literal(" + SELECT $this + WHERE { + $this rdf:type ?t . + FILTER(STRSTARTS(STR($this), "http://www.softlang.org/ontologies/")) + FILTER ( + ?t IN ( + owl:Class, + rdfs:Class + ) + ) + FILTER NOT EXISTS { $this rdfs:comment ?c . } + } + ") ] + Message: Class declaration is missing an rdfs:comment. diff --git a/llm-validation/results/foaf_violation.txt b/llm-validation/results/foaf_violation.txt new file mode 100644 index 0000000..344c69d --- /dev/null +++ b/llm-validation/results/foaf_violation.txt @@ -0,0 +1,24 @@ +Validation Report +Conforms: False +Results (1): +Constraint Violation in SPARQLConstraintComponent (http://www.w3.org/ns/shacl#SPARQLConstraintComponent): + Severity: sh:Violation + Source Shape: ve:ClassDeclarationsMustHaveFoafLinkShape + Focus Node: :Entity + Value Node: :Entity + Source Constraint: [ rdf:type sh:SPARQLConstraint ; sh:message Literal("Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.") ; sh:select Literal(" + SELECT $this + WHERE { + $this rdf:type ?t . + FILTER(STRSTARTS(STR($this), "http://www.softlang.org/ontologies/")) + FILTER ( + ?t IN ( + owl:Class, + rdfs:Class + ) + ) + FILTER NOT EXISTS { $this foaf:page ?page . } + FILTER NOT EXISTS { $this foaf:isPrimaryTopicOf ?topic . } + } + ") ] + Message: Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf. diff --git a/llm-validation/results/sample_violation.txt b/llm-validation/results/sample_violation.txt new file mode 100644 index 0000000..85361f9 --- /dev/null +++ b/llm-validation/results/sample_violation.txt @@ -0,0 +1,23 @@ +Validation Report +Conforms: False +Results (1): +Constraint Violation in SPARQLConstraintComponent (http://www.w3.org/ns/shacl#SPARQLConstraintComponent): + Severity: sh:Violation + Source Shape: ve:ClassDeclarationsMustHaveCommentShape + Focus Node: :Entity + Value Node: :Entity + Source Constraint: [ rdf:type sh:SPARQLConstraint ; sh:message Literal("Class declaration is missing an rdfs:comment.") ; sh:select Literal(" + SELECT $this + WHERE { + $this rdf:type ?t . + FILTER(STRSTARTS(STR($this), "http://www.softlang.org/ontologies/")) + FILTER ( + ?t IN ( + owl:Class, + rdfs:Class + ) + ) + FILTER NOT EXISTS { $this rdfs:comment ?c . } + } + ") ] + Message: Class declaration is missing an rdfs:comment. diff --git a/llm-validation/results_output.json b/llm-validation/results_output.json new file mode 100644 index 0000000..b5781d0 --- /dev/null +++ b/llm-validation/results_output.json @@ -0,0 +1,38 @@ +[ + { + "file": "results/comment_violation.txt", + "parsed_violation": { + "focus_node": ":Entity", + "message": "Class declaration is missing an rdfs:comment.", + "shape": "ve:ClassDeclarationsMustHaveCommentShape" + }, + "llm_output": { + "focus_node": ":Entity", + "shape": "ve:ClassDeclarationsMustHaveCommentShape", + "issue": "Class declaration is missing an rdfs:comment.", + "why_it_matters": "", + "fix_rdf": "http://example.org/Entity a owl:Class ; rdfs:comment \"This class represents entities in general\" ." + }, + "warnings": [ + "Subject URI missing angle brackets", + "Placeholder URI detected", + "Empty explanation" + ] + }, + { + "file": "results/foaf_violation.txt", + "parsed_violation": { + "focus_node": ":Entity", + "message": "Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.", + "shape": "ve:ClassDeclarationsMustHaveFoafLinkShape" + }, + "llm_output": { + "error": "no_json_found", + "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveFoafLinkShape\",\n \"issue\": \"Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n @prefix foaf: .\n :Entity a owl:Class ;\n foaf:page ;\n foaf:isPrimaryTopicOf .\n \"\"\"" + }, + "warnings": [ + "Empty explanation", + "Missing RDF fix" + ] + } +] \ No newline at end of file diff --git a/llm-validation/test_llm.py b/llm-validation/test_llm.py new file mode 100644 index 0000000..72ee2a3 --- /dev/null +++ b/llm-validation/test_llm.py @@ -0,0 +1,10 @@ +import ollama + +resp = ollama.chat( + model="llama3.1", + messages=[ + {"role": "user", "content": "Explain SHACL in 1 sentence"} + ] +) + +print(resp["message"]["content"]) diff --git a/ontologies/tbox.ttl b/ontologies/tbox.ttl index 2d12781..508f714 100644 --- a/ontologies/tbox.ttl +++ b/ontologies/tbox.ttl @@ -29,7 +29,6 @@ :EngineeringActivity a :ConceptualEntity ; rdfs:label "Engineering activity"@en ; - rdfs:comment "Root class for software engineering activity types."@en ; rdfs:subClassOf :ConceptualEntity ; foaf:page . diff --git a/ontologies/tbox_broken.ttl b/ontologies/tbox_broken.ttl new file mode 100644 index 0000000..6c4d10e --- /dev/null +++ b/ontologies/tbox_broken.ttl @@ -0,0 +1,662 @@ +@prefix : . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + + a owl:Ontology ; + :commentingPolicy "All rdfs:comments must start in upper case."@en ; + :formattingPolicy "TTL syntax is to be used so that triples are grouped by shared subject. Default namespace (\":\") instead of explicit prefixes should be used, whenever possible. The required order in ontology files is: prefix declarations first, followed by the ontology header, then classes ordered by class name, then properties ordered by property name, and finally all remaining assertions ordered by subject name. Any serialization of the ontology should obey this formatting policy."@en ; + :linkingPolicy "All important classes and individuals should link to Wikipedia. Use foaf:isPrimaryTopicOf where possible. Use foaf:page otherwise. Link to https://en.wikipedia.org/wiki/N/A to express that no useful page could be determined."@en ; + :metamodelingPolicy "Punning/metamodeling is used systematically. Every class that is a subclass of an Entity subclass should also be explicitly typed as that Entity subclass. Every individual whose asserted type derives from an Entity subclass should also be explicitly typed as that Entity subclass. Example: le:QueryLanguage a tbox:LanguageEntity . Example: le:SQL a tbox:LanguageEntity . This expectation should be maintained as the ontology evolves."@en ; + rdfs:comment "Shared TBox of the FSL ontology"@en . + +:ArtifactEntity rdfs:subClassOf :Entity ; + rdfs:label "Artifact entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software artifacts, artifact families, and artifact-related instances"@en . + +:Assertion rdfs:subClassOf :ConceptualEntity ; + rdfs:label "Assertion"@en ; + foaf:isPrimaryTopicOf . + +:ConceptualEntity rdfs:subClassOf :Entity ; + rdfs:label "Conceptual entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Contextual concepts for other entity types (foundations, languages, tools, and artifacts)"@en . + +:EngineeringActivity a :ConceptualEntity ; + rdfs:label "Engineering activity"@en ; + rdfs:comment "Root class for software engineering activity types."@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:SubjectArea a :ConceptualEntity ; + rdfs:label "Subject area"@en ; + rdfs:comment "research or application area relevant to the foundations of software languages and related disciplines"@en ; + rdfs:subClassOf :ConceptualEntity . + +:TechnologicalSpace a :ConceptualEntity ; + rdfs:label "Technological space"@en ; + rdfs:comment "Technological spaces are families of related software-language technologies that share characteristic artifact kinds, metalanguages, tools, conformance relations, skills, and communities of practice. A technological space is not just a single language or formalism, but a working context in which artifacts are defined, manipulated, queried, transformed, validated, exchanged, and executed according to characteristic principles. This class represents such ecosystems."@en ; + :hasBibTeX "KurtevBezivinAksit2002TechnologicalSpaces" ; + rdfs:subClassOf :ConceptualEntity . + + +:Entity a owl:Class ; + rdfs:label "Entity"@en ; + rdfs:comment "Top-level category for entities represented in this ontology. Entities should be linked to at least one descriptive document via foaf:isPrimaryTopicOf or foaf:page."@en ; + foaf:page ; + rdfs:subClassOf [ a owl:Class ; + owl:unionOf ( [ a owl:Restriction ; + owl:onProperty foaf:isPrimaryTopicOf ; + owl:someValuesFrom foaf:Document ] [ a owl:Restriction ; + owl:onProperty foaf:page ; + owl:someValuesFrom foaf:Document ] ) ] . + +:FormalEntity rdfs:subClassOf :Entity ; + rdfs:label "Formal entity"@en ; + rdfs:comment "Ontological entity used to represent formal formalisms, theories, models of computation, and methodological approaches"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ] . + +:MethodologicalApproach a :FormalEntity ; + rdfs:label "Methodological approach"@en ; + rdfs:comment "class of formal entities that represent methodological orientations, techniques, or styles of treatment used in the study or engineering of software languages and related formalisms"@en ; + rdfs:subClassOf :FormalEntity . + +:PropertyEntity rdfs:subClassOf :Entity ; + rdfs:label "Property entity"@en ; + rdfs:comment "Ontological entity used to represent property declarations that participate in relations like other modeled entities"@en . + + +:IssueEntity rdfs:subClassOf :Entity ; + rdfs:label "Issue entity"@en ; + rdfs:comment "Entity for representing review issues, critiques, and proposed resolutions concerning resources, predicates, or fully specified assertions in the ontology"@en ; + foaf:page . + +:LanguageEntity rdfs:subClassOf :Entity ; + rdfs:label "Language entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software languages, language families, and language-related instances"@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ] . + + +:SoftwareArtifact a :ArtifactEntity ; + rdfs:label "Software artifact"@en ; + rdfs:comment "Software artifact kind used to classify the characteristic artifacts of a technological space"@en ; + rdfs:subClassOf :ArtifactEntity . + +:SoftwareLanguage a :LanguageEntity ; + rdfs:label "Software language"@en ; + rdfs:comment "Concrete software languages (e.g., XML, SQL, OWL) are represented as individuals of this class. Language families are represented as subclasses. Artifact kinds capture the kinds of artifacts written in such languages."@en ; + rdfs:subClassOf :LanguageEntity ; + foaf:page . + +:SoftwareTool a :ToolEntity ; + rdfs:label "Software tool"@en ; + foaf:page ; + rdfs:subClassOf :ToolEntity . + +:ToolEntity rdfs:label "Tool entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software tools, tool families, and tool-related instances"@en ; + rdfs:subClassOf :Entity . + +:classifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "classifies"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of metamodels classifying models"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :conformsTo . + +:commentingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Commenting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding commenting"@en ; + foaf:page . + +:conformsTo a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "conforms to"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of models conforming to metamodels"@en ; + foaf:page ; + :hasBibTeX "AtkinsonKuehne2003MetamodelingFoundation", + "AtkinsonGerbig2016OntologicalClassification", + "DegueuleEtAl2017SafeModelPolymorphism", + "RossiniDeLaraGuerraEtAl2014DeepMetamodelling", + "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :classifies . + +:critique a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "critique"@en ; + rdfs:comment "Describes the problem, concern, or critique expressed by an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:defines a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "defines"@en ; + rdfs:comment "Relates an artifact to a language in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isDefinedBy . + +:elementOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "element of"@en ; + rdfs:comment "Relates an artifact to a language in the set-theoretic sense"@en ; + foaf:page ; + :hasBibTeX "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :hasElement . + +:extends a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "extends"@en ; + rdfs:comment "Relates a software language to another software language that it extends or generalizes"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :isExtendedBy . + +:formattingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Formatting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding formatting"@en ; + foaf:page . + +:linkingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Linking policy"@en ; + rdfs:comment "Documents ontology-wide expectations for linking classes and individuals to descriptive web pages"@en ; + foaf:page . + +:hasAffectedArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has affected artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically affects (thereby complementing in- and output)"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + +:hasArea a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has area"@en ; + rdfs:comment "Relates an entity to an important subject area of interest"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :SubjectArea ; + owl:inverseOf :isAreaOf . + +:hasArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has artifact"@en ; + rdfs:comment "Relates a technological space to a kind of artifact that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isArtifactOf . + +:hasBibTeX a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "has BibTeX"@en ; + rdfs:comment "Relates an entity to the BibTeX key of a bibliographic entry that documents, discusses, or supports it"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range xsd:string . + + + + + +:hasElement a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has element"@en ; + rdfs:comment "Relates a language to an artifact in the set-theoretic sense"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :elementOf . + + + +:hasInputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has input artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically requires or consumes as input"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + + +:hasOutputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has output artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically produces as output"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + +:hasPart a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "has part"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that is a structural part or constituent of it"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :uses ; + owl:inverseOf :isPartOf . + + + + + +:hasSpace a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has space"@en ; + rdfs:comment "Relates an entity to a technological space to which it characteristically belongs"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :isSpaceOf . + +:hasSupportingLanguage a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting language"@en ; + rdfs:comment "Relates a software engineering activity to a language kind that is characteristically used to perform or express the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :LanguageEntity . + +:hasSupportingTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting tool"@en ; + rdfs:comment "Relates a software engineering activity to a tool kind that characteristically supports carrying out the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :ToolEntity . + + +:hasTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has tool"@en ; + rdfs:comment "Relates a technological space to a kind of tool that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ToolEntity ; + owl:inverseOf :isToolOf . + + + +:isAreaOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is area of"@en ; + rdfs:comment "Relates a subject area to an entity for which it is an important area of interest"@en ; + foaf:page ; + rdfs:domain :SubjectArea ; + rdfs:range :Entity ; + owl:inverseOf :hasArea . + +:isArtifactOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is artifact of"@en ; + rdfs:comment "Relates an artifact to its technological space"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasArtifact . + +:isDefinedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is defined by"@en ; + rdfs:comment "Relates a language to an artifact in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :defines . + +:isExtendedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is extended by"@en ; + rdfs:comment "Relates a software language to another software language that extends or generalizes it"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :extends . + +:isPartOf a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "is part of"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity of which it is a structural part or constituent"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :isUsedBy ; + owl:inverseOf :hasPart . + +:isProcessedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is processed by"@en ; + rdfs:comment "Relates an artifact entity to a tool entity that characteristically processes it"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :processes . + + +:isServedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is served by"@en ; + rdfs:comment "Relates a methodological approach to an entity that serves, realizes, supports, or instantiates it in an important way"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :Entity ; + owl:inverseOf :serves . + +:isSpaceOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is space of"@en ; + rdfs:comment "Relates a technological space to an entity that characteristically belongs to it"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :Entity ; + owl:inverseOf :hasSpace . + +:isSpecifiedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is specified by"@en ; + rdfs:comment "Relates an entity to a methodological approach used to formally specify or define its behavior or meaning"@en ; + foaf:page ; + rdfs:domain :FormalEntity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :specifies . + +:isTargetedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is targeted by"@en ; + rdfs:comment "Relates a language entity to a tool entity that targets it"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :targets . + +:isToolOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is tool of"@en ; + rdfs:comment "Relates a tool to its technological space"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasTool . + +:isUsedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is used by"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that uses it conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :uses . + +:metamodelingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Metamodeling policy"@en ; + rdfs:comment "Documents ontology-wide expectations for explicit punning-based typing of classes and individuals"@en ; + foaf:page . + +:processes a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "processes"@en ; + rdfs:comment "Relates a tool entity to an artifact entity that it characteristically processes"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isProcessedBy . + +:serves a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "serves"@en ; + rdfs:comment "Relates an entity to a methodological approach that it serves, realizes, supports, or instantiates in an important way"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :isServedBy . + +:specifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "specifies"@en ; + rdfs:comment "Relates a methodological approach to an entity whose behavior or meaning it is used to formally specify or define"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :FormalEntity ; + owl:inverseOf :isSpecifiedBy . + +:suggestion a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "suggestion"@en ; + rdfs:comment "Records a suggested resolution or improvement for an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:targets a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "targets"@en ; + rdfs:comment "Relates a tool entity to a language entity that it targets"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isTargetedBy . + +:uses a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "uses"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that it uses conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :isUsedBy . + +:object a rdf:Property ; + rdfs:label "object"@en ; + rdfs:comment "Identifies the object constituent of an issue when the issue concerns a particular assertion; this property designates object role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:object . + +:predicate a rdf:Property ; + rdfs:label "predicate"@en ; + rdfs:comment "Identifies the predicate constituent of an issue when the issue concerns a particular assertion; this property designates predicate role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:predicate . + +:subject a rdf:Property ; + rdfs:label "subject"@en ; + rdfs:comment "Identifies the subject constituent of an issue when the issue concerns a particular assertion; this property designates subject role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:subject . + +:target a rdf:Property ; + rdfs:label "target"@en ; + rdfs:comment "Identifies the primary resource that an issue is about, such as a reviewed resource or an ontology/module addressed as a whole; assertion-level issues are instead designated through subject, predicate, and object"@en ; + foaf:page ; + rdfs:domain :IssueEntity . + +:resolveAfter a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "resolve after"@en ; + rdfs:comment "States that an issue needs to be resolved after another issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range :IssueEntity. + +# Language-concept schema moved from ce. + +:LanguageConcept a :ConceptualEntity ; + rdfs:label "Language concept"@en ; + rdfs:comment "concept associated with a language framework such as programming-language concepts"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:CompositeConcept a :ConceptualEntity ; + rdfs:label "Composite concept"@en ; + rdfs:comment "a language concept as a composite of other language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:LanguageSupportKind a :ConceptualEntity ; + rdfs:label "Language support kind"@en ; + rdfs:comment "kind of support that a language provides for a language concept"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:LanguageSupportAssertion a :ConceptualEntity ; + rdfs:label "Language support assertion"@en ; + rdfs:comment "reified assertion that a language supports a language concept, optionally qualified"@en ; + rdfs:subClassOf :Assertion ; + foaf:page . + +:LanguageConceptApplicability a :ConceptualEntity ; + rdfs:label "Language concept applicability"@en ; + rdfs:comment "qualifier for how directly a language concept applies to a language"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:ImplementationMechanismConcept a :ConceptualEntity ; + rdfs:label "Implementation mechanism concept"@en ; + rdfs:comment "a more realization/implementation-oriented category of language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:supports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language to a concept that it supports"@en ; + foaf:page . + +:nativelySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Natively supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports natively"@en ; + foaf:page . + +:standardlySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Standardly supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports standardly"@en ; + foaf:page . + +:assertedForConcept a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for concept"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the concept"@en ; + foaf:page . + +:assertedForLanguage a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for language"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageEntity ; + rdfs:comment "Relates a reified assertion about language concepts with the language"@en ; + foaf:page . + +:hasDominantForm a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has dominant form"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language concept to a dominated form"@en ; + foaf:page . + +:hasPrimaryMechanism a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary mechanism"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :ImplementationMechanismConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the primary mechanism for realization"@en ; + foaf:page . + +:hasApplicability a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has applicability"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConceptApplicability ; + rdfs:comment "Relates a reified assertion about language concepts with the applicability"@en ; + foaf:page . + +:hasComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a composite language concept to a component"@en ; + foaf:page . + +:hasPrimaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (primary) component"@en ; + foaf:page . + +:hasSecondaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has secondary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (secondary) component"@en ; + foaf:page . + +:hasSupportKind a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has support kind"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageSupportKind ; + rdfs:comment "Relates a reified assertion about language concepts with the type of support"@en ; + foaf:page . diff --git a/ontologies/tbox_comment_test.ttl b/ontologies/tbox_comment_test.ttl new file mode 100644 index 0000000..f4d9263 --- /dev/null +++ b/ontologies/tbox_comment_test.ttl @@ -0,0 +1,661 @@ +@prefix : . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + + a owl:Ontology ; + :commentingPolicy "All rdfs:comments must start in upper case."@en ; + :formattingPolicy "TTL syntax is to be used so that triples are grouped by shared subject. Default namespace (\":\") instead of explicit prefixes should be used, whenever possible. The required order in ontology files is: prefix declarations first, followed by the ontology header, then classes ordered by class name, then properties ordered by property name, and finally all remaining assertions ordered by subject name. Any serialization of the ontology should obey this formatting policy."@en ; + :linkingPolicy "All important classes and individuals should link to Wikipedia. Use foaf:isPrimaryTopicOf where possible. Use foaf:page otherwise. Link to https://en.wikipedia.org/wiki/N/A to express that no useful page could be determined."@en ; + :metamodelingPolicy "Punning/metamodeling is used systematically. Every class that is a subclass of an Entity subclass should also be explicitly typed as that Entity subclass. Every individual whose asserted type derives from an Entity subclass should also be explicitly typed as that Entity subclass. Example: le:QueryLanguage a tbox:LanguageEntity . Example: le:SQL a tbox:LanguageEntity . This expectation should be maintained as the ontology evolves."@en ; + rdfs:comment "Shared TBox of the FSL ontology"@en . + +:ArtifactEntity rdfs:subClassOf :Entity ; + rdfs:label "Artifact entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software artifacts, artifact families, and artifact-related instances"@en . + +:Assertion rdfs:subClassOf :ConceptualEntity ; + rdfs:label "Assertion"@en ; + rdfs:comment "Reified assertion entity used for qualified statements in language-related modules"@en ; + foaf:isPrimaryTopicOf . + +:ConceptualEntity rdfs:subClassOf :Entity ; + rdfs:label "Conceptual entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Contextual concepts for other entity types (foundations, languages, tools, and artifacts)"@en . + +:EngineeringActivity a :ConceptualEntity ; + rdfs:label "Engineering activity"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:SubjectArea a :ConceptualEntity ; + rdfs:label "Subject area"@en ; + rdfs:comment "research or application area relevant to the foundations of software languages and related disciplines"@en ; + rdfs:subClassOf :ConceptualEntity . + +:TechnologicalSpace a :ConceptualEntity ; + rdfs:label "Technological space"@en ; + rdfs:comment "Technological spaces are families of related software-language technologies that share characteristic artifact kinds, metalanguages, tools, conformance relations, skills, and communities of practice. A technological space is not just a single language or formalism, but a working context in which artifacts are defined, manipulated, queried, transformed, validated, exchanged, and executed according to characteristic principles. This class represents such ecosystems."@en ; + :hasBibTeX "KurtevBezivinAksit2002TechnologicalSpaces" ; + rdfs:subClassOf :ConceptualEntity . + + +:Entity a owl:Class ; + rdfs:label "Entity"@en ; + foaf:page ; + rdfs:subClassOf [ a owl:Class ; + owl:unionOf ( [ a owl:Restriction ; + owl:onProperty foaf:isPrimaryTopicOf ; + owl:someValuesFrom foaf:Document ] [ a owl:Restriction ; + owl:onProperty foaf:page ; + owl:someValuesFrom foaf:Document ] ) ] . + +:FormalEntity rdfs:subClassOf :Entity ; + rdfs:label "Formal entity"@en ; + rdfs:comment "Ontological entity used to represent formal formalisms, theories, models of computation, and methodological approaches"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ] . + +:MethodologicalApproach a :FormalEntity ; + rdfs:label "Methodological approach"@en ; + rdfs:comment "class of formal entities that represent methodological orientations, techniques, or styles of treatment used in the study or engineering of software languages and related formalisms"@en ; + rdfs:subClassOf :FormalEntity . + +:PropertyEntity rdfs:subClassOf :Entity ; + rdfs:label "Property entity"@en ; + rdfs:comment "Ontological entity used to represent property declarations that participate in relations like other modeled entities"@en . + + +:IssueEntity rdfs:subClassOf :Entity ; + rdfs:label "Issue entity"@en ; + rdfs:comment "Entity for representing review issues, critiques, and proposed resolutions concerning resources, predicates, or fully specified assertions in the ontology"@en ; + foaf:page . + +:LanguageEntity rdfs:subClassOf :Entity ; + rdfs:label "Language entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software languages, language families, and language-related instances"@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ] . + + +:SoftwareArtifact a :ArtifactEntity ; + rdfs:label "Software artifact"@en ; + rdfs:comment "Software artifact kind used to classify the characteristic artifacts of a technological space"@en ; + rdfs:subClassOf :ArtifactEntity . + +:SoftwareLanguage a :LanguageEntity ; + rdfs:label "Software language"@en ; + rdfs:comment "Concrete software languages (e.g., XML, SQL, OWL) are represented as individuals of this class. Language families are represented as subclasses. Artifact kinds capture the kinds of artifacts written in such languages."@en ; + rdfs:subClassOf :LanguageEntity ; + foaf:page . + +:SoftwareTool a :ToolEntity ; + rdfs:label "Software tool"@en ; + foaf:page ; + rdfs:subClassOf :ToolEntity . + +:ToolEntity rdfs:label "Tool entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software tools, tool families, and tool-related instances"@en ; + rdfs:subClassOf :Entity . + +:classifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "classifies"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of metamodels classifying models"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :conformsTo . + +:commentingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Commenting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding commenting"@en ; + foaf:page . + +:conformsTo a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "conforms to"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of models conforming to metamodels"@en ; + foaf:page ; + :hasBibTeX "AtkinsonKuehne2003MetamodelingFoundation", + "AtkinsonGerbig2016OntologicalClassification", + "DegueuleEtAl2017SafeModelPolymorphism", + "RossiniDeLaraGuerraEtAl2014DeepMetamodelling", + "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :classifies . + +:critique a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "critique"@en ; + rdfs:comment "Describes the problem, concern, or critique expressed by an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:defines a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "defines"@en ; + rdfs:comment "Relates an artifact to a language in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isDefinedBy . + +:elementOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "element of"@en ; + rdfs:comment "Relates an artifact to a language in the set-theoretic sense"@en ; + foaf:page ; + :hasBibTeX "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :hasElement . + +:extends a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "extends"@en ; + rdfs:comment "Relates a software language to another software language that it extends or generalizes"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :isExtendedBy . + +:formattingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Formatting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding formatting"@en ; + foaf:page . + +:linkingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Linking policy"@en ; + rdfs:comment "Documents ontology-wide expectations for linking classes and individuals to descriptive web pages"@en ; + foaf:page . + +:hasAffectedArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has affected artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically affects (thereby complementing in- and output)"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + +:hasArea a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has area"@en ; + rdfs:comment "Relates an entity to an important subject area of interest"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :SubjectArea ; + owl:inverseOf :isAreaOf . + +:hasArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has artifact"@en ; + rdfs:comment "Relates a technological space to a kind of artifact that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isArtifactOf . + +:hasBibTeX a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "has BibTeX"@en ; + rdfs:comment "Relates an entity to the BibTeX key of a bibliographic entry that documents, discusses, or supports it"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range xsd:string . + + + + + +:hasElement a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has element"@en ; + rdfs:comment "Relates a language to an artifact in the set-theoretic sense"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :elementOf . + + + +:hasInputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has input artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically requires or consumes as input"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + + +:hasOutputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has output artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically produces as output"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + +:hasPart a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "has part"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that is a structural part or constituent of it"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :uses ; + owl:inverseOf :isPartOf . + + + + + +:hasSpace a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has space"@en ; + rdfs:comment "Relates an entity to a technological space to which it characteristically belongs"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :isSpaceOf . + +:hasSupportingLanguage a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting language"@en ; + rdfs:comment "Relates a software engineering activity to a language kind that is characteristically used to perform or express the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :LanguageEntity . + +:hasSupportingTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting tool"@en ; + rdfs:comment "Relates a software engineering activity to a tool kind that characteristically supports carrying out the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :ToolEntity . + + +:hasTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has tool"@en ; + rdfs:comment "Relates a technological space to a kind of tool that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ToolEntity ; + owl:inverseOf :isToolOf . + + + +:isAreaOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is area of"@en ; + rdfs:comment "Relates a subject area to an entity for which it is an important area of interest"@en ; + foaf:page ; + rdfs:domain :SubjectArea ; + rdfs:range :Entity ; + owl:inverseOf :hasArea . + +:isArtifactOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is artifact of"@en ; + rdfs:comment "Relates an artifact to its technological space"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasArtifact . + +:isDefinedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is defined by"@en ; + rdfs:comment "Relates a language to an artifact in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :defines . + +:isExtendedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is extended by"@en ; + rdfs:comment "Relates a software language to another software language that extends or generalizes it"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :extends . + +:isPartOf a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "is part of"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity of which it is a structural part or constituent"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :isUsedBy ; + owl:inverseOf :hasPart . + +:isProcessedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is processed by"@en ; + rdfs:comment "Relates an artifact entity to a tool entity that characteristically processes it"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :processes . + + +:isServedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is served by"@en ; + rdfs:comment "Relates a methodological approach to an entity that serves, realizes, supports, or instantiates it in an important way"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :Entity ; + owl:inverseOf :serves . + +:isSpaceOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is space of"@en ; + rdfs:comment "Relates a technological space to an entity that characteristically belongs to it"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :Entity ; + owl:inverseOf :hasSpace . + +:isSpecifiedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is specified by"@en ; + rdfs:comment "Relates an entity to a methodological approach used to formally specify or define its behavior or meaning"@en ; + foaf:page ; + rdfs:domain :FormalEntity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :specifies . + +:isTargetedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is targeted by"@en ; + rdfs:comment "Relates a language entity to a tool entity that targets it"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :targets . + +:isToolOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is tool of"@en ; + rdfs:comment "Relates a tool to its technological space"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasTool . + +:isUsedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is used by"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that uses it conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :uses . + +:metamodelingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Metamodeling policy"@en ; + rdfs:comment "Documents ontology-wide expectations for explicit punning-based typing of classes and individuals"@en ; + foaf:page . + +:processes a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "processes"@en ; + rdfs:comment "Relates a tool entity to an artifact entity that it characteristically processes"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isProcessedBy . + +:serves a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "serves"@en ; + rdfs:comment "Relates an entity to a methodological approach that it serves, realizes, supports, or instantiates in an important way"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :isServedBy . + +:specifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "specifies"@en ; + rdfs:comment "Relates a methodological approach to an entity whose behavior or meaning it is used to formally specify or define"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :FormalEntity ; + owl:inverseOf :isSpecifiedBy . + +:suggestion a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "suggestion"@en ; + rdfs:comment "Records a suggested resolution or improvement for an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:targets a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "targets"@en ; + rdfs:comment "Relates a tool entity to a language entity that it targets"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isTargetedBy . + +:uses a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "uses"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that it uses conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :isUsedBy . + +:object a rdf:Property ; + rdfs:label "object"@en ; + rdfs:comment "Identifies the object constituent of an issue when the issue concerns a particular assertion; this property designates object role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:object . + +:predicate a rdf:Property ; + rdfs:label "predicate"@en ; + rdfs:comment "Identifies the predicate constituent of an issue when the issue concerns a particular assertion; this property designates predicate role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:predicate . + +:subject a rdf:Property ; + rdfs:label "subject"@en ; + rdfs:comment "Identifies the subject constituent of an issue when the issue concerns a particular assertion; this property designates subject role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:subject . + +:target a rdf:Property ; + rdfs:label "target"@en ; + rdfs:comment "Identifies the primary resource that an issue is about, such as a reviewed resource or an ontology/module addressed as a whole; assertion-level issues are instead designated through subject, predicate, and object"@en ; + foaf:page ; + rdfs:domain :IssueEntity . + +:resolveAfter a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "resolve after"@en ; + rdfs:comment "States that an issue needs to be resolved after another issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range :IssueEntity. + +# Language-concept schema moved from ce. + +:LanguageConcept a :ConceptualEntity ; + rdfs:label "Language concept"@en ; + rdfs:comment "concept associated with a language framework such as programming-language concepts"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:CompositeConcept a :ConceptualEntity ; + rdfs:label "Composite concept"@en ; + rdfs:comment "a language concept as a composite of other language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:LanguageSupportKind a :ConceptualEntity ; + rdfs:label "Language support kind"@en ; + rdfs:comment "kind of support that a language provides for a language concept"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:LanguageSupportAssertion a :ConceptualEntity ; + rdfs:label "Language support assertion"@en ; + rdfs:comment "reified assertion that a language supports a language concept, optionally qualified"@en ; + rdfs:subClassOf :Assertion ; + foaf:page . + +:LanguageConceptApplicability a :ConceptualEntity ; + rdfs:label "Language concept applicability"@en ; + rdfs:comment "qualifier for how directly a language concept applies to a language"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:ImplementationMechanismConcept a :ConceptualEntity ; + rdfs:label "Implementation mechanism concept"@en ; + rdfs:comment "a more realization/implementation-oriented category of language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:supports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language to a concept that it supports"@en ; + foaf:page . + +:nativelySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Natively supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports natively"@en ; + foaf:page . + +:standardlySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Standardly supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports standardly"@en ; + foaf:page . + +:assertedForConcept a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for concept"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the concept"@en ; + foaf:page . + +:assertedForLanguage a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for language"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageEntity ; + rdfs:comment "Relates a reified assertion about language concepts with the language"@en ; + foaf:page . + +:hasDominantForm a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has dominant form"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language concept to a dominated form"@en ; + foaf:page . + +:hasPrimaryMechanism a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary mechanism"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :ImplementationMechanismConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the primary mechanism for realization"@en ; + foaf:page . + +:hasApplicability a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has applicability"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConceptApplicability ; + rdfs:comment "Relates a reified assertion about language concepts with the applicability"@en ; + foaf:page . + +:hasComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a composite language concept to a component"@en ; + foaf:page . + +:hasPrimaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (primary) component"@en ; + foaf:page . + +:hasSecondaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has secondary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (secondary) component"@en ; + foaf:page . + +:hasSupportKind a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has support kind"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageSupportKind ; + rdfs:comment "Relates a reified assertion about language concepts with the type of support"@en ; + foaf:page . diff --git a/ontologies/tbox_foaf_test.ttl b/ontologies/tbox_foaf_test.ttl new file mode 100644 index 0000000..6c34921 --- /dev/null +++ b/ontologies/tbox_foaf_test.ttl @@ -0,0 +1,662 @@ +@prefix : . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + + a owl:Ontology ; + :commentingPolicy "All rdfs:comments must start in upper case."@en ; + :formattingPolicy "TTL syntax is to be used so that triples are grouped by shared subject. Default namespace (\":\") instead of explicit prefixes should be used, whenever possible. The required order in ontology files is: prefix declarations first, followed by the ontology header, then classes ordered by class name, then properties ordered by property name, and finally all remaining assertions ordered by subject name. Any serialization of the ontology should obey this formatting policy."@en ; + :linkingPolicy "All important classes and individuals should link to Wikipedia. Use foaf:isPrimaryTopicOf where possible. Use foaf:page otherwise. Link to https://en.wikipedia.org/wiki/N/A to express that no useful page could be determined."@en ; + :metamodelingPolicy "Punning/metamodeling is used systematically. Every class that is a subclass of an Entity subclass should also be explicitly typed as that Entity subclass. Every individual whose asserted type derives from an Entity subclass should also be explicitly typed as that Entity subclass. Example: le:QueryLanguage a tbox:LanguageEntity . Example: le:SQL a tbox:LanguageEntity . This expectation should be maintained as the ontology evolves."@en ; + rdfs:comment "Shared TBox of the FSL ontology"@en . + +:ArtifactEntity rdfs:subClassOf :Entity ; + rdfs:label "Artifact entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software artifacts, artifact families, and artifact-related instances"@en . + +:Assertion rdfs:subClassOf :ConceptualEntity ; + rdfs:label "Assertion"@en ; + rdfs:comment "Reified assertion entity used for qualified statements in language-related modules"@en ; + foaf:isPrimaryTopicOf . + +:ConceptualEntity rdfs:subClassOf :Entity ; + rdfs:label "Conceptual entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Contextual concepts for other entity types (foundations, languages, tools, and artifacts)"@en . + +:EngineeringActivity a :ConceptualEntity ; + rdfs:label "Engineering activity"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:SubjectArea a :ConceptualEntity ; + rdfs:label "Subject area"@en ; + rdfs:comment "research or application area relevant to the foundations of software languages and related disciplines"@en ; + rdfs:subClassOf :ConceptualEntity . + +:TechnologicalSpace a :ConceptualEntity ; + rdfs:label "Technological space"@en ; + rdfs:comment "Technological spaces are families of related software-language technologies that share characteristic artifact kinds, metalanguages, tools, conformance relations, skills, and communities of practice. A technological space is not just a single language or formalism, but a working context in which artifacts are defined, manipulated, queried, transformed, validated, exchanged, and executed according to characteristic principles. This class represents such ecosystems."@en ; + :hasBibTeX "KurtevBezivinAksit2002TechnologicalSpaces" ; + rdfs:subClassOf :ConceptualEntity . + + +:Entity a owl:Class ; + rdfs:label "Entity"@en ; + rdfs:comment "Top-level category for entities represented in this ontology. Entities should be linked to at least one descriptive document via foaf:isPrimaryTopicOf or foaf:page."@en ; + + rdfs:subClassOf [ a owl:Class ; + owl:unionOf ( [ a owl:Restriction ; + owl:onProperty foaf:isPrimaryTopicOf ; + owl:someValuesFrom foaf:Document ] [ a owl:Restriction ; + owl:onProperty foaf:page ; + owl:someValuesFrom foaf:Document ] ) ] . + +:FormalEntity rdfs:subClassOf :Entity ; + rdfs:label "Formal entity"@en ; + rdfs:comment "Ontological entity used to represent formal formalisms, theories, models of computation, and methodological approaches"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ] . + +:MethodologicalApproach a :FormalEntity ; + rdfs:label "Methodological approach"@en ; + rdfs:comment "class of formal entities that represent methodological orientations, techniques, or styles of treatment used in the study or engineering of software languages and related formalisms"@en ; + rdfs:subClassOf :FormalEntity . + +:PropertyEntity rdfs:subClassOf :Entity ; + rdfs:label "Property entity"@en ; + rdfs:comment "Ontological entity used to represent property declarations that participate in relations like other modeled entities"@en . + + +:IssueEntity rdfs:subClassOf :Entity ; + rdfs:label "Issue entity"@en ; + rdfs:comment "Entity for representing review issues, critiques, and proposed resolutions concerning resources, predicates, or fully specified assertions in the ontology"@en ; + foaf:page . + +:LanguageEntity rdfs:subClassOf :Entity ; + rdfs:label "Language entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software languages, language families, and language-related instances"@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ] . + + +:SoftwareArtifact a :ArtifactEntity ; + rdfs:label "Software artifact"@en ; + rdfs:comment "Software artifact kind used to classify the characteristic artifacts of a technological space"@en ; + rdfs:subClassOf :ArtifactEntity . + +:SoftwareLanguage a :LanguageEntity ; + rdfs:label "Software language"@en ; + rdfs:comment "Concrete software languages (e.g., XML, SQL, OWL) are represented as individuals of this class. Language families are represented as subclasses. Artifact kinds capture the kinds of artifacts written in such languages."@en ; + rdfs:subClassOf :LanguageEntity ; + foaf:page . + +:SoftwareTool a :ToolEntity ; + rdfs:label "Software tool"@en ; + foaf:page ; + rdfs:subClassOf :ToolEntity . + +:ToolEntity rdfs:label "Tool entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software tools, tool families, and tool-related instances"@en ; + rdfs:subClassOf :Entity . + +:classifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "classifies"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of metamodels classifying models"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :conformsTo . + +:commentingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Commenting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding commenting"@en ; + foaf:page . + +:conformsTo a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "conforms to"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of models conforming to metamodels"@en ; + foaf:page ; + :hasBibTeX "AtkinsonKuehne2003MetamodelingFoundation", + "AtkinsonGerbig2016OntologicalClassification", + "DegueuleEtAl2017SafeModelPolymorphism", + "RossiniDeLaraGuerraEtAl2014DeepMetamodelling", + "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :classifies . + +:critique a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "critique"@en ; + rdfs:comment "Describes the problem, concern, or critique expressed by an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:defines a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "defines"@en ; + rdfs:comment "Relates an artifact to a language in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isDefinedBy . + +:elementOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "element of"@en ; + rdfs:comment "Relates an artifact to a language in the set-theoretic sense"@en ; + foaf:page ; + :hasBibTeX "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :hasElement . + +:extends a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "extends"@en ; + rdfs:comment "Relates a software language to another software language that it extends or generalizes"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :isExtendedBy . + +:formattingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Formatting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding formatting"@en ; + foaf:page . + +:linkingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Linking policy"@en ; + rdfs:comment "Documents ontology-wide expectations for linking classes and individuals to descriptive web pages"@en ; + foaf:page . + +:hasAffectedArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has affected artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically affects (thereby complementing in- and output)"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + +:hasArea a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has area"@en ; + rdfs:comment "Relates an entity to an important subject area of interest"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :SubjectArea ; + owl:inverseOf :isAreaOf . + +:hasArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has artifact"@en ; + rdfs:comment "Relates a technological space to a kind of artifact that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isArtifactOf . + +:hasBibTeX a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "has BibTeX"@en ; + rdfs:comment "Relates an entity to the BibTeX key of a bibliographic entry that documents, discusses, or supports it"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range xsd:string . + + + + + +:hasElement a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has element"@en ; + rdfs:comment "Relates a language to an artifact in the set-theoretic sense"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :elementOf . + + + +:hasInputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has input artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically requires or consumes as input"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + + +:hasOutputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has output artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically produces as output"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + +:hasPart a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "has part"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that is a structural part or constituent of it"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :uses ; + owl:inverseOf :isPartOf . + + + + + +:hasSpace a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has space"@en ; + rdfs:comment "Relates an entity to a technological space to which it characteristically belongs"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :isSpaceOf . + +:hasSupportingLanguage a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting language"@en ; + rdfs:comment "Relates a software engineering activity to a language kind that is characteristically used to perform or express the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :LanguageEntity . + +:hasSupportingTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting tool"@en ; + rdfs:comment "Relates a software engineering activity to a tool kind that characteristically supports carrying out the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :ToolEntity . + + +:hasTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has tool"@en ; + rdfs:comment "Relates a technological space to a kind of tool that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ToolEntity ; + owl:inverseOf :isToolOf . + + + +:isAreaOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is area of"@en ; + rdfs:comment "Relates a subject area to an entity for which it is an important area of interest"@en ; + foaf:page ; + rdfs:domain :SubjectArea ; + rdfs:range :Entity ; + owl:inverseOf :hasArea . + +:isArtifactOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is artifact of"@en ; + rdfs:comment "Relates an artifact to its technological space"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasArtifact . + +:isDefinedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is defined by"@en ; + rdfs:comment "Relates a language to an artifact in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :defines . + +:isExtendedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is extended by"@en ; + rdfs:comment "Relates a software language to another software language that extends or generalizes it"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :extends . + +:isPartOf a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "is part of"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity of which it is a structural part or constituent"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :isUsedBy ; + owl:inverseOf :hasPart . + +:isProcessedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is processed by"@en ; + rdfs:comment "Relates an artifact entity to a tool entity that characteristically processes it"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :processes . + + +:isServedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is served by"@en ; + rdfs:comment "Relates a methodological approach to an entity that serves, realizes, supports, or instantiates it in an important way"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :Entity ; + owl:inverseOf :serves . + +:isSpaceOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is space of"@en ; + rdfs:comment "Relates a technological space to an entity that characteristically belongs to it"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :Entity ; + owl:inverseOf :hasSpace . + +:isSpecifiedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is specified by"@en ; + rdfs:comment "Relates an entity to a methodological approach used to formally specify or define its behavior or meaning"@en ; + foaf:page ; + rdfs:domain :FormalEntity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :specifies . + +:isTargetedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is targeted by"@en ; + rdfs:comment "Relates a language entity to a tool entity that targets it"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :targets . + +:isToolOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is tool of"@en ; + rdfs:comment "Relates a tool to its technological space"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasTool . + +:isUsedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is used by"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that uses it conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :uses . + +:metamodelingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Metamodeling policy"@en ; + rdfs:comment "Documents ontology-wide expectations for explicit punning-based typing of classes and individuals"@en ; + foaf:page . + +:processes a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "processes"@en ; + rdfs:comment "Relates a tool entity to an artifact entity that it characteristically processes"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isProcessedBy . + +:serves a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "serves"@en ; + rdfs:comment "Relates an entity to a methodological approach that it serves, realizes, supports, or instantiates in an important way"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :isServedBy . + +:specifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "specifies"@en ; + rdfs:comment "Relates a methodological approach to an entity whose behavior or meaning it is used to formally specify or define"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :FormalEntity ; + owl:inverseOf :isSpecifiedBy . + +:suggestion a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "suggestion"@en ; + rdfs:comment "Records a suggested resolution or improvement for an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:targets a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "targets"@en ; + rdfs:comment "Relates a tool entity to a language entity that it targets"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isTargetedBy . + +:uses a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "uses"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that it uses conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :isUsedBy . + +:object a rdf:Property ; + rdfs:label "object"@en ; + rdfs:comment "Identifies the object constituent of an issue when the issue concerns a particular assertion; this property designates object role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:object . + +:predicate a rdf:Property ; + rdfs:label "predicate"@en ; + rdfs:comment "Identifies the predicate constituent of an issue when the issue concerns a particular assertion; this property designates predicate role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:predicate . + +:subject a rdf:Property ; + rdfs:label "subject"@en ; + rdfs:comment "Identifies the subject constituent of an issue when the issue concerns a particular assertion; this property designates subject role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:subject . + +:target a rdf:Property ; + rdfs:label "target"@en ; + rdfs:comment "Identifies the primary resource that an issue is about, such as a reviewed resource or an ontology/module addressed as a whole; assertion-level issues are instead designated through subject, predicate, and object"@en ; + foaf:page ; + rdfs:domain :IssueEntity . + +:resolveAfter a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "resolve after"@en ; + rdfs:comment "States that an issue needs to be resolved after another issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range :IssueEntity. + +# Language-concept schema moved from ce. + +:LanguageConcept a :ConceptualEntity ; + rdfs:label "Language concept"@en ; + rdfs:comment "concept associated with a language framework such as programming-language concepts"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:CompositeConcept a :ConceptualEntity ; + rdfs:label "Composite concept"@en ; + rdfs:comment "a language concept as a composite of other language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:LanguageSupportKind a :ConceptualEntity ; + rdfs:label "Language support kind"@en ; + rdfs:comment "kind of support that a language provides for a language concept"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:LanguageSupportAssertion a :ConceptualEntity ; + rdfs:label "Language support assertion"@en ; + rdfs:comment "reified assertion that a language supports a language concept, optionally qualified"@en ; + rdfs:subClassOf :Assertion ; + foaf:page . + +:LanguageConceptApplicability a :ConceptualEntity ; + rdfs:label "Language concept applicability"@en ; + rdfs:comment "qualifier for how directly a language concept applies to a language"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:ImplementationMechanismConcept a :ConceptualEntity ; + rdfs:label "Implementation mechanism concept"@en ; + rdfs:comment "a more realization/implementation-oriented category of language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:supports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language to a concept that it supports"@en ; + foaf:page . + +:nativelySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Natively supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports natively"@en ; + foaf:page . + +:standardlySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Standardly supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports standardly"@en ; + foaf:page . + +:assertedForConcept a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for concept"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the concept"@en ; + foaf:page . + +:assertedForLanguage a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for language"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageEntity ; + rdfs:comment "Relates a reified assertion about language concepts with the language"@en ; + foaf:page . + +:hasDominantForm a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has dominant form"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language concept to a dominated form"@en ; + foaf:page . + +:hasPrimaryMechanism a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary mechanism"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :ImplementationMechanismConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the primary mechanism for realization"@en ; + foaf:page . + +:hasApplicability a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has applicability"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConceptApplicability ; + rdfs:comment "Relates a reified assertion about language concepts with the applicability"@en ; + foaf:page . + +:hasComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a composite language concept to a component"@en ; + foaf:page . + +:hasPrimaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (primary) component"@en ; + foaf:page . + +:hasSecondaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has secondary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (secondary) component"@en ; + foaf:page . + +:hasSupportKind a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has support kind"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageSupportKind ; + rdfs:comment "Relates a reified assertion about language concepts with the type of support"@en ; + foaf:page . diff --git a/ontologies/tbox_test.ttl b/ontologies/tbox_test.ttl new file mode 100644 index 0000000..b71ee55 --- /dev/null +++ b/ontologies/tbox_test.ttl @@ -0,0 +1,662 @@ +@prefix : . +@prefix foaf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + + a owl:Ontology ; + :commentingPolicy "All rdfs:comments must start in upper case."@en ; + :formattingPolicy "TTL syntax is to be used so that triples are grouped by shared subject. Default namespace (\":\") instead of explicit prefixes should be used, whenever possible. The required order in ontology files is: prefix declarations first, followed by the ontology header, then classes ordered by class name, then properties ordered by property name, and finally all remaining assertions ordered by subject name. Any serialization of the ontology should obey this formatting policy."@en ; + :linkingPolicy "All important classes and individuals should link to Wikipedia. Use foaf:isPrimaryTopicOf where possible. Use foaf:page otherwise. Link to https://en.wikipedia.org/wiki/N/A to express that no useful page could be determined."@en ; + :metamodelingPolicy "Punning/metamodeling is used systematically. Every class that is a subclass of an Entity subclass should also be explicitly typed as that Entity subclass. Every individual whose asserted type derives from an Entity subclass should also be explicitly typed as that Entity subclass. Example: le:QueryLanguage a tbox:LanguageEntity . Example: le:SQL a tbox:LanguageEntity . This expectation should be maintained as the ontology evolves."@en ; + rdfs:comment "Shared TBox of the FSL ontology"@en . + +:ArtifactEntity rdfs:subClassOf :Entity ; + rdfs:label "Artifact entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software artifacts, artifact families, and artifact-related instances"@en . + +:Assertion rdfs:subClassOf :ConceptualEntity ; + rdfs:label "Assertion"@en ; + rdfs:comment "Reified assertion entity used for qualified statements in language-related modules"@en ; + foaf:isPrimaryTopicOf . + +:ConceptualEntity rdfs:subClassOf :Entity ; + rdfs:label "Conceptual entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Contextual concepts for other entity types (foundations, languages, tools, and artifacts)"@en . + +:EngineeringActivity a :ConceptualEntity ; + rdfs:label "Engineering activity"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:SubjectArea a :ConceptualEntity ; + rdfs:label "Subject area"@en ; + rdfs:comment "research or application area relevant to the foundations of software languages and related disciplines"@en ; + rdfs:subClassOf :ConceptualEntity . + +:TechnologicalSpace a :ConceptualEntity ; + rdfs:label "Technological space"@en ; + rdfs:comment "Technological spaces are families of related software-language technologies that share characteristic artifact kinds, metalanguages, tools, conformance relations, skills, and communities of practice. A technological space is not just a single language or formalism, but a working context in which artifacts are defined, manipulated, queried, transformed, validated, exchanged, and executed according to characteristic principles. This class represents such ecosystems."@en ; + :hasBibTeX "KurtevBezivinAksit2002TechnologicalSpaces" ; + rdfs:subClassOf :ConceptualEntity . + + +:Entity a owl:Class ; + rdfs:label "Entity"@en ; + + foaf:page ; + rdfs:subClassOf [ a owl:Class ; + owl:unionOf ( [ a owl:Restriction ; + owl:onProperty foaf:isPrimaryTopicOf ; + owl:someValuesFrom foaf:Document ] [ a owl:Restriction ; + owl:onProperty foaf:page ; + owl:someValuesFrom foaf:Document ] ) ] . + +:FormalEntity rdfs:subClassOf :Entity ; + rdfs:label "Formal entity"@en ; + rdfs:comment "Ontological entity used to represent formal formalisms, theories, models of computation, and methodological approaches"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ] . + +:MethodologicalApproach a :FormalEntity ; + rdfs:label "Methodological approach"@en ; + rdfs:comment "class of formal entities that represent methodological orientations, techniques, or styles of treatment used in the study or engineering of software languages and related formalisms"@en ; + rdfs:subClassOf :FormalEntity . + +:PropertyEntity rdfs:subClassOf :Entity ; + rdfs:label "Property entity"@en ; + rdfs:comment "Ontological entity used to represent property declarations that participate in relations like other modeled entities"@en . + + +:IssueEntity rdfs:subClassOf :Entity ; + rdfs:label "Issue entity"@en ; + rdfs:comment "Entity for representing review issues, critiques, and proposed resolutions concerning resources, predicates, or fully specified assertions in the ontology"@en ; + foaf:page . + +:LanguageEntity rdfs:subClassOf :Entity ; + rdfs:label "Language entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software languages, language families, and language-related instances"@en ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :TechnologicalSpace ; + owl:onProperty :hasSpace ], + [ a owl:Restriction ; + owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ; + owl:onClass :SubjectArea ; + owl:onProperty :hasArea ] . + + +:SoftwareArtifact a :ArtifactEntity ; + rdfs:label "Software artifact"@en ; + rdfs:comment "Software artifact kind used to classify the characteristic artifacts of a technological space"@en ; + rdfs:subClassOf :ArtifactEntity . + +:SoftwareLanguage a :LanguageEntity ; + rdfs:label "Software language"@en ; + rdfs:comment "Concrete software languages (e.g., XML, SQL, OWL) are represented as individuals of this class. Language families are represented as subclasses. Artifact kinds capture the kinds of artifacts written in such languages."@en ; + rdfs:subClassOf :LanguageEntity ; + foaf:page . + +:SoftwareTool a :ToolEntity ; + rdfs:label "Software tool"@en ; + foaf:page ; + rdfs:subClassOf :ToolEntity . + +:ToolEntity rdfs:label "Tool entity"@en ; + :metamodelingPolicy "All non-immediate subclasses must also be of this type."@en ; + rdfs:comment "Ontological entity used to represent software tools, tool families, and tool-related instances"@en ; + rdfs:subClassOf :Entity . + +:classifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "classifies"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of metamodels classifying models"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :conformsTo . + +:commentingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Commenting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding commenting"@en ; + foaf:page . + +:conformsTo a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "conforms to"@en ; + rdfs:comment "Relates an artifact to another artifact in the generalized sense of models conforming to metamodels"@en ; + foaf:page ; + :hasBibTeX "AtkinsonKuehne2003MetamodelingFoundation", + "AtkinsonGerbig2016OntologicalClassification", + "DegueuleEtAl2017SafeModelPolymorphism", + "RossiniDeLaraGuerraEtAl2014DeepMetamodelling", + "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :classifies . + +:critique a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "critique"@en ; + rdfs:comment "Describes the problem, concern, or critique expressed by an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:defines a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "defines"@en ; + rdfs:comment "Relates an artifact to a language in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isDefinedBy . + +:elementOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "element of"@en ; + rdfs:comment "Relates an artifact to a language in the set-theoretic sense"@en ; + foaf:page ; + :hasBibTeX "Favre2005MetaPyramids" ; + rdfs:domain :ArtifactEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :hasElement . + +:extends a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "extends"@en ; + rdfs:comment "Relates a software language to another software language that it extends or generalizes"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :isExtendedBy . + +:formattingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Formatting policy"@en ; + rdfs:comment "Documents the ontology-wide expectation regarding formatting"@en ; + foaf:page . + +:linkingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Linking policy"@en ; + rdfs:comment "Documents ontology-wide expectations for linking classes and individuals to descriptive web pages"@en ; + foaf:page . + +:hasAffectedArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has affected artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically affects (thereby complementing in- and output)"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + +:hasArea a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has area"@en ; + rdfs:comment "Relates an entity to an important subject area of interest"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :SubjectArea ; + owl:inverseOf :isAreaOf . + +:hasArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has artifact"@en ; + rdfs:comment "Relates a technological space to a kind of artifact that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isArtifactOf . + +:hasBibTeX a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "has BibTeX"@en ; + rdfs:comment "Relates an entity to the BibTeX key of a bibliographic entry that documents, discusses, or supports it"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range xsd:string . + + + + + +:hasElement a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has element"@en ; + rdfs:comment "Relates a language to an artifact in the set-theoretic sense"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :elementOf . + + + +:hasInputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has input artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically requires or consumes as input"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + + +:hasOutputArtifact a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has output artifact"@en ; + rdfs:comment "Relates an activity or a tool to an artifact kind that it typically produces as output"@en ; + foaf:page ; + rdfs:domain [ a owl:Class ; + owl:unionOf ( :EngineeringActivity :ToolEntity ) ] ; + rdfs:range :ArtifactEntity . + + +:hasPart a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "has part"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that is a structural part or constituent of it"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :uses ; + owl:inverseOf :isPartOf . + + + + + +:hasSpace a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has space"@en ; + rdfs:comment "Relates an entity to a technological space to which it characteristically belongs"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :isSpaceOf . + +:hasSupportingLanguage a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting language"@en ; + rdfs:comment "Relates a software engineering activity to a language kind that is characteristically used to perform or express the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :LanguageEntity . + +:hasSupportingTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has supporting tool"@en ; + rdfs:comment "Relates a software engineering activity to a tool kind that characteristically supports carrying out the activity"@en ; + foaf:page ; + rdfs:domain :EngineeringActivity ; + rdfs:range :ToolEntity . + + +:hasTool a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "has tool"@en ; + rdfs:comment "Relates a technological space to a kind of tool that it is concerned with"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :ToolEntity ; + owl:inverseOf :isToolOf . + + + +:isAreaOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is area of"@en ; + rdfs:comment "Relates a subject area to an entity for which it is an important area of interest"@en ; + foaf:page ; + rdfs:domain :SubjectArea ; + rdfs:range :Entity ; + owl:inverseOf :hasArea . + +:isArtifactOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is artifact of"@en ; + rdfs:comment "Relates an artifact to its technological space"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasArtifact . + +:isDefinedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is defined by"@en ; + rdfs:comment "Relates a language to an artifact in the sense of a definition (specification)"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :defines . + +:isExtendedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is extended by"@en ; + rdfs:comment "Relates a software language to another software language that extends or generalizes it"@en ; + foaf:page ; + rdfs:domain :SoftwareLanguage ; + rdfs:range :SoftwareLanguage ; + owl:inverseOf :extends . + +:isPartOf a owl:AsymmetricProperty, + owl:IrreflexiveProperty, + owl:ObjectProperty ; + rdfs:label "is part of"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity of which it is a structural part or constituent"@en ; + foaf:isPrimaryTopicOf ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + rdfs:subPropertyOf :isUsedBy ; + owl:inverseOf :hasPart . + +:isProcessedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is processed by"@en ; + rdfs:comment "Relates an artifact entity to a tool entity that characteristically processes it"@en ; + foaf:page ; + rdfs:domain :ArtifactEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :processes . + + +:isServedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is served by"@en ; + rdfs:comment "Relates a methodological approach to an entity that serves, realizes, supports, or instantiates it in an important way"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :Entity ; + owl:inverseOf :serves . + +:isSpaceOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is space of"@en ; + rdfs:comment "Relates a technological space to an entity that characteristically belongs to it"@en ; + foaf:page ; + rdfs:domain :TechnologicalSpace ; + rdfs:range :Entity ; + owl:inverseOf :hasSpace . + +:isSpecifiedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is specified by"@en ; + rdfs:comment "Relates an entity to a methodological approach used to formally specify or define its behavior or meaning"@en ; + foaf:page ; + rdfs:domain :FormalEntity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :specifies . + +:isTargetedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is targeted by"@en ; + rdfs:comment "Relates a language entity to a tool entity that targets it"@en ; + foaf:page ; + rdfs:domain :LanguageEntity ; + rdfs:range :ToolEntity ; + owl:inverseOf :targets . + +:isToolOf a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is tool of"@en ; + rdfs:comment "Relates a tool to its technological space"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :TechnologicalSpace ; + owl:inverseOf :hasTool . + +:isUsedBy a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "is used by"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that uses it conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :uses . + +:metamodelingPolicy a owl:AnnotationProperty, + :PropertyEntity ; + rdfs:label "Metamodeling policy"@en ; + rdfs:comment "Documents ontology-wide expectations for explicit punning-based typing of classes and individuals"@en ; + foaf:page . + +:processes a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "processes"@en ; + rdfs:comment "Relates a tool entity to an artifact entity that it characteristically processes"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :ArtifactEntity ; + owl:inverseOf :isProcessedBy . + +:serves a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "serves"@en ; + rdfs:comment "Relates an entity to a methodological approach that it serves, realizes, supports, or instantiates in an important way"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :MethodologicalApproach ; + owl:inverseOf :isServedBy . + +:specifies a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "specifies"@en ; + rdfs:comment "Relates a methodological approach to an entity whose behavior or meaning it is used to formally specify or define"@en ; + foaf:page ; + rdfs:domain :MethodologicalApproach ; + rdfs:range :FormalEntity ; + owl:inverseOf :isSpecifiedBy . + +:suggestion a owl:DatatypeProperty, + :PropertyEntity ; + rdfs:label "suggestion"@en ; + rdfs:comment "Records a suggested resolution or improvement for an issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range rdf:langString . + +:targets a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "targets"@en ; + rdfs:comment "Relates a tool entity to a language entity that it targets"@en ; + foaf:page ; + rdfs:domain :ToolEntity ; + rdfs:range :LanguageEntity ; + owl:inverseOf :isTargetedBy . + +:uses a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "uses"@en ; + rdfs:comment "Relates an ontology entity to another ontology entity that it uses conceptually, methodologically, or technically"@en ; + foaf:page ; + rdfs:domain :Entity ; + rdfs:range :Entity ; + owl:inverseOf :isUsedBy . + +:object a rdf:Property ; + rdfs:label "object"@en ; + rdfs:comment "Identifies the object constituent of an issue when the issue concerns a particular assertion; this property designates object role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:object . + +:predicate a rdf:Property ; + rdfs:label "predicate"@en ; + rdfs:comment "Identifies the predicate constituent of an issue when the issue concerns a particular assertion; this property designates predicate role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:predicate . + +:subject a rdf:Property ; + rdfs:label "subject"@en ; + rdfs:comment "Identifies the subject constituent of an issue when the issue concerns a particular assertion; this property designates subject role rather than the overall issue target"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:subPropertyOf rdf:subject . + +:target a rdf:Property ; + rdfs:label "target"@en ; + rdfs:comment "Identifies the primary resource that an issue is about, such as a reviewed resource or an ontology/module addressed as a whole; assertion-level issues are instead designated through subject, predicate, and object"@en ; + foaf:page ; + rdfs:domain :IssueEntity . + +:resolveAfter a owl:ObjectProperty, + :PropertyEntity ; + rdfs:label "resolve after"@en ; + rdfs:comment "States that an issue needs to be resolved after another issue"@en ; + foaf:page ; + rdfs:domain :IssueEntity ; + rdfs:range :IssueEntity. + +# Language-concept schema moved from ce. + +:LanguageConcept a :ConceptualEntity ; + rdfs:label "Language concept"@en ; + rdfs:comment "concept associated with a language framework such as programming-language concepts"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:CompositeConcept a :ConceptualEntity ; + rdfs:label "Composite concept"@en ; + rdfs:comment "a language concept as a composite of other language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:LanguageSupportKind a :ConceptualEntity ; + rdfs:label "Language support kind"@en ; + rdfs:comment "kind of support that a language provides for a language concept"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:LanguageSupportAssertion a :ConceptualEntity ; + rdfs:label "Language support assertion"@en ; + rdfs:comment "reified assertion that a language supports a language concept, optionally qualified"@en ; + rdfs:subClassOf :Assertion ; + foaf:page . + +:LanguageConceptApplicability a :ConceptualEntity ; + rdfs:label "Language concept applicability"@en ; + rdfs:comment "qualifier for how directly a language concept applies to a language"@en ; + rdfs:subClassOf :ConceptualEntity ; + foaf:page . + +:ImplementationMechanismConcept a :ConceptualEntity ; + rdfs:label "Implementation mechanism concept"@en ; + rdfs:comment "a more realization/implementation-oriented category of language concepts"@en ; + rdfs:subClassOf :LanguageConcept ; + foaf:page . + +:supports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language to a concept that it supports"@en ; + foaf:page . + +:nativelySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Natively supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports natively"@en ; + foaf:page . + +:standardlySupports a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Standardly supports"@en ; + rdfs:domain :LanguageEntity ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :supports ; + rdfs:comment "Relates a language to a concept that it supports standardly"@en ; + foaf:page . + +:assertedForConcept a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for concept"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the concept"@en ; + foaf:page . + +:assertedForLanguage a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Asserted for language"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageEntity ; + rdfs:comment "Relates a reified assertion about language concepts with the language"@en ; + foaf:page . + +:hasDominantForm a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has dominant form"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a language concept to a dominated form"@en ; + foaf:page . + +:hasPrimaryMechanism a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary mechanism"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :ImplementationMechanismConcept ; + rdfs:comment "Relates a reified assertion about language concepts with the primary mechanism for realization"@en ; + foaf:page . + +:hasApplicability a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has applicability"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageConceptApplicability ; + rdfs:comment "Relates a reified assertion about language concepts with the applicability"@en ; + foaf:page . + +:hasComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:comment "Relates a composite language concept to a component"@en ; + foaf:page . + +:hasPrimaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has primary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (primary) component"@en ; + foaf:page . + +:hasSecondaryComponent a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has secondary component"@en ; + rdfs:domain :CompositeConcept ; + rdfs:range :LanguageConcept ; + rdfs:subPropertyOf :hasComponent ; + rdfs:comment "Relates a composite language concept to a (secondary) component"@en ; + foaf:page . + +:hasSupportKind a owl:ObjectProperty , + :PropertyEntity ; + rdfs:label "Has support kind"@en ; + rdfs:domain :LanguageSupportAssertion ; + rdfs:range :LanguageSupportKind ; + rdfs:comment "Relates a reified assertion about language concepts with the type of support"@en ; + foaf:page . diff --git a/test.log b/test.log new file mode 100644 index 0000000..0c16da6 --- /dev/null +++ b/test.log @@ -0,0 +1,2 @@ +Validation Report +Conforms: True diff --git a/test_fail.ttl b/test_fail.ttl new file mode 100644 index 0000000..43059ad --- /dev/null +++ b/test_fail.ttl @@ -0,0 +1,4 @@ +@prefix : . +@prefix owl: . + +:BrokenClass a owl:Class . diff --git a/test_fail2.ttl b/test_fail2.ttl new file mode 100644 index 0000000..74dcca1 --- /dev/null +++ b/test_fail2.ttl @@ -0,0 +1,4 @@ +@prefix : . +@prefix rdf: . + +:BrokenClass rdf:type . From 2ed3a07f254caceeac03bf58ee8e4fce67fc0304 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Thu, 2 Jul 2026 20:12:19 +0200 Subject: [PATCH 02/18] Add CI pipeline for SHACL validation --- .github/workflows/ontology-ci.yml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ontology-ci.yml diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml new file mode 100644 index 0000000..c1ca62b --- /dev/null +++ b/.github/workflows/ontology-ci.yml @@ -0,0 +1,39 @@ +name: FSL Ontology Validation CI + +on: + push: + pull_request: + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + pip install pyshacl rdflib + + - name: Run validation (Makefile or fallback) + run: | + if [ -f validation/Makefile ]; then + make -C validation + else + echo "No Makefile found, running fallback validation" + python -m pyshacl -s ontologies -e ontologies test_fail.ttl || true + fi + + - name: Upload validation logs + uses: actions/upload-artifact@v4 + with: + name: validation-logs + path: | + **/*.log + **/*.ttl From 8a00c90de5e7bfeb384061d6f7f15a121d2db7b6 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Thu, 2 Jul 2026 20:42:55 +0200 Subject: [PATCH 03/18] update CI pipeline and LLM validation improvemets --- llm-validation/llm_explainer.py | 43 ++++++++++++--- llm-validation/results/broken.txt | 3 ++ llm-validation/results/property_comment.txt | 8 +++ llm-validation/results_output.json | 59 +++++++++++++++++---- 4 files changed, 94 insertions(+), 19 deletions(-) create mode 100644 llm-validation/results/broken.txt create mode 100644 llm-validation/results/property_comment.txt diff --git a/llm-validation/llm_explainer.py b/llm-validation/llm_explainer.py index 8b0a331..1d74ffe 100644 --- a/llm-validation/llm_explainer.py +++ b/llm-validation/llm_explainer.py @@ -32,11 +32,12 @@ def safe_parse_llm_output(raw): # Files containing SHACL violations # ----------------------------------- -files = [ - "results/comment_violation.txt", - "results/foaf_violation.txt" -] +from pathlib import Path +files = sorted(Path("results").glob("*.txt")) + +if not files: + raise FileNotFoundError("No validation reports found in results/") # ----------------------------------- # Parse SHACL report # ----------------------------------- @@ -178,11 +179,38 @@ def evaluate_output(parsed): print("\nParsed:") print(v) + # ------------------------------- + # Skip incomplete SHACL reports + # ------------------------------- + if not all([v["focus_node"], v["shape"], v["message"]]): + + print("\nSkipping incomplete validation report.") + + results.append({ + "file": str(file), + "parsed_violation": v, + "llm_output": None, + "warnings": ["Incomplete SHACL report"] + }) + + continue + + # ------------------------------- + # Call the LLM only for valid reports + # ------------------------------- + # ------------------------------- + # Call the LLM only for valid reports + # ------------------------------- raw = explain_with_llm(v) parsed = safe_parse_llm_output(raw) - warnings = evaluate_output(parsed) + if "error" in parsed: + warnings = [ + f"LLM parsing failed ({parsed['error']})" + ] + else: + warnings = evaluate_output(parsed) print("\nLLM Output:\n") print(json.dumps(parsed, indent=2)) @@ -198,13 +226,12 @@ def evaluate_output(parsed): print("\nNo warnings detected.") results.append({ - "file": file, + "file": str(file), "parsed_violation": v, "llm_output": parsed, "warnings": warnings + }) - - # ----------------------------------- # Save results # ----------------------------------- diff --git a/llm-validation/results/broken.txt b/llm-validation/results/broken.txt new file mode 100644 index 0000000..2636a45 --- /dev/null +++ b/llm-validation/results/broken.txt @@ -0,0 +1,3 @@ +Validation Report + +Conforms: False diff --git a/llm-validation/results/property_comment.txt b/llm-validation/results/property_comment.txt new file mode 100644 index 0000000..427d882 --- /dev/null +++ b/llm-validation/results/property_comment.txt @@ -0,0 +1,8 @@ +Validation Report +Conforms: False + +Focus Node: :hasAuthor + +Source Shape: ve:PropertyDeclarationsMustHaveCommentShape + +sh:message Literal("Property declaration is missing an rdfs:comment.") diff --git a/llm-validation/results_output.json b/llm-validation/results_output.json index b5781d0..6f678b5 100644 --- a/llm-validation/results_output.json +++ b/llm-validation/results_output.json @@ -1,4 +1,16 @@ [ + { + "file": "results/broken.txt", + "parsed_violation": { + "focus_node": null, + "message": null, + "shape": null + }, + "llm_output": null, + "warnings": [ + "Incomplete SHACL report" + ] + }, { "file": "results/comment_violation.txt", "parsed_violation": { @@ -10,14 +22,10 @@ "focus_node": ":Entity", "shape": "ve:ClassDeclarationsMustHaveCommentShape", "issue": "Class declaration is missing an rdfs:comment.", - "why_it_matters": "", - "fix_rdf": "http://example.org/Entity a owl:Class ; rdfs:comment \"This class represents entities in general\" ." + "why_it_matters": "The class declaration is incomplete because it lacks a description.", + "fix_rdf": "@prefix rdfs: .\n rdfs:comment \"A brief description of Entity\" ." }, - "warnings": [ - "Subject URI missing angle brackets", - "Placeholder URI detected", - "Empty explanation" - ] + "warnings": [] }, { "file": "results/foaf_violation.txt", @@ -27,12 +35,41 @@ "shape": "ve:ClassDeclarationsMustHaveFoafLinkShape" }, "llm_output": { - "error": "no_json_found", - "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveFoafLinkShape\",\n \"issue\": \"Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n @prefix foaf: .\n :Entity a owl:Class ;\n foaf:page ;\n foaf:isPrimaryTopicOf .\n \"\"\"" + "error": "invalid_json", + "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveFoafLinkShape\",\n \"issue\": \"Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.\",\n \"why_it_matters\": \"To ensure proper linking and identification of the entity class in the knowledge graph.\",\n \"fix_rdf\": \"\"\"\n :Entity a owl:Class;\n rdfs:label \"Entity\"@en;\n foaf:page ;\n foaf:isPrimaryTopicOf .\n \"\"\"\n}" + }, + "warnings": [ + "LLM parsing failed (invalid_json)" + ] + }, + { + "file": "results/property_comment.txt", + "parsed_violation": { + "focus_node": ":hasAuthor", + "message": "Property declaration is missing an rdfs:comment.", + "shape": "ve:PropertyDeclarationsMustHaveCommentShape" + }, + "llm_output": { + "error": "invalid_json", + "raw": "{\n \"focus_node\": \":hasAuthor\",\n \"shape\": \"ve:PropertyDeclarationsMustHaveCommentShape\",\n \"issue\": \"Property declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n :hasAuthor a rdf:Property ;\n rdfs:domain ve:ContentObject ;\n rdfs:range ve:Person ;\n rdfs:comment \"This property declares the author of a content object.\" .\n\"\"\"\n}" + }, + "warnings": [ + "LLM parsing failed (invalid_json)" + ] + }, + { + "file": "results/sample_violation.txt", + "parsed_violation": { + "focus_node": ":Entity", + "message": "Class declaration is missing an rdfs:comment.", + "shape": "ve:ClassDeclarationsMustHaveCommentShape" + }, + "llm_output": { + "error": "invalid_json", + "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveCommentShape\",\n \"issue\": \"Class declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n @prefix : .\n :Entity a owl:Class ;\n rdfs:comment \"A class representing an entity.\" .\n \"\"\"\n}" }, "warnings": [ - "Empty explanation", - "Missing RDF fix" + "LLM parsing failed (invalid_json)" ] } ] \ No newline at end of file From 58b4291024df368242a7361cde0da33a3fdcd26d Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:05:58 +0200 Subject: [PATCH 04/18] Test CI Pipeline --- llm-validation/results_output.json | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/llm-validation/results_output.json b/llm-validation/results_output.json index 6f678b5..441db3c 100644 --- a/llm-validation/results_output.json +++ b/llm-validation/results_output.json @@ -22,10 +22,12 @@ "focus_node": ":Entity", "shape": "ve:ClassDeclarationsMustHaveCommentShape", "issue": "Class declaration is missing an rdfs:comment.", - "why_it_matters": "The class declaration is incomplete because it lacks a description.", - "fix_rdf": "@prefix rdfs: .\n rdfs:comment \"A brief description of Entity\" ." + "why_it_matters": "A class declaration should have a comment to describe its purpose and scope.", + "fix_rdf": "@prefix : .\n\n:Entity a ve:Class ;\trdfs:comment \"An entity is a thing that exists independently.\" ." }, - "warnings": [] + "warnings": [ + "Placeholder URI detected" + ] }, { "file": "results/foaf_violation.txt", @@ -35,12 +37,13 @@ "shape": "ve:ClassDeclarationsMustHaveFoafLinkShape" }, "llm_output": { - "error": "invalid_json", - "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveFoafLinkShape\",\n \"issue\": \"Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.\",\n \"why_it_matters\": \"To ensure proper linking and identification of the entity class in the knowledge graph.\",\n \"fix_rdf\": \"\"\"\n :Entity a owl:Class;\n rdfs:label \"Entity\"@en;\n foaf:page ;\n foaf:isPrimaryTopicOf .\n \"\"\"\n}" + "focus_node": ":Entity", + "shape": "ve:ClassDeclarationsMustHaveFoafLinkShape", + "issue": "Class declaration is missing both foaf:page and foaf:isPrimaryTopicOf.", + "why_it_matters": "This shape ensures that class declarations are properly linked to their respective pages and topics, facilitating discovery and consistency across the ontology.", + "fix_rdf": "Entity a owl:Class; foaf:page ; foaf:isPrimaryTopicOf ." }, - "warnings": [ - "LLM parsing failed (invalid_json)" - ] + "warnings": [] }, { "file": "results/property_comment.txt", @@ -51,7 +54,7 @@ }, "llm_output": { "error": "invalid_json", - "raw": "{\n \"focus_node\": \":hasAuthor\",\n \"shape\": \"ve:PropertyDeclarationsMustHaveCommentShape\",\n \"issue\": \"Property declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n :hasAuthor a rdf:Property ;\n rdfs:domain ve:ContentObject ;\n rdfs:range ve:Person ;\n rdfs:comment \"This property declares the author of a content object.\" .\n\"\"\"\n}" + "raw": "{\n \"focus_node\": \":hasAuthor\",\n \"shape\": \"ve:PropertyDeclarationsMustHaveCommentShape\",\n \"issue\": \"Property declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"A comment helps to understand the property's purpose and intention, making it easier for humans and machines to understand its meaning and usage.\",\n \"fix_rdf\": \"\"\"\n :hasAuthor a rdf:Property ;\n rdfs:domain :Book ;\n rdfs:range :Person ;\n rdfs:comment \"The author of the book.\" .\n \"\"\"\n}" }, "warnings": [ "LLM parsing failed (invalid_json)" @@ -66,7 +69,7 @@ }, "llm_output": { "error": "invalid_json", - "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveCommentShape\",\n \"issue\": \"Class declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"\",\n \"fix_rdf\": \"\"\"\n @prefix : .\n :Entity a owl:Class ;\n rdfs:comment \"A class representing an entity.\" .\n \"\"\"\n}" + "raw": "{\n \"focus_node\": \":Entity\",\n \"shape\": \"ve:ClassDeclarationsMustHaveCommentShape\",\n \"issue\": \"Class declaration is missing an rdfs:comment.\",\n \"why_it_matters\": \"The rdfs:comment provides a human-readable description of the class, which is essential for understanding its purpose and semantics.\",\n \"fix_rdf\": \"\"\"\n@Entity a ve:ClassDeclaration ;\n rdfs:comment \"Description of :Entity\"@en .\n\"\"\"\n}" }, "warnings": [ "LLM parsing failed (invalid_json)" From 1ef15528dd749024bfdaa8eb1869e497f3ee758a Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:24:08 +0200 Subject: [PATCH 05/18] Fail CI when SHACL violations exist --- .github/workflows/ontology-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml index c1ca62b..ddba41f 100644 --- a/.github/workflows/ontology-ci.yml +++ b/.github/workflows/ontology-ci.yml @@ -29,6 +29,15 @@ jobs: echo "No Makefile found, running fallback validation" python -m pyshacl -s ontologies -e ontologies test_fail.ttl || true fi + + - name: Fail if SHACL violations exist + run: | + if grep -R "Severity: sh:Violation" validation/*.log; then + echo "❌ SHACL violations found." + exit 1 + else + echo "✅ No SHACL violations." + fi - name: Upload validation logs uses: actions/upload-artifact@v4 From 0c9609fe39f2be0623f32f2afc9a1e237b39e015 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:29:26 +0200 Subject: [PATCH 06/18] trigger CI --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aa05010..40d2dad 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,4 @@ See the accompanying paper here: https://arxiv.org/abs/2605.17374 The following license applies: https://creativecommons.org/licenses/by/4.0/deed.en FSL is a sibling of FSL: https://github.com/softlang/fex +trigger CI run From 268d73d2902ad2a169dc33171b67597de2cc1ba8 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:38:27 +0200 Subject: [PATCH 07/18] fix yaml indentation --- .github/workflows/ontology-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml index ddba41f..e701084 100644 --- a/.github/workflows/ontology-ci.yml +++ b/.github/workflows/ontology-ci.yml @@ -30,14 +30,14 @@ jobs: python -m pyshacl -s ontologies -e ontologies test_fail.ttl || true fi - - name: Fail if SHACL violations exist - run: | - if grep -R "Severity: sh:Violation" validation/*.log; then - echo "❌ SHACL violations found." - exit 1 - else - echo "✅ No SHACL violations." - fi + - name: Fail if SHACL violations exist + run: | + if grep -R "Severity: sh:Violation" validation/*.log; then + echo "❌ SHACL violations found." + exit 1 + else + echo "✅ No SHACL violations." + fi - name: Upload validation logs uses: actions/upload-artifact@v4 From 76a73a767c2a40c18957e00d8230d1ae4c0793af Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:42:50 +0200 Subject: [PATCH 08/18] New yaml indentation --- .github/workflows/ontology-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml index e701084..426640b 100644 --- a/.github/workflows/ontology-ci.yml +++ b/.github/workflows/ontology-ci.yml @@ -27,7 +27,7 @@ jobs: make -C validation else echo "No Makefile found, running fallback validation" - python -m pyshacl -s ontologies -e ontologies test_fail.ttl || true + python -m pyshacl -s ontologies -e ontologies test_fail.ttl fi - name: Fail if SHACL violations exist From 60987fdba2775c04203e4f556ebcb3fbdd9715da Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:48:00 +0200 Subject: [PATCH 09/18] New yaml indentation --- .github/workflows/ontology-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml index 426640b..d97b176 100644 --- a/.github/workflows/ontology-ci.yml +++ b/.github/workflows/ontology-ci.yml @@ -29,6 +29,11 @@ jobs: echo "No Makefile found, running fallback validation" python -m pyshacl -s ontologies -e ontologies test_fail.ttl fi + - name: Fail CI on SHACL violation + run: | + if grep -R "Severity: sh:Violation" validation/*.log; then + exit 1 + fi - name: Fail if SHACL violations exist run: | From b707622252a4d9bb73bc37ced49b14ec20c5b097 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:53:39 +0200 Subject: [PATCH 10/18] update SHACL test and CI workflow --- test_fail.ttl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_fail.ttl b/test_fail.ttl index 43059ad..48ae1dc 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -1,4 +1,5 @@ @prefix : . -@prefix owl: . -:BrokenClass a owl:Class . + +:BrokenClass a owl:Class ; + rdfs:label "test" . From a51764cd478599ea9bfa638ed1107759a2d204e0 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 16:58:14 +0200 Subject: [PATCH 11/18] SHACL test and CI workflow --- test_fail.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_fail.ttl b/test_fail.ttl index 48ae1dc..00160a3 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -1,5 +1,5 @@ @prefix : . - :BrokenClass a owl:Class ; - rdfs:label "test" . + :completelyInvalidProperty "x" . + From f106019b3e078ddc0ef21135ce63314dacbfbc60 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:13:50 +0200 Subject: [PATCH 12/18] Add SHACL validation rules and Makefile pipeline --- ontologies/shapes.ttl | 11 +++++ .../ClassDeclarationsMustHaveCommentShape.ttl | 25 ++++------ validation/Makefile | 48 +++++++++---------- 3 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 ontologies/shapes.ttl diff --git a/ontologies/shapes.ttl b/ontologies/shapes.ttl new file mode 100644 index 0000000..b2b7b8b --- /dev/null +++ b/ontologies/shapes.ttl @@ -0,0 +1,11 @@ +@prefix sh: . +@prefix owl: . +@prefix rdfs: . + +:ClassShape + a sh:NodeShape ; + sh:targetClass owl:Class ; + sh:property [ + sh:path rdfs:comment ; + sh:minCount 1 ; + ] . diff --git a/validation/ClassDeclarationsMustHaveCommentShape.ttl b/validation/ClassDeclarationsMustHaveCommentShape.ttl index 1b49270..f05433f 100644 --- a/validation/ClassDeclarationsMustHaveCommentShape.ttl +++ b/validation/ClassDeclarationsMustHaveCommentShape.ttl @@ -6,22 +6,13 @@ ve:ClassDeclarationsMustHaveCommentShape a sh:NodeShape ; - sh:targetSubjectsOf rdf:type ; - sh:sparql [ - a sh:SPARQLConstraint ; + + # target all classes directly + sh:targetClass owl:Class ; + + # enforce comment exists + sh:property [ + sh:path rdfs:comment ; + sh:minCount 1 ; sh:message "Class declaration is missing an rdfs:comment." ; - sh:select """ - SELECT $this - WHERE { - $this rdf:type ?t . - FILTER(STRSTARTS(STR($this), "http://www.softlang.org/ontologies/")) - FILTER ( - ?t IN ( - owl:Class, - rdfs:Class - ) - ) - FILTER NOT EXISTS { $this rdfs:comment ?c . } - } - """ ; ] . diff --git a/validation/Makefile b/validation/Makefile index 0bdb20d..deb104c 100644 --- a/validation/Makefile +++ b/validation/Makefile @@ -1,43 +1,41 @@ master = ../ontologies -all: - make all-tbox - make all-abox +all: all-tbox all-abox all-tbox: make ClassDeclarationsMustHaveCommentShape.tbox make ClassDeclarationsMustHaveFoafLinkShape.tbox - make PropertyDeclarationsMustHaveCommentShape.tbox - make PropertyDeclarationsMustHaveFoafLinkShape.tbox - make MetamodelingShapes.tbox all-abox: make TechnologySpacesMustBeSpecifiedShape.abox make TechnologySpacesMustHaveConformsToShape.abox - make EngineeringActivitiesMustBeSpecifiedShape.abox - make MethodologicalApproachesMustBeSpecifiedShape.abox -# Checking annotations on tbox only works reliably with consuming it as the main graph %.tbox: - -@python3 -m pyshacl \ - -s $*.ttl \ - ${master}/tbox.ttl \ - > $*.log - @grep "Severity: sh:Violation" $*.log | wc -l - +%.tbox: + @python3 -m pyshacl \ + -s $(master)/tbox.ttl \ + -e $(master)/ae.ttl \ + $*.ttl > $*.log + @if grep -q "Severity: sh:Violation" $*.log; then \ + echo "❌ TBOX validation failed for $*"; \ + exit 1; \ + else \ + echo "✅ TBOX valid: $*"; \ + fi %.abox: - -@python3 -m pyshacl \ + @python3 -m pyshacl \ -a \ -s $*.ttl \ - -e ${master}/tbox.ttl \ + -e $(master)/tbox.ttl \ -i owlrl \ -im \ - ${master}/ae.ttl \ - ${master}/ce.ttl \ - ${master}/fe.ttl \ - ${master}/ie.ttl \ - ${master}/le.ttl \ - ${master}/pe.ttl \ - ${master}/te.ttl \ + $(master)/ae.ttl \ + $(master)/ce.ttl \ + $(master)/fe.ttl \ > $*.log - @grep "Severity: sh:Violation" $*.log | wc -l + @if grep -q "Severity: sh:Violation" $*.log; then \ + echo "❌ ABOX validation failed for $*"; \ + exit 1; \ + else \ + echo "✅ ABOX valid: $*"; \ + fi From 027f7df0e16de566cb88447772b2b2967707bc32 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:16:34 +0200 Subject: [PATCH 13/18] Add SHACL validation CI workflow --- .github/workflows/ontology-ci.yml | 42 +++++++------------------------ 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ontology-ci.yml b/.github/workflows/ontology-ci.yml index d97b176..3ce542a 100644 --- a/.github/workflows/ontology-ci.yml +++ b/.github/workflows/ontology-ci.yml @@ -1,4 +1,4 @@ -name: FSL Ontology Validation CI +name: Ontology CI on: push: @@ -9,45 +9,21 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout repo uses: actions/checkout@v4 - - name: Set up Python + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Install dependencies run: | pip install pyshacl rdflib - - name: Run validation (Makefile or fallback) + - name: Run SHACL validation run: | - if [ -f validation/Makefile ]; then - make -C validation - else - echo "No Makefile found, running fallback validation" - python -m pyshacl -s ontologies -e ontologies test_fail.ttl - fi - - name: Fail CI on SHACL violation - run: | - if grep -R "Severity: sh:Violation" validation/*.log; then - exit 1 - fi - - - name: Fail if SHACL violations exist - run: | - if grep -R "Severity: sh:Violation" validation/*.log; then - echo "❌ SHACL violations found." - exit 1 - else - echo "✅ No SHACL violations." - fi - - - name: Upload validation logs - uses: actions/upload-artifact@v4 - with: - name: validation-logs - path: | - **/*.log - **/*.ttl + python -m pyshacl \ + -s validation/ClassDeclarationsMustHaveCommentShape.ttl \ + -e ontologies/tbox.ttl \ + test_fail.ttl From 9b3926e067ce3f418be89925f041f8cd441d36db Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:19:42 +0200 Subject: [PATCH 14/18] Fix missing owl prefix in test data --- test_fail.ttl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test_fail.ttl b/test_fail.ttl index 00160a3..ad93965 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -1,5 +1,7 @@ -@prefix : . +@prefix : . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . :BrokenClass a owl:Class ; :completelyInvalidProperty "x" . - From 2d9c614ecfb4555c86f98d6f6725d37910d99f01 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:22:17 +0200 Subject: [PATCH 15/18] Fix SHACL rule to ignore OWL anonymous classes --- .../ClassDeclarationsMustHaveCommentShape.ttl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/validation/ClassDeclarationsMustHaveCommentShape.ttl b/validation/ClassDeclarationsMustHaveCommentShape.ttl index f05433f..c4c950d 100644 --- a/validation/ClassDeclarationsMustHaveCommentShape.ttl +++ b/validation/ClassDeclarationsMustHaveCommentShape.ttl @@ -11,8 +11,11 @@ ve:ClassDeclarationsMustHaveCommentShape sh:targetClass owl:Class ; # enforce comment exists - sh:property [ - sh:path rdfs:comment ; - sh:minCount 1 ; - sh:message "Class declaration is missing an rdfs:comment." ; - ] . + sh:select """ + SELECT $this + WHERE { + $this rdf:type owl:Class . + FILTER(isIRI($this)) + FILTER NOT EXISTS { $this rdfs:comment ?c . } +} +""" ; From a53710ee51ff28b46e88426e419f29c2669e6232 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:42:31 +0200 Subject: [PATCH 16/18] New modified shacl validation --- test_fail.ttl | 6 ++--- .../ClassDeclarationsMustHaveCommentShape.ttl | 23 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/test_fail.ttl b/test_fail.ttl index ad93965..2623047 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -1,7 +1,7 @@ @prefix : . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . :BrokenClass a owl:Class ; :completelyInvalidProperty "x" . diff --git a/validation/ClassDeclarationsMustHaveCommentShape.ttl b/validation/ClassDeclarationsMustHaveCommentShape.ttl index c4c950d..2d0df12 100644 --- a/validation/ClassDeclarationsMustHaveCommentShape.ttl +++ b/validation/ClassDeclarationsMustHaveCommentShape.ttl @@ -6,16 +6,17 @@ ve:ClassDeclarationsMustHaveCommentShape a sh:NodeShape ; - - # target all classes directly sh:targetClass owl:Class ; - # enforce comment exists - sh:select """ - SELECT $this - WHERE { - $this rdf:type owl:Class . - FILTER(isIRI($this)) - FILTER NOT EXISTS { $this rdfs:comment ?c . } -} -""" ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "Class declaration is missing an rdfs:comment." ; + sh:select """ + SELECT $this + WHERE { + $this rdf:type owl:Class . + FILTER(isIRI($this)) + FILTER NOT EXISTS { $this rdfs:comment ?c . } + } + """ ; + ] . From c129e6710c809459bb364c6e9c7c7f9cc8282083 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:45:06 +0200 Subject: [PATCH 17/18] changed shacl --- test_fail.ttl | 1 + 1 file changed, 1 insertion(+) diff --git a/test_fail.ttl b/test_fail.ttl index 2623047..0bbcf05 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -3,5 +3,6 @@ @prefix rdf: . @prefix rdfs: . +rdfs:comment "Broken class example" . :BrokenClass a owl:Class ; :completelyInvalidProperty "x" . From c9bcd62fa8b78e4b806a13e63e5e01cb309c2fa1 Mon Sep 17 00:00:00 2001 From: Harsha Ramisetty Date: Sun, 5 Jul 2026 19:46:32 +0200 Subject: [PATCH 18/18] test shacl validation files --- test_fail.ttl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test_fail.ttl b/test_fail.ttl index 0bbcf05..f6dcc40 100644 --- a/test_fail.ttl +++ b/test_fail.ttl @@ -1,8 +1,7 @@ @prefix : . @prefix owl: . -@prefix rdf: . @prefix rdfs: . -rdfs:comment "Broken class example" . :BrokenClass a owl:Class ; + rdfs:comment "Broken class example" ; :completelyInvalidProperty "x" .