JudgeD:
Probabilistic Datalog
Brend Wanders,
Maurice van Keulen,
Jan Flokstra
(University of Twente)

(Use arrow keys to navigate. f to go fullscreen.)

PART I

Datalog 101

Facts, Rules and Queries

shape(, triangle).
shape(, triangle).
shape(, rectangle).
shape(, circle).

corners(triangle, 3).
corners(rectangle, 4).
corners(circle, 0).
query(C,S) :- shape(S, T), corners(T,C).
query(3, X)?

Reasoning

Safety First

Practical Applications

Practical Applications, cont'd.

PART II

Probabilistic Datalog

Coin Toss

coin(c1).

result(c1, heads).
result(c1, tails).

result(c1, X)?
Result:
result(c1, heads).
result(c1, tails).

Coin Toss, cont'd.

coin(c1).

result(c1, heads) [x=1].
result(c1, tails) [x=2].

@uniform p(x).

result(c1, X)?
Result:

% iterations: 1000
% root-mean-square error: 0.01570031846810759
result(c1, heads). % p = 0.499
result(c1, tails). % p = 0.501

Confusing Authors

Possible Worlds

Confusing Authors

% Known facts:
name(purple, "Brend") [u=1].
name(orange, "Jan")   [u=2].
address(purple, "b.wanders@utwente.nl")    [v=1].
address(orange, "jan.flokstra@utwente.nl") [v=2].

% Reconstruct authors:

author(ID, N, A) :- name(ID, N), address(ID, A) [z=2].
author(solo, N, A) :- name(_, N), address(_, A) [z=1].

% Detail predicates for querying:

actual_name(P, N)    :- author(P, N, _).
actual_address(P, A) :- author(P, _, A).
actual_person(P)     :- author(P, _, _).

Demo

Probability Calculations

Monte Carlo approximation

Exact

That's all folks!

/