AnsProlog

1 program Added 2026-03-13T05:25:22Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Answer Set Prolog, A-Prolog
Provenance: commit dee9d11861 · authored 2026-03-13T06:25:54+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

ASP (0.39)Clingo (0.31)YAP (0.24)YAP Prolog (0.24)mu-Prolog (0.23)

LLM-contributed programs

Graph 3-Coloring

Provenance: commit dee9d11861 · authored 2026-03-13T06:25:54+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.lp · added: 2026-03-13T05:25:22Z
% 3-Graph Coloring in AnsProlog
% Based on the classic AnsProlog encoding by Gelfond and Leone

node(a). node(b). node(c). node(d). node(e).
edge(a,b). edge(b,c). edge(c,d). edge(d,e). edge(e,a). edge(a,c).

color(red). color(green). color(blue).

1 { assign(N,C) : color(C) } 1 :- node(N).

:- edge(N1,N2), assign(N1,C), assign(N2,C).

#show assign/2.

Contribute — propose a file extension

Tell us where to find evidence about AnsProlog (mapped to pl/ansprolog). 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/AnsProlog/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Ansible Answer Set Programming →