-
Notifications
You must be signed in to change notification settings - Fork 0
/
dtou-lang3-reasoning-conflict2.n3s
88 lines (78 loc) · 1.9 KB
/
dtou-lang3-reasoning-conflict2.n3s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
@prefix : <http://example.org/ns#>.
######
# Reasoning rules
######
# RelatedDataAppInput
(_:usage _:data _:app _:input _:ai _:u) log:onNegativeSurface {
_:usage a :UsageContext;
:app _:ai.
_:ai :policy _:app.
_:app a :AppPolicy;
:input_spec _:input.
_:data a :Data;
:uri _:u.
_:input :data _:u.
() log:onNegativeSurface {
_:m a :RelatedDataAppInput;
:usage _:usage;
:data _:data;
:app _:app;
:input _:input.
}.
}.
## Real Type (of Tagging) -- the type without any subtype. This is a helper for OutputTagging.
(_:x _:T) log:onNegativeSurface {
_:x a :Tagging;
:type _:T.
(_:t2 _:scope) log:onPositiveSurface {
(
()
{
_:x :type _:t2.
_:t2 rdfs:subClassOf _:T.
}
()
) log:collectAllIn (_:scope 1).
}.
() log:onNegativeSurface {
_:x :real_type _:T.
}.
}.
# UnmatchedExpectation
(_:x _:input _:data _:expect _:policy _:T _:N) log:onNegativeSurface {
_:x a :RelatedDataAppInput;
:input _:input;
:data _:data.
_:data :policy _:policy.
_:input :expect _:expect.
_:expect
:type _:T;
:name _:N.
(_:tag _:scope) log:onPositiveSurface {
( () {
_:policy :tag _:tag.
_:tag
:real_type _:T;
:name _:N.
} ()) log:collectAllIn (_:scope 2).
}.
# (_:tag _:scope) log:onPositiveSurface {
# _:scope log:notIncludes {
# _:policy :tag _:tag.
# _:tag
# :real_type _:T;
# :name _:N.
# }.
# }.
() log:onNegativeSurface {
_:m a :UnmatchedExpectation;
:input _:input;
:data _:data;
:type _:T;
:name _:N.
}.
}.
:UnmatchedExpectation rdfs:subClassOf :Conflict.