Download src/prolog/kernels/structural_digest.pl from Snapkitty/icp-dag-crystallizer: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/Snapkitty/icp-dag-crystallizer/resolve/main/src/prolog/kernels/structural_digest.pl
- Command line
-
hf download hf://Snapkitty/icp-dag-crystallizer/src/prolog/kernels/structural_digest.pl
-
curl -L -o structural_digest.pl https://huggingface.co/Snapkitty/icp-dag-crystallizer/resolve/main/src/prolog/kernels/structural_digest.pl
1.08 kB
| %% SPDX-License-Identifier: LicenseRef-Sovereign-Leviathan-SL-AGPL3-001 | |
| %% Copyright (C) 2026 SNAPKITTYWEST / Sovereign Kernel Project | |
| %% CLONE_GATE: icp-dag-crystallizer::prolog::kernels::structural_digest | |
| %% | |
| %% K4: Structural digest β content-addressed canonical form | |
| %% Domain: content-addressing | Purity: pure | |
| :- module(structural_digest, [ | |
| canonical_kernel/2, | |
| structural_digest/2 | |
| ]). | |
| :- use_module(library(crypto)). | |
| canonical_kernel(K, canonical(K, SigSet, DepSet)) :- | |
| findall(S, semantic_signature(K, S), Sigs), | |
| sort(Sigs, SigSet), | |
| findall(D, dependency_signature(K, D), Deps), | |
| sort(Deps, DepSet). | |
| structural_digest(K, Digest) :- | |
| canonical_kernel(K, Canonical), | |
| term_string(Canonical, String), | |
| crypto_data_hash(String, Digest, [algorithm(sha256), encoding(hex)]). | |
| %% ββ Stub predicates ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| :- discontiguous semantic_signature/2, dependency_signature/2. | |