This PR adds a tree schema that can support both shared terms and unique terms.
Compared to tree_unique:
Adds a new variant of Id called Shared, which can be used for shared terms
Adds a test in the id analysis to prevent mixing shared and unique ids in terms
Adds ids to branches of switch statements, allowing for path-condition based optimizations. Switch statements must now have Branches as children. Adds a test that ensures this.
Deletes most optimizations, but keeps most utility
Adds IsValidShared and IsValidUnique, subsets of IsValid for shared and not-shared optimizations.
IsValid = IsValidShared \union IsValidUnique
This PR adds a tree schema that can support both shared terms and unique terms. Compared to
tree_unique
:Id
calledShared
, which can be used for shared termsSwitch
statements must now haveBranches
as children. Adds a test that ensures this.IsValidShared
andIsValidUnique
, subsets ofIsValid
for shared and not-shared optimizations.IsValid = IsValidShared \union IsValidUnique