Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

107 Add SystemKind class and its subclasses #209

Closed
wants to merge 15 commits into from

Conversation

alexrobin
Copy link
Collaborator

@alexrobin alexrobin commented Mar 18, 2024

Closes #107

Adds the SystemKind class to describe types of systems, as well as the corresponding subclasses :

  • SensorKind
  • ActuatorKind
  • SamplerKind
  • PlatformKind

Also adds the hasSystemKind property to reference the SystemKind from the System instance.

See updated documentation at:
https://raw.githack.com/w3c/sdw-sosa-ssn/107-add-systemkind-classes/ssn/index.html

Copy link
Collaborator

@dr-shorthair dr-shorthair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDF looks good and clean.
Can you also add documentation in

  • Common.html
  • Actuation.html
  • Observation.html
  • Sampling.html

@alexrobin alexrobin changed the title Add SystemKind class and its subclasses 107 Add SystemKind class and its subclasses Mar 19, 2024
@alexrobin alexrobin force-pushed the 107-add-systemkind-classes branch 2 times, most recently from 99abb65 to 766c457 Compare March 19, 2024 09:59
@alexrobin alexrobin force-pushed the 107-add-systemkind-classes branch 2 times, most recently from 8d2109f to 9905503 Compare March 19, 2024 13:02
@alexrobin alexrobin force-pushed the 107-add-systemkind-classes branch from 9905503 to 162ce74 Compare March 19, 2024 13:15
@alexrobin
Copy link
Collaborator Author

@dr-shorthair I have updated the documentation. You can see it here:
https://raw.githack.com/w3c/sdw-sosa-ssn/107-add-systemkind-classes/ssn/index.html

@alexrobin
Copy link
Collaborator Author

I'm not sure the MIN 1 cardinality on implements is justified now that we also have hasSystemKind.
There can be systems that have no attached procedures I think.

@alexrobin
Copy link
Collaborator Author

alexrobin commented Mar 19, 2024

There is also this note that I think is misleading now that we have introduced SensorKind:

Note: The observing procedure cannot describe a sensor instance, but it can describe the sensor type.

The Sensor type would be better described by SensorKind, and not by ObservingProcedure anymore:

@KathiSchleidt
Copy link
Contributor

Platform is not a System, so if you need PlatformKind, you'd need to add it to Platform itself. See #46 and #203

@alexrobin
Copy link
Collaborator Author

alexrobin commented Mar 21, 2024

@KathiSchleidt The property is only defined on System because it's called hasSystemKind. So the intent was to use the property on a Platform only if the platform is also a System.

Not sure if it's still ok to have these axioms in that case:

sosa:Platform
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:allValuesFrom sosa:PlatformKind ] ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ;

I suppose we could generalize this property and call it hasEntityKind or just hasKind so it also works on Platform directly, I dont know...

IMO, it would certainly make things easier if Platform was also a subclass of System...

Note that I'm interested in using the "system capabilities module" properties on PlatformKind so one can define the platform "operating range", "survivable range", etc... So it seems that at some point there is going to be a terminology conflict if platforms are not systems...

Another (perhaps cleaner) alternative would be to add a class that's called PlatformSystem...

@dr-shorthair
Copy link
Collaborator

Since Platform and System are not disjoint, you can make an individual both sosa:Platform and sosa:System (or one of its subclasses).
But sosa:Platform rdfs:subClassOf sosa:System . implies that every Platform is a system.
I don't think we want that.

In general the key functions of members of the two classes are:

  • Platforms host Systems
  • Systems implement Procedures

Some but not all Platforms are also Systems.
These are distinct functions, and I don't think they should be conflated.

@maximelefrancois86
Copy link
Contributor

maximelefrancois86 commented Mar 22, 2024

Indeed, although the canonical approach to distinguish types vs individuals in ontologies is to use classes vs instances, it is well acknowledged that different SOSA/SSN users have used classes sosa:Sensor, sosa:Property, etc. , sometimes to represent things that are generic (a sensor kind like <dht22>, a property kind like <temperature>), and sometimes to represent things that are specific (a specific sensor like <the_dht22_on_my_desk>, the actual property that is specific to a feature of interest like <the_temperature_of_my_office>).
It's not a good option to force those that want to model generic things to use classes and rely on OWL restrictions or annotations to further describe these classes.
For example, most SOSA users prefer to have <temperature> modeled as an individual rather than a class. As for sensors, there may be an equal share of users wanting to use sosa:Sensor to actually model sensors kinds, and users wanting to use sosa:Sensor to actually model sensor instances.
By introducing PropertyOfInterest, we solved the first issue. And by introducing SensorKind, we solve the second.

It would be now very convenient for both sensor catalog editors to expose datasheets in RDF:

<dht22> a sosa:SensorKind ;
  sosa:observes <temperature> , <humidity> ;
  sosa:hasPropertyValue [  sosa:hasValue "-40-80Celsius" ; sosa:isValueOfProperty <temperature_operating_range> ] ;
  sosa:hasPropertyValue [  sosa:hasValue "0-100%RH" ; sosa:isValueOfProperty <humidity_operating_range> ]  ;

and for application developers:

<the_dht22_on_my_desk> a sosa:Sensor ;
  sosa:observes <temperature> ,  <humidity> ; # if using sosa:Property
  sosa:observes <the_temperature_in_my_office> , <the_humidity_in_my_office> ; # if using sosa:PropertyOfInterest
  sosa:madeObservation [ a sosa:Observation ; sosa:hasSimpleResult 22.0 ; sosa:observedProperty <temperature> ] ;
  sosa:madeObservation [ a sosa:Observation ; sosa:hasSimpleResult 50 ; sosa:observedProperty <humidity> ] .

@alexrobin
Copy link
Collaborator Author

alexrobin commented Mar 25, 2024

@KathiSchleidt @dr-shorthair Based on your comments, are you OK to keep PlatformKind as a subclass of SystemKind then, as it is currently the case in the PR? I guess not but I'm asking just in case.

If we remove this relationship, then do you see it working the same as Platform + System, that is, somebody can create a class that is both SystemKind and PlatformKind if needed?

What about the hasSystemKind property? Do we reuse it on Platform? Do we give the property a more generic name?

If we want to keep Platform and PlatformKind clean, I'm also not sure how to write these axioms:

sosa:Platform
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:allValuesFrom sosa:PlatformKind ] ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ;

The goal was just to ensure that a Platform always references a PlatformKind. This can work if the has***Kind is also allowed on Platform directly.

Do you have any suggestions?

@dr-shorthair
Copy link
Collaborator

@dr-shorthair

I'm not sure the MIN 1 cardinality on implements is justified now that we also have hasSystemKind. There can be systems that have no attached procedures I think.

Where is this?

This is in the docs and the rdf: https://github.com/w3c/sdw-sosa-ssn/blob/107-add-systemkind-classes/ssn/rdf/ontology/core/ssn-observation.ttl#L49 https://github.com/w3c/sdw-sosa-ssn/blob/107-add-systemkind-classes/ssn/rdf/ontology/core/ssn-actuation.ttl#L48 https://github.com/w3c/sdw-sosa-ssn/blob/107-add-systemkind-classes/ssn/rdf/ontology/core/ssn-sampling.ttl#L85

implements is the key property of a System.
A System is pointless unless it implements a procedure.

Are you suggesting that this information is 'inherited' from the SystemKind, so doesn't need to be expressed on the System node?
This depends a bit on how you understand the OWL axioms: the way I see it is that every System must have an implements property. Even if the value can be found on the 'parent' SystemKind, it could still be copied down to the System instance to satisfy the cardinality axiom.
So even if it is not directly present in the data, it still logically exists and the cardinality axiom is correct.

Note: OWL expresses logical expectations. This is not the same as SHACL which expresses dataset validation expectations.

@alexrobin
Copy link
Collaborator Author

alexrobin commented Mar 25, 2024

@dr-shorthair

Are you suggesting that this information is 'inherited' from the SystemKind, so doesn't need to be expressed on the System node?

Yes, exactly. In many cases the procedure would be described by the kind and not repeated on every instance (at least that's how we do it in connected systems). That's why @maximelefrancois86 requested in a separate issues that many properties should be modified to include the Kind classes in their domain or range.

If you think the logical relationship should still be expressed in OWL then I'm perfectly OK with it. I just wanted to make sure we don't break the SOSA/SSN model with what we do in the API.

@alexrobin
Copy link
Collaborator Author

@dr-shorthair Following the same reasoning, I think the cardinality of hasSystemKind should be changed to EXACTLY ONE then, because, logically, there is always a kind, even if it's not always provided.

What do you think?

@maximelefrancois86
Copy link
Contributor

hasSystemKind may have cardinality MIN 1, but not EXACTLY 1 .
We organise system kinds in a taxonomy, and a system may have more than one kind, and inherit the more generic kinds of his system kind

@alexrobin
Copy link
Collaborator Author

hasSystemKind may have cardinality MIN 1, but not EXACTLY 1 .
We organise system kinds in a taxonomy, and a system may have more than one kind, and inherit the more generic kinds of his system kind

Ok, I was wondering about this too. I will change it to MIN 1.

@alexrobin alexrobin force-pushed the 107-add-systemkind-classes branch from 9fb929b to 765d8b4 Compare March 25, 2024 13:36
@@ -43,12 +43,18 @@ sosa:ActuatingProcedure

sosa:Actuator
rdfs:subClassOf sosa:System ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:allValuesFrom sosa:ActuatorKind ] ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minCardinality?

@@ -43,6 +43,8 @@ sosa:ObservingProcedure

sosa:Sensor
rdfs:subClassOf sosa:System ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:allValuesFrom sosa:SensorKind ] ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minCardinality?

rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hosts ; owl:allValuesFrom sosa:System ] ;
rdfs:isDefinedBy sosa-common: .

sosa:PlatformKind
rdfs:subClassOf sosa:SystemKind ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Not comfortable mixing Platform and System.

@@ -80,11 +80,17 @@ sosa:SamplingProcedure

sosa:Sampler
rdfs:subClassOf sosa:System ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:allValuesFrom sosa:SamplerKind ] ;
rdfs:subClassOf [ a owl:Restriction ; owl:onProperty sosa:hasSystemKind ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minCardinality?

<span about="[_:SOSASampler2]" rel="owl:onProperty" resource="sosa:hasSystemKind"><a
href="#SOSAhasSystemKind">sosa:hasSystemKind</a></span>
<span about="[_:SOSASampler2]" property="owl:maxCardinality" content="1"
datatype="xsd:nonNegativeInteger"><em><b>MAX 1</b></em> <a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minCardinality?

<span about="[_:SOSASensor5]" rel="owl:onProperty" resource="sosa:hasSystemKind"><a
href="#SOSAhasSystemKind">sosa:hasSystemKind</a></span>
<span about="[_:SOSASensor5]" property="owl:maxCardinality" content="1"
datatype="xsd:nonNegativeInteger"><em><b>MAX 1</b></em> <a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minCardinality?

Copy link
Collaborator

@dr-shorthair dr-shorthair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some cardinalities are MAX which should be MIN
System and Platform appear to be entangled in a way that has not been agreed.

@dr-shorthair
Copy link
Collaborator

Hi, some comments on this PR and the underlying discussion in issue 107; please feel free to ignore:

  1. The success of SOSA was/is largely based not on what is there but what isn't. It took a lot of discipline to keep the core small and I would rather see additions to SSN instead of nearly doubling the number of classes in SOSA.

Yes - there has been a significant expansion of the number of terms in the sosa: namespace.
This could be confusing or overwhelming for new users.
However, I suggest that
(i) the improvements in documentation and diagrams should help
(ii) some of the additions are to make the structures more internally consistent, with more complete class- and property-hierarchies, better use of sosa:System and sosa:Execution etc. which also should make the whole thing less scattered.

A major change was to move all SSN terms into the SOSA namespace, justified by the fact that multiple namespaces are one of the things that confuse developers who are not already immersed in the semantic world. So a simplification on one axis (# namespaces) leads to a blowout on another (# terms in core).

Are there parts of the current draft that could sensibly be moved into extension modules? Maybe the SSO piece is of minor interest in practice, but that only covers four terms (Stimulus, detects, wasOriginatedBy, isProxyFor). Any others?

@dr-shorthair
Copy link
Collaborator

Should datasheets (*Kind classes) be moved to an extension module?

@dr-shorthair dr-shorthair self-requested a review May 21, 2024 06:08
Copy link
Collaborator

@dr-shorthair dr-shorthair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm now thinking that SystemKind and its specializations might be better added to the
System Capabilities extension module.

Also see detailed comments inline.

@dr-shorthair dr-shorthair marked this pull request as draft May 27, 2024 06:06
@oldskeptic oldskeptic self-requested a review June 28, 2024 15:30
@dr-shorthair
Copy link
Collaborator

Update team agreed not to introduce a specific SystemKind class.

@dr-shorthair dr-shorthair deleted the 107-add-systemkind-classes branch September 25, 2024 10:09
@dr-shorthair
Copy link
Collaborator

Superseded by #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System types and individuals
5 participants