DLV2

1 program Added 2026-03-13T01:57:34Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: DLV 2
Provenance: commit f595bed8e0 · authored 2026-03-13T02:58:08+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

EXEC 2 (0.12)D (0.12)D2 (0.11)GEORGE 2 (0.11)Inform 2 (0.11)

LLM-contributed programs

Hamiltonian Cycle

Provenance: commit f595bed8e0 · authored 2026-03-13T02:58:08+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.dlv · added: 2026-03-13T01:57:34Z
% Hamiltonian Cycle in DLV2 (ASP-Core-2 syntax)
node(1..5).
edge(1,2). edge(2,3). edge(3,4). edge(4,5). edge(5,1). edge(1,3). edge(2,4).

% Guess an in-subgraph
{in(X,Y)} :- edge(X,Y).

% Each node has exactly one outgoing in-edge
:- node(X), #count{Y : in(X,Y)} != 1.

% Each node has exactly one incoming in-edge
:- node(X), #count{Y : in(Y,X)} != 1.

% The in-subgraph is connected (reachability from node 1)
reached(1).
reached(Y) :- reached(X), in(X,Y).
:- node(X), not reached(X).

Contribute — propose a file extension

Tell us where to find evidence about DLV2 (mapped to pl/dlv2). 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/DLV2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← DLV dlvm →