A language for building and querying world models.
The language has 2 parts: Build and Query.
obj <obj_name>
type <type_name>
rel <relation_name>
<type_name> <object_name>
Example:
obj x
type A
A x
An object can have multiple types. In which case use the following syntax:
<type1>+ <object>
<type2>+ <object>
<type3>+ <object>
Example:
obj x
type A
type B
type C
A+ x
B+ x
C+ x
Note: object will be create if it doesn't exist.
<type>! <object>
Example:
obj x
type A
A x
A! x
<object1> <relation> <object2>
Alternatively:
<relation> <object1> <object2>
Example:
obj x
obj y
rel like
x like y
# or: like x y
An object can be realted to multiple objects through the same relation. For such cases use the following syntax:
<object1> <relation>+ <object2>
<object1> <relation>+ <object3>
<object1> <relation>+ <object4>
Alternatively:
<relation>+ <object1> <object2>
<relation>+ <object1> <object3>
<relation>+ <object1> <object4>
Example:
obj x
obj a
obj b
obj c
rel has
x has+ a
x has+ b
x has+ c
<relation>! <object1> <object2>
Alternatively:
<object1> <relation>! <object2>
Example:
obj x
obj y
rel like
x like y
# or: like x y
x like! y
# or: like! x y