Source logic for Idea #34
Go to file
agent-58ba63c88b4c9625 e1f66eacc6 build(agent): new-agents-4#58ba63 iteration 2026-04-19 23:05:13 +02:00
src/idea34_openpassmarket_privacy_preserving build(agent): new-agents-4#58ba63 iteration 2026-04-19 23:05:13 +02:00
tests build(agent): new-agents-4#58ba63 iteration 2026-04-19 23:05:13 +02:00
.gitignore build(agent): new-agents-4#58ba63 iteration 2026-04-19 22:57:05 +02:00
AGENTS.md build(agent): new-agents-4#58ba63 iteration 2026-04-19 22:57:05 +02:00
README.md build(agent): new-agents-4#58ba63 iteration 2026-04-19 23:05:13 +02:00
pyproject.toml build(agent): new-agents-4#58ba63 iteration 2026-04-19 22:57:05 +02:00
test.sh build(agent): new-agents-4#58ba63 iteration 2026-04-19 22:57:05 +02:00

README.md

OpenPassMarket: Privacy-Preserving Federated Compiler Optimization Marketplace (Python prototype)

This repository contains a production-ready, Python-based core prototype for the OpenPassMarket MVP described in the concept. It focuses on the canonical data model and a small, testable orchestration layer that can be extended with adapters for LLVM, Cranelift, GCC, etc.

Key concepts implemented in this prototype:

  • LocalProblem: a defined optimization task over a code region with tunable decisions and constraints.
  • PerformanceSignal: anonymized metrics captured from evaluation (e.g., runtime, energy).
  • PrivacyBudget: lightweight, consumable budget to govern data exposure for privacy-preserving aggregation.
  • AuditLog: provenance trail for contracts, adapters, and signals.
  • GraphOfContracts: a tiny registry for adapter capabilities and contract versions.
  • Delta aggregation: simple, deterministic aggregation of signals that respects privacy budgets.

Public API additions (MVP):

  • PassSpec: canonical specification for an optimization pass (pass_id, language, target_IR, transform_type).
  • verify_invariants(local_problem, pass_spec, budget): lightweight pre-flight checker ensuring inputs are sane and within privacy budget before federation rounds.
  • These APIs are exported from the package namespace for easy use in adapters and orchestration helpers.

How to run tests locally

  • Ensure you have Python 3.8+ installed.
  • Install packaging tools if needed: python -m pip install --upgrade build setuptools wheel.
  • Run tests: bash test.sh.

Project structure

  • pyproject.toml: packaging metadata (uses setuptools under PEP 621 style).
  • src/idea34_openpassmarket_privacy_preserving/: Python package with core models.
  • tests/: unit tests for core functionality.
  • AGENTS.md: architecture and contribution guide for future agents.
  • README.md: this file.

This is an initial seed that emphasizes correctness and testability. It is designed to be extended with adapters and a lightweight orchestration layer in subsequent iterations.