Skip to main content

Reference compiler and evidence suite for finite path-dependent radix spaces

Project description

Path-Dependent Radix Spaces

PDRS compiles a finite dependent schema into an exact integer domain. Every valid structured object has one canonical rank in 0..N-1, and every rank decodes to exactly one valid object.

Version 0.3 adds independent C11 and Rust 2021 implementations and cross-language evidence. The paper itself remains outside this release scope.

Verified core

  • exact subtree cardinality
  • canonical rank and unrank
  • finite acyclic DAG support
  • deterministic schema hashes
  • uniform sampling by rank
  • exact disjoint worker partitions
  • iterative validation for deep schemas
  • explicit node, depth, range, and domain-bit limits
  • research structured-domain permutation adapter with authentication
  • independent Python, C, and Rust implementations of rank and unrank

Evidence bundle

The committed evidence covers:

  • 7 realistic schema families
  • 1,000 generated schemas
  • 254,609 Python-reference checks with zero rank/unrank failures
  • 389,754 exhaustive C and Rust round trips with zero failures
  • 22,096 deterministic cross-language vectors with zero mismatches
  • C compilation with strict warnings, AddressSanitizer, and UndefinedBehaviorSanitizer
  • Rust formatting, Clippy with warnings denied, and optimized release compilation
  • encoding density against local UPER-style packing, protobuf wire format, JSON, and naive fixed fields
  • controlled Python, C, and Rust runtime measurements
  • median native rank speedups of 49.4x for C and 62.7x for Rust relative to Python in the committed GitHub-runner dataset
  • median native unrank speedups of 136.5x for C and 38.8x for Rust relative to Python in the committed GitHub-runner dataset
  • 750,000 uniformity samples
  • 560 comparative fuzzing runs
  • 6 schema evolution mutations
  • single-bit fault injection
  • resource exhaustion and timing tests
  • 4 structured-domain permutation evaluations
  • 14 committed SVG graphs and 14 PNG copies
  • raw data, processed tables, environment metadata, and SHA-256 checksums

Read docs/EVIDENCE_REPORT.md, native/README.md, and results/processed/SUMMARY.md.

Reproduction

python -m pip install -r requirements-experiments.txt
PYTHONPATH=src python -m unittest discover -s tests -v
PYTHONPATH=src python scripts/verify_theorems.py --schemas 1000

for stage in correctness density runtime uniformity fuzzing schema_evolution fault_propagation scalability_and_timing crypto_adapter; do
  PYTHONPATH=src python scripts/run_full_experiments.py --stage "$stage"
done

PYTHONPATH=src python scripts/native_evidence.py prepare
make -C native/c
make -C native/c sanitize
cargo fmt --manifest-path native/rust/Cargo.toml -- --check
cargo clippy --manifest-path native/rust/Cargo.toml --all-targets -- -D warnings
cargo build --release --manifest-path native/rust/Cargo.toml
PYTHONPATH=src python scripts/native_evidence.py run \
  --c native/c/pdrs-c \
  --rust native/rust/target/release/pdrs-native \
  --iterations 200000

python scripts/assemble_evidence.py
PYTHONPATH=src python scripts/derive_tables.py
python scripts/assemble_evidence.py
python scripts/verify_evidence.py

Use --quick on every Python experiment stage for the CI-sized run, or run make evidence-quick.

Important boundaries

  • The proofs apply to the declared finite acyclic choice/range/terminal schema class.
  • Runtime and timing results are hardware, compiler, interpreter, and runner dependent.
  • The C and Rust engines consume a canonical IR emitted from validated JSON schemas rather than independently parsing the full JSON schema language.
  • Native cardinalities are currently limited to unsigned 64-bit domains; the Python reference supports arbitrary-precision cardinalities.
  • The protobuf comparison is a valid generic protobuf wire-format encoding, not a hand-optimized .proto for every schema.
  • The UPER comparison implements the relevant CHOICE and fully constrained whole-number subset, not the entire ASN.1 specification.
  • Dense ranks have weak intrinsic error detection and require checksums, authentication, or an outer integrity layer.
  • Rank stability under schema evolution is conditional. Early insertions can move every rank.
  • The included Feistel adapter is a research construction. It is not a standardized or deployment-ready encryption product.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdrs-0.2.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdrs-0.2.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file pdrs-0.2.0.tar.gz.

File metadata

  • Download URL: pdrs-0.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pdrs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b2da8c2dc1cba3afee2884f2b345873b5245c714675358ec8f60a9cc5d7abce9
MD5 7d40bf91b3722e329046a2c7b2920bf8
BLAKE2b-256 3d748c24c1540f5d44ab9d1cddf09728d81455b38b3914ee1ed5660584d0c240

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdrs-0.2.0.tar.gz:

Publisher: publish-pdrs.yml on abdullah-x-bd/PDRS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pdrs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pdrs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pdrs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3de4ae18addda5fff407f8a02f4e5f9c3d7a8fb4d880628285fb4b585634bb2c
MD5 05431efd1dad344fa76df3c20aa859c5
BLAKE2b-256 03c69bfba02ad6a66cdeeb7fee428f24304d92880b79ef1ab3a8c1f7795bea46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdrs-0.2.0-py3-none-any.whl:

Publisher: publish-pdrs.yml on abdullah-x-bd/PDRS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page