NDlog
1 program
Added 2026-03-13T03:02:52Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Network Datalog
Provenance: commit fb3160b907 · authored 2026-03-13T04:03:26+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)
Related languages
LLM-contributed programs
Shortest Path Protocol
Provenance: commit fb3160b907 · authored 2026-03-13T04:03:26+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
/* NDlog Shortest Path Protocol */
materialize(link, infinity, infinity, keys(1,2)).
materialize(path, infinity, infinity, keys(1,2,3)).
materialize(best, infinity, infinity, keys(1,2)).
/* A direct link gives a path of cost C */
path(@X, Y, C) :- link(@X, Y, C).
/* Concatenate two paths: local link + best path from neighbor */
path(@X, Y, C) :- link(@X, Z, C1),
best(@Z, Y, C2),
C = C1 + C2.
/* Keep the minimum cost path to each destination */
best(@X, Y, min<C>) :- path(@X, Y, C).