CLP(R)

1 program Added 2026-02-12T12:40:03Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: Constraint Logic Programming over Reals
Provenance: commit 8c4cb8093b · authored 2026-02-12T13:40:55+01:00 · agent claude-code · model sonnet

Sources mentioning this language

3 sources · pl_id: pl/clp-r
LLM (this repo) · 1WikipediaWikidata · Q5012783

Related languages

Prolog (0.31)PROGOL (0.28)Ladder Diagram (0.25)CHIP (0.24)CHR (0.22)

LLM-contributed programs

Pythagorean Triple Solver

Provenance: commit 8c4cb8093b · authored 2026-02-12T13:40:55+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.pl · added: 2026-02-12T12:40:03Z
% Pythagorean triple solver using CLP(R)
% Finds integer solutions to a^2 + b^2 = c^2

pythagorean(A, B, C) :-
    A >= 1,
    B >= A,
    C >= B,
    A * A + B * B = C * C,
    A =< 20,
    B =< 20,
    C =< 25.

% Query example:
% ?- pythagorean(A, B, C).
% A = 3, B = 4, C = 5
% A = 5, B = 12, C = 13
% A = 8, B = 15, C = 17

% Rectangle area and perimeter constraint example
rectangle(Width, Height, Area, Perimeter) :-
    Width > 0,
    Height > 0,
    Area = Width * Height,
    Perimeter = 2 * (Width + Height).

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 CLP(R) (mapped to pl/clp-r). 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/CLP(R)/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Clozure CL clp-star →