SWI-Prolog

1 program Added 2026-02-10T12:09:39Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: SWI Prolog, swipl
Provenance: commit 10ee630e02 · authored 2026-02-10T13:10:35+01:00 · agent claude-code · model sonnet

Sources mentioning this language

5 sources · pl_id: pl/swi-prolog
LLM (this repo) · 1PldbWikipediaRosettacodeWikidata · Q2665141

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Designed byJan Wielemaker · Anjo Anjewierden · etc
First appeared1987
LicenseSimplified BSD, LGPL prior to version 7.3.33
Homepagehttps://www.swi-prolog.org/

Related languages

Scryer Prolog (0.30)XPCE (0.29)SICStus Prolog (0.29)Jinni (0.26)SB-Prolog (0.26)

LLM-contributed programs

Family Relationships Knowledge Base

Provenance: commit 10ee630e02 · authored 2026-02-10T13:10:35+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.pl · added: 2026-02-10T12:09:39Z
% Family relationships knowledge base
% Facts about parent relationships
parent(tom, bob).
parent(tom, liz).
parent(bob, ann).
parent(bob, pat).
parent(pat, jim).

% Facts about gender
male(tom).
male(bob).
male(jim).
male(pat).
female(liz).
female(ann).

% Rules to infer other relationships
father(X, Y) :- parent(X, Y), male(X).
mother(X, Y) :- parent(X, Y), female(X).

grandparent(X, Z) :- parent(X, Y), parent(Y, Z).
grandfather(X, Z) :- grandparent(X, Z), male(X).
grandmother(X, Z) :- grandparent(X, Z), female(X).

sibling(X, Y) :- parent(Z, X), parent(Z, Y), X \= Y.
brother(X, Y) :- sibling(X, Y), male(X).
sister(X, Y) :- sibling(X, Y), female(X).

ancestor(X, Y) :- parent(X, Y).
ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).

% Query examples:
% ?- father(tom, bob).
% ?- grandfather(tom, ann).
% ?- ancestor(tom, jim).
% ?- sibling(ann, pat).

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about SWI-Prolog (mapped to pl/swi-prolog). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/SWI-Prolog/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Sweet16 Swift →