DDlog
1 program
Added 2026-02-16T14:40:56Z
Agent: claude-codeModel: sonnetWebSearch: enabled
Evidence
Report issue
View issues
Aliases: Differential Datalog
Provenance: commit d2185ab7e7 · authored 2026-02-16T15:41:52+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/differential-datalogRelated languages
LLM-contributed programs
Host-to-Subnet Mapping
Provenance: commit d2185ab7e7 · authored 2026-02-16T15:41:52+01:00 · agent claude-code · model sonnet · WebSearch enabled
// Type aliases for network addresses
typedef UUID = bit<128>
typedef IP4 = bit<32>
typedef NetMask = bit<32>
// Input relations for hosts and subnets
input relation Host(id: UUID, name: string, ip: IP4)
input relation Subnet(id: UUID, prefix: IP4, mask: NetMask)
// Output relation mapping hosts to subnets
output relation HostInSubnet(host: UUID, subnet: UUID)
// Rule: compute host-to-subnet mappings using bitwise filtering
HostInSubnet(host_id, subnet_id) :-
Host(host_id, _, host_ip),
Subnet(subnet_id, subnet_prefix, subnet_mask),
((host_ip & subnet_mask) == subnet_prefix).
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.)