common-workflow-language / common-workflow-language/cwl-v1.2
RDF Schema contains erroneous rdfs:domain triples
- Dominant language
- Common Workflow Language
- Stars
- 45
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
### Description
The turtle file with RDF(S) of the CWL SALAD Schema retrievable under [http://commonwl.org/v1.2/cwl.ttl](http://commonwl.org/v1.2/cwl.ttl) (or alternatively by running `schema-salad-tool --print-rdfs` with the full schema `CommonWorkflowLanguage.yml` in the [cwl-v1.2 repository](https://github.com/common-workflow-language/cwl-v1.2/blob/main/CommonWorkflowLanguage.yml)) contains the following statement:
```
@base:basename a rdf:Property ;
rdfs:domain @base:Directory,
@base:File .
```
Which states (by inference, see [RDF 1.1 Semantics entailment pattern 'rdfs2'](https://www.w3.org/TR/rdf11-mt/#rdfs-entailment)) that every subject IRI of a triple with the predicate `https://w3id.org/cwl/cwl#basename` is an instance of the class `@base:Directory` and an instance of the class `@base:File`. This is clearly not the case as not every File is a Directory (and they even have different fields in CWL too).
### Analysis
Perhaps this error is due to the fact that the semantics of the object-oriented model and RDFS mis-match:
- In RDFS it is not possible to narrow down the domain and range of a property in a sub-class or different classes (properties are always global)
- In Apache Avro its instead totally fine to use the same name 'basename' for a field in different records with different types 'File' and 'Directory' as the properties are not globally visible and valid.
### Solution ideas
- Either the same field name is in different records with different types mapped to different IRIs (as the same field name indicates some conformity in use, the IRIs could still build a property-hierarchy, stating in the super-property the overlap in their usage, and in the sub-properties their difference (but this cannot be formulated with the current standard))
- or the `salad-schema-tool` does infer only the most specific type of the domain/range of a property, which is valid globally in all contexts in which the property is used (not like now every most specific type; by following the class hierarchy upwards until a common class for all domain/range usages of the property is found).
Contributor guide
No contributing guide indexed for this repository
Research direction
Read CommonWorkflowLanguage.yml and run schema-salad-tool --print-rdfs to reproduce the generated cwl.ttl output, focusing on the basename property's domain triples for File and Directory. Done means agreeing on the intended global RDFS representation and verifying that the generated schema no longer asserts the erroneous domain relationship.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100