PEOPLE, CONNECTIONS & A LITTLE LOGIC
Every connection
tells a story.
Explore a family through Prolog. Trace ancestors, discover siblings, and see how one new fact changes the picture.
THE BIG PICTURE
A family, connected.
No relationships yet. Add a parent and child below.
Known relationships
Facts and the diagram come from the running Prolog engine.
FOLLOW YOUR CURIOSITY
Ask the family.
Answers 0
A question is the start
of a discovery.
Prolog output
GROW THE STORY
Add a connection.
Start with two names.
Prolog will work out the rest.
Under the hood Small Prolog rules. An independent browser UI.
The diagram reads relationship(Role, Parent, Child) from the
same session used by your queries. The form calls
add_relationship/3 and remove_relationship/3.
Prolog rejects self-parenting and cycles; no family reasoning is implemented
in JavaScript.
Queries return one answer at a time. Next resumes alternatives; Stop discards them. The diagram refreshes once a query finishes or is stopped. You can also query or update facts directly; a raw query can bypass the form’s validation.
The interface is programmed in
genealogist_ui.pl
using library(dom). Prolog draws the SVG diagram, builds answer
cards, binds form and keyboard events, and calls the family predicates
directly. JavaScript handles browser startup and asynchronous query, input
and download operations.
This version runs Prolog on the browser UI thread with
library(dom) preloaded. Abort is cooperative: a non-yielding
goal can freeze the interface.
Open the Worker actor version ↗
to compare the same demo. Try direct DOM access in the query box: E :=
document[getElementById(#'output')], append_html(E, 'Hello from
Prolog'), then expand Prolog output.
Changes live in this page’s main-thread session and disappear on reload or closure. Save Prolog downloads the current facts with the rules. Other tabs have independent families. There is no server-side database or automatic storage.
Read the Prolog program ↗