YAP

1 program Added 2026-02-10T18:44:21.058215Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: YAP Prolog, Yet Another Prolog
Provenance: commit a826bf02fd · authored 2026-02-10T19:44:54+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/yap-prolog
LLM (this repo) · 1Pldb

Related languages

YAP Prolog (1.00)Yab (0.35)Yash (0.35)YASM (0.33)YANG (0.30)

LLM-contributed programs

Factorial

Provenance: commit a826bf02fd · authored 2026-02-10T19:44:54+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.pl · added: 2026-02-10T18:44:34.349283Z
% Factorial implementation in YAP Prolog
% From YAP documentation examples

factorial(0, 1) :- !.
factorial(N, F) :-
    N > 0,
    N1 is N - 1,
    factorial(N1, F1),
    F is N * F1.

% Query examples:
% ?- factorial(5, X).
% X = 120
%
% ?- factorial(10, X).
% X = 3628800

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 YAP (mapped to pl/yap-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/YAP/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← YANG YAP Prolog →