-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlikes.ruleml
53 lines (44 loc) · 977 Bytes
/
likes.ruleml
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
<?xml version="1.0" encoding="UTF-8"?>
<RuleML
xmlns="http://www.ruleml.org/0.91/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ruleml.org/0.91/xsd http://www.ruleml.org/0.91/xsd/datalog.xsd">
<!-- Clocksin/Mellish sample rule -->
<Assert mapClosure="universal">
<Implies>
<head>
<Atom>
<op><Rel>likes</Rel></op>
<Ind>John</Ind>
<Var>x</Var>
</Atom>
</head>
<body>
<Atom>
<op><Rel>likes</Rel></op>
<Var>x</Var>
<Ind>wine</Ind>
</Atom>
</body>
</Implies>
<Atom>
<op><Rel>likes</Rel></op>
<Ind>Mary</Ind>
<Ind>wine</Ind>
</Atom>
</Assert>
<Query>
<Atom>
<Rel>likes</Rel>
<Ind>John</Ind>
<Ind>whom</Ind>
</Atom>
</Query>
<Retract>
<Atom>
<Rel>likes</Rel>
<Ind>Mary</Ind>
<Ind>wine</Ind>
</Atom>
</Retract>
</RuleML>