Symbolic repairΒΆ
Symbolic repair computes edits that would make a failing node conform. Shifty returns a template with holes for values and choices between possible repairs. Your code supplies those values and choices.
from shifty.experimental import repair
session = repair.RepairSession(shapes, data)
failure = session.witnesses()[0]
tree = failure.repair_tree() # the edits that would fix it, with holes
print(tree.explain())
A fix for one node can break another, so session.gate(delta) validates
the whole patched graph before you accept an edit.
It works from Python, from the command line (shifty repair), and from
Rust.
Inspect the repair space, fill a template, check it, and apply it. |
|
Sessions, templates, holes, plans, deltas, and the gate. |
To test a repair tool against known answers, see Violation generation.