12 lines
218 B
Plaintext
12 lines
218 B
Plaintext
|
|
# Existential rule example: each employee works in some department.
|
||
|
|
|
||
|
|
fact Employee(alice).
|
||
|
|
fact Employee(bob).
|
||
|
|
fact Employee(carol).
|
||
|
|
|
||
|
|
rule Employee(?X) -> WorksIn(?X, ?Dept).
|
||
|
|
|
||
|
|
run.
|
||
|
|
show facts
|
||
|
|
query WorksIn(?X, ?Dept)?
|