Skip to content

v2.7.1

  • v2.7.1
  • eb9b033
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v2.7.1
  • eb9b033
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@sidprasad sidprasad tagged this 08 Jun 14:07
* Add Pyret structural reify/replit + Tier-A fidelity harness

reify/replit reconstruct a value from a PyretDataInstance's atoms+relations
(the inverse of relationalization, not a reprint of the live value), plus a
self-contained harness that measures round-trip fidelity with no Pyret runtime.

Building blocks (src/data-instance/pyret/, exported from src/index.ts):
- reify.ts   reifyToValue(di) -> synthetic PyretObject (re-relationalizable;
             sharing/cycles preserved via JS object identity)
- replit.ts  replit(di) -> REPL-equivalent string (the repr(reify(...)) analog)
- canon.ts   canon(di) -> rename-invariant canonical form of a data instance

Measurement (tests/pyret/):
- oracles.ts  Tier A: fixedPoint = canon(rel(v))==canon(rel(reify(rel(v))));
              relInjective = canon(rel(a))!=canon(rel(b)) for distinct a,b
- corpus.ts   T0-T5 values + discriminator pairs
- report.ts   score matrix + violations
- pyret-fidelity.test.ts

Results: fixed-point 2020/2020 (incl. 2000 fuzz, sharing DAGs, cycles),
rel-injectivity 9/9. Tier B (R-eq/R-inspect via the live runtime) is future
work and needs an IDE-side harness.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Stop dropping relations that share a name

Relation names are not unique — only the qualified id (Sig<:label) is —
so two relations with the same name (e.g. the Next fields from two
util/ordering instantiations) collided in name-keyed code.

- reify(): union the tuples of same-named relations into the INST instead
  of letting the last clobber the rest.
- getInstanceRelation / addInstanceRelationTuple: the name-based fallbacks
  now warn when a name resolves ambiguously rather than silently using
  whichever relation comes first.

Adds a reify regression over sample/alloy-odd-xml/emm3.xml.

Refs #470. Related: sidprasad/simple-graph-query#55

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ?

* .

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Assets 2
Loading