-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree schema that supports shared and unique #296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (just skimmed).
Note: Before people start hacking on their optimizations, I think we should do follow-ups on this that implement typed args and lets/loops-are-lambdas.
Nit: I think the directory should be called tree
rather than tree_shared
. Then, once all optimizations are ported, we'll delete tree_unique_args
.
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