Information Technology Reference
In-Depth Information
Knowledge Base 1.
MLN for object-activity relationship
1: //
define variables and constants
2: object =
{
Floor, Chair, Sofa, Worktop, Microwave, Dtable, TV, Computer, Other
}
3: act =
{
Walking, Standing, Sitting, Lying, Cutting, Scrambling, Eating, Typing,
Watching, OpenClose
}
4:
5: //
predicate declaration
6: After(time,time)
7: Hasact(act,time)
8: Hastype(object,time)
9:
10: //
formulas
11: 1 (ac!=ac')
∧
Hasact(ac,t)
⇒¬
Hasact(ac',t)
12: 1
∀
t
∃
ac Hasact(ac,t)
13: 1 (ob!=ob')
∧
Hastype(ob,t)
⇒¬
Hastype(ob',t)
14: 1
∀
t
∃
ob Hastype(ob,t)
15:
16: //
floor
17:
p
1
Hastype(Other,t1)
∧
Hasact(Walking,t2)
∧
After(t2,t1)
⇒
Hastype(Floor,t2)
18: //
sitting and lying activities
19:
p
2
Hastype(Other,t1)
∧
Hasact(Sitting,t2)
∧
After(t2,t1)
⇒
Hastype(Chair,t2)
20:
p
3
Hastype(Other,t1)
∧
Hasact(Lying,t2)
∧
After(t2,t1)
⇒
Hastype(Sofa,t2)
21:
p
4
Hastype(Chair,t1)
∧
Hasact(Lying,t2)
∧
After(t2,t1)
⇒
Hastype(Sofa,t2)
22: 1 Hastype(Sofa,t1)
∧
Hasact(Sitting,t2)
∧
After(t2,t1)
⇒
Hastype(Sofa,t2)
23: 1 Hastype(Dtable,t1)
∧
Hasact(Sitting,t2)
∧
After(t2,t1)
⇒
Hastype(Dtable,t2)
24:
25: //
kitchen
26:
p
5
Hastype(Other,t1)
∧
Hasact(Cutting,t2)
∧
After(t2,t1)
⇒
Hastype(Worktop,t2)
27:
p
6
Hastype(Other,t1)
∧
Hasact(Scrambling,t2)
∧
After(t2,t1)
28:
⇒
Hastype(Worktop,t2)
29:
p
7
Hastype(Other,t1)
∧
Hasact(OpenClose,t2)
∧
After(t2,t1)
⇒
Hastype(Microwave,t2)
30:
31:
32: //
dining table
33:
p
8
Hastype(Other,t1)
∧
Hasact(Eating,t2)
∧
After(t2,t1)
⇒
Hastype(Dtable,t2)
34: //
living room
35:
p
9
Hastype(Other,t1)
∧
Hasact(Watching,t2)
∧
After(t2,t1)
⇒
Hastype(TV,t2)
36: //
study room
37:
p
10
Hastype(Other,t1)
∧
Hasact(Typing,t2)
∧
After(t2,t1)
⇒
Hastype(Computer,t2)
Search WWH ::
Custom Search