Skip to main content

Module compare

Module compare 

Source
Expand description

Behavioral comparison of canonical Workshop programs.

equivalent reports whether two Programs behave the same and difference returns the first behavior-relevant difference. This is the comparison behind source-language reconstruction contracts such as Workshop→OPY: reconstruction is judged by behavior, not by structural identity. crate::roundtrip::equivalent remains the strict structural check.

Structs§

Difference
The first behavior-relevant difference difference found.

Enums§

DeclarationTable
A declaration table in a Program.
DifferenceKind
What differs at a Difference’s location.
PathStep
One step from a compared element to the differing child element.
ProgramSide
Which program of a difference pair a report refers to.

Functions§

difference
The first behavior-relevant difference between first and second under this module’s comparison contract, or None when the programs are equivalent.
equivalent
Whether two programs are behaviorally equivalent under this module’s comparison contract.