v0.7.3
Added
find_correspondences,best_correspondence, and the
Correspondencerecord wrap panproto's hom search
(find_morphisms/find_best_morphism). Given two panproto
Schemas, the search enumerates structure-preserving vertex maps,
scored by alignment quality, withanchorsto pin known pairings
andmonic/epic/isoto constrain the map's shape. A
discoveredCorrespondence.vertex_maphas exactly the
dict[str, str]shape that
DependentLens.auto_generate_with_hintstakes ashints, so
the two compose into a discover-then-derive pipeline (documented in
the lenses guide). The search is informative on multi-vertex
schemas (hand-built protocol schemas, parse-recovered source
schemas); the single-vertex schemas didactic builds from Model
classes degenerate to the root pairing.
Changed
-
Minimum
panprotoversion raised from0.48.3to0.52.0.
The bump pulls in, with direct effect on didactic's surface:- The hom-search bindings (
find_morphisms,
find_best_morphism,TheoryMorphism,SchemaMorphism,
FoundMorphism) that back the new correspondence API. - The
emit_prettyrewrite (grammar-derived token roles, role-pair
spacing, structural bracket detection) and the emit-coverage sweep
that corpus-verifies the emit fixed-point law
(emit(parse(emit(s))) == emit(s)), covering every grammar the
panprotowheel ships. This is the engine behind
didactic.codegen.source.emit_prettyandModel.emit_as. get_builtin_protocolresolving tree-sitter grammar protocols
(get_builtin_protocol("python")succeeds instead of raising
KeyError).IdGeneratordisambiguation of repeated names at the same
scope, which unblocks parsing any Python source that uses
@typing.overloadthroughdidactic.codegen.source.parse.- Resynced
_native.pyistubs. didactic's typing follows:
DependentLens.auto_generate_with_hintsdeclares
hints: dict[str, str](wasobject), and the
TheorySpechandoff topanproto.create_theorynarrows
through a documented boundary cast (aTypedDictis assignable
toMapping[str, object]and to no narrower mapping, while the
resynced stub takesMapping[str, JsonValue]).
- The hom-search bindings (
Fixed
__version__strings match the released distribution version
across all four packages. The coredidactic.api.__version__and
the three sibling__init__modules lagged behind their
pyproject.tomlversions, sodidactic versionunder-reported.