Skip to content

Research: small formal contract for canonical score transformations and explicit lossy boundaries #217

Open

Description

@PhysShell

Classification

P3 / bounded proof-engineering spike / no production rewrite. Inspect the current stage and stop if the planned acceptance tests/fuzz targets already cover this exact invariant.

Why

CreuSAT suggests a useful discipline: specify one algorithm's preconditions, postconditions and state invariants, test a deliberately broken variant, and label trust boundaries honestly. For griff, the boundary matters: per docs/SPEC.md, Guitar Pro/tab is source of truth; MIDI is lossy, so we must not assert that all Guitar Pro articulations/positions survive a MIDI round trip.

Pick one real pure seam

Potential targets, subject to code inspection:

  • A canonical Score/phrase slicing or shift/transpose operation: preserve event cardinality and relative timing where the operation's documented semantics require it, and preserve unrelated tracks.
  • Fixed-seed generation: determinism for identical canonical input and policy version, including observable provenance, without conflating different formats.
  • Swang lowering / program lifting: re-executed program agrees with the supported canonical projection, as required by ADR-0029.

Write an operation-specific contract. For import/export, specify the supported projection and require a typed loss report; do not prove impossible full MIDI↔Guitar Pro identity.

Experiment / acceptance

  1. Pin one existing function, types and current characterization/fuzz/issue coverage (Rerank provenance: preserve every candidate and record explicit rejection reasons #104 provenance, Guitar Pro Loss Observatory: support matrix, stable loss codes, corpus prevalence and minimized fixtures #105 loss observatory, Benchmark-first symbolic retrieval: hard constraints, ablations and curated relevance fixtures #107 retrieval, Swang (Swan Language): deterministic musical DSL, fractal pattern algebra and script-generating composers #108 Swang).
  2. Define the semantic property and supported domain; compare model and actual implementation on a finite generated corpus.
  3. Include at least one mutant that drops an event, shifts a beat or suppresses a loss report; capture a minimal counterexample.
  4. If worthwhile, try one tiny proof in the best-fitting Rust-facing method, but do not introduce Creusot/Verus into the workspace by default.
  5. Publish a short PROVED / TESTED / ASSUMED / UNMODELED matrix and STOP/KEEP verdict.

Reference: https://github.com/sarsko/CreuSAT.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions