Review Comment:
The paper is mostly well written, although many sentences could be shortened considerably. The topic, enhancing temporal reasoning with Semantic-Web-related technologies, is very relevant for the Semantic Web Journal.
The main body of the paper details a SHACL-based rule system to infer new temporal facts from sets of temporal facts described using a subpart of the vocabulary of the OWL time ontology and find inconsistencies in said sets of temporal facts. The rules the authors supply, taken in combination with the implementative details of the paper, are novel up to my knowledge.
The provided repository is properly organized, and I was able to start using the authors' programs with just minor issues (which are to be always expected in my experience, and don't strictly depend on the authors' work).
From my point of view, the paper has some issues, but one is especially critical, and I will discuss it below. The other issues are less critical, and I will discuss them afterwards.
Critical issue: incompleteness of the inference system and general unclarity in the formal aspects.
In Section 4.4. "Evaluation", the authors state "This subsection further investigates, through a case-based evaluation, whether the proposed shapes and rules are able to properly validate all knowledge graphs that can be built by combining these properties in all possible ways". Again, in Section 5.10. "Evaluation" they state "In order to assess whether the SHACL-SPARQL rules [...] adequately cover all knowledge graphs that may be
constructed we again conducted a case-based evaluation". There are other two evaluation sections, which are similar in nature, but lets us focus on the first two.
First, on a general level, I don't understand neither what is a "proper" evaluation nor what are "all possible ways".
Regarding the "proper" validation, it appears that the authors assume there is some "gold-standard" ontology of time, whose vocabulary contains the vocabulary of the OWL time ontology, and such that a validation is proper if and only if it is the same as the validation obtained using this gold-ontology. However, this gold-ontology can be neither the OWL time ontology, because the inference system proposed by the authors is much stronger, nor it can be Allen's interval algebra, whose vocabulary is different (in particular smaller) than the one of the OWL time ontology. Is this gold-ontology perhaps based on some interpretation of time intervals based on intervals of the real numbers line (and if so, are the intervals closed, open, semi-open, or else?), or perhaps it is based on some common-sense interpretation of time intervals (for which then one may incur in difficulties when discussing instants, as discussed e.g. by Allen in his works)?.
Regarding the all possible ways, it appears that the authors are attempting a proof of completeness, in the sense that it looks like they are proving that, given any input ABox, if a fact can be deduced from the Abox using the gold-ontology, then it is also deduced from the Abox using their SHACL-based inference system. In particular, all inconsistency Aboxes for the gold-ontology are also inconsistent for the SHACL-based system. However, it is not clear if it is this that they are actually doing, and the proof (if it is intended to be such) is difficult to follow: for instance, in Section 5.10, they start by describing, at a general level, how they addressed the issue ("we analyzed [...], examining how [...]") then show two exemplificative figures, and so on.
It is difficult to follow the line of reasoning, and this holds a fortiori because one does not clearly know what is being proved.
In fact, if the two sections 4.4. and 5.10. are indeed proofs of completeness, they are apparently wrong.
Consider in fact the following Abox counter example (of course, it is only arguably a counter example because, again, the goal of the proof is unclear):
:i1 time:intervalStarts :i2.
:i2 time:hasBeginning :b2.
:i1 time:hasEnd :b2.
This Abox modifies the picture in Figure 17: I removed the hasEnd object in the down-right corner and added a hasEnd assertion between the node in the top-left (called i1) and the node in the bottom-left (called b2).
I ran the compile.bat and run.bat file [actually, I had to move to a linux machine then modified said files, then install additional jar files dependencies (some 'logback' library); because my Windows machine was such that the command prompt was closing immediately, for some reason].
No SHACL shape was violated. However, the Abox should probably be non-valid: i1 is a proper interval, since it is the subject of intervalStarts; but it is also an instant, since ends at b2, but it also begins at b2, since i2 (node in the top-right corner) is started by i1 and begins at b2, and intervals connected by the intervalStarts relation share beginnings.
The reason why this inconsistency is not found is that the author did not add the rule
x intervalStarts y, y hasBeginning z --> x hasBeginning z
(and also x intervalStarts y, x hasBeginning z --> y hasBeginning z)
In fact, they opted for a more convoluted rule 24, which says:
x intervalStarts te2, x hasBeginning b1, te2 hasBeginning b2 -> b1 hasBeginning b2, b2 hasBeginning b1, b1 hasEnd b2, b2 hasEnd b1
But this rule is only activated when there are (at least) two hasBeginning statements. In fact,
:i1 time:intervalStarts :i2.
:i2 time:hasBeginning :b2.
:i1 time:hasEnd :b2.
:i1 time:hasBeginning :b1.
is correctly identified as invalid, although b1 is not directly related with b2.
Now, one could just modify rule 24, or add other rules, then the Abox above would be found invalid. However, this issue is probably a symptom of a deeper issue in the authors' approach.
In fact, I found other Abox that miss validation, for instance:
:i2 time:inside :ii2.
:i1 time:inside :ii1.
:i1 time:intervalAfter :i2.
:ii2 time:hasBeginning :ii1.
is valid, so is
:i2 time:inside :ii2.
:i1 time:inside :ii1.
:i2 time:after :i1.
:ii2 time:hasBeginning :ii1.
while this one is correctly identified as non-valid (in passing, how is it possible given the above valid Abox? I thought that any 'x after y' would just be replaced by a 'y before x' during evaluation and thus the result should be the same, is it a bug or else? )
:i2 time:inside :ii2.
:i1 time:inside :ii1.
:i1 time:before :i2.
:ii2 time:hasBeginning :ii1.
Given this, I assume it is likely that ther are infinite non-isomorphic Aboxes that are not identified as non-valid.
The latter two evaluation sections appear to be clearer, however, for instance, I found that the following Abox
:i1 time:intervalDuring :i2.
:i2 time:intervalDuring :i3.
:i1 time:after :i3.
is valid, so perhaps there is some problem there also.
In summary, the first two evaluation sections are confusing and convoluted. Are they a proof of something? If so, of what (and are we sure it is correct)? Or are they just a discussion by the authors to showcase that in numerous situations their system makes sound inferences, if so, why are these inferences (especially?) interesting in this context?
This ends my biggest criticism. Now a list of minor points starts (although some are still important).
Equality: if I understand correctly, the solution of the authors to treat equality between instants is to state that they are reciprocally end and beginning of the themselves. Why not a discussion of other possibilities?
Inference, validation, and consistency. The authors talk about validation. This is in fact the name associated to classical SHACL tasks, that is, there is some data, and this data must be validated against a schema. However, what the authors do here is much different: they develop a whole inference system that deduces new facts and find inconsistencies. At this point, does it still make sense of talking about validation instead of consistency checking?
No comparison with other rule systems: the authors de-facto develop a rule-based inference system. However, they do not reference the literature about rule systems (e.g. logic programming, prolog, etc.) except for saying that SWRL is not enough expressive to do some relevant tasks. Given that the paper is 50 pages long, and only two are dedicated to the bibliography, I think that it would be helpful to engage somewhat more with the relevant literature. In fact, the rule system as developed has many weird aspects. One is that the syntax is obnoxiously painful to read, why not opting for something similar to prolog, or classical predicate logic? One could then translate everything in SPARQL CONSTRUCT queries if so desired.
Another is that there is a "focus" on some part of the rule body, determined by the SHACL targeting system, is it useful somehow or could it be removed?
Another is the separation between rules and shapes. In my understending, both are rules, the difference is that the shapes are exactly the rules that will rise an inconsistency, and they are also precisely either rules with no consequent (e.g. A & B -> false, or A & B & C -> false), or rules whose consequent is a statement about the order or equality of xsd literals (e.g. A & B & ... -> t1 = t2 where t1 and t2 are literals). The reason not to include the former type of shapes as rules would be not to deal with negation, I assume. But the statements between literals in the second type of shapes are implemented by using SPARQL filer statements. In my opinion this is very convoluted, and it looks like an exercise in trying to push SHACL and SPARQL to the limit of things that they are probably not especially good to do.
In fact, about this latter point, the authors highlight that the W3C non-normative suggestion would be to first do SHACL validation and run inference, while the author's suggestion is to do the opposite. I can see way the suggestion is to first do the SHACL validation: you can use SHACL to validate data, e.g. when the data is put into in an information system.
Why is SHACL used at all? Continuing from the last point, if one really wishes to do reasoning by triple materialization using SPARCL CONSTRUCT queries, one can dispense of SHACL completely: just replace any SHACL shape of form "for each result r of the query Q raise a warning W(r)" with a construct query adding e.g. the triples "[] a :Inconsistency; rdfs:comment "a contradiction has been found, here is the likely cause: W(r)" " for each match r of the query, and stop the while loop whenever an :Inconsistency is found.
The abstract says "This paper presents a novel framework for validating the Time Ontology" however the paper presents a framework to do inference with the Time Ontology, it does not validate the ontology (e.g. it does not say that the time ontology is good, or bad, correct or incorrect).
"Individuals of Instant refer to exact moments in time while individuals of Interval refer to spans of infinite and contiguous instants between a start and an end instant." Maybe, maybe not, in fact Allen has argued against exact moments in time. Also "infinite" and "contiguous" is probably a contradiction (what would be an example of a couple of two contiguous real numbers?).
In passing, rule 26 says:
sh:targetSubjectsOf time:intervalStarts;
CONSTRUCT{?b1 time:before ?i2}
WHERE{$this time:intervalStarts/(time:hasEnd|time:inside) ?i2.
$this time:hasBeginning ?b1}
but is probably meant to say
sh:targetSubjectsOf time:intervalStarts;
CONSTRUCT{?b1 time:before ?i2}
WHERE{$this time:intervalStarts/time:hasBeginning ?i2.
$this (time:hasEnd|time:inside) ?b1}
otherwise it does not refer to Figure 17.
|