// guess the programming language of the day

$ whois datalog

Datalog

first released in 1977 · by Hervé Gallaire, Jack Minker, Jean-Marie Nicolas

$ guessprog --inspect datalog

year
1977
paradigm
logic
family
prolog
memory
automatic gc
binding
dynamic
safety
strong

DATALOG(7)

AUTHORS
Hervé Gallaire, Jack Minker, Jean-Marie Nicolas
HISTORY
Datalog grew out of research on logic and databases in the late 1970s, notably the 1977 workshop on Logic and Data Bases organised in Toulouse by Hervé Gallaire, Jack Minker and Jean-Marie Nicolas. It is essentially a restricted subset of Prolog: no function symbols and no side effects, so every program is guaranteed to terminate. That makes it a natural query language for deductive databases, able to express recursive queries such as transitive closure that classic SQL could not. The name itself was coined later, in the 1980s.
USAGE
Datalog is a family of languages rather than a single product. It is niche but alive: it powers static program analysis tools such as Soufflé and Doop, inspired the QL language behind GitHub's CodeQL, and is used in database research and some query engines.
SEE ALSO
Datalog on Wikipedia ↗
$ cat ancestors.dl
% Facts
parent(alice, bob).
parent(bob, carol).
parent(carol, dave).

% Rules: ancestor is the transitive closure of parent
ancestor(X, Y) :- parent(X, Y).
ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).

% Query: who descends from alice?
?- ancestor(alice, Who).