Skip to content
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

Contains Subtree Constraint #53

Merged
merged 21 commits into from
May 14, 2024
Merged

Contains Subtree Constraint #53

merged 21 commits into from
May 14, 2024

Conversation

Whebon
Copy link
Contributor

@Whebon Whebon commented May 8, 2024

  • Adds a new constraint: ContainsSubtree. This constraint enforces that a given subtree appears in the program tree at least once. This constraint also supports VarNodes. (e.g. RuleNode(3, [VarNode(:a), VarNode(:a)]) enforces that rule 3 is used two identical children at least once.)
  • Adds an optimization for LocalUnique: when propagated in the UniformSolver, it now caches the holes that potentially hold the target rule instead of traversing the tree on each repropagation.
  • Fixes minor bugs

@Whebon Whebon requested review from sebdumancic and ReubenJ May 8, 2024 14:59
@ReubenJ ReubenJ merged commit be8a0b6 into dev May 14, 2024
0 of 2 checks passed
@ReubenJ ReubenJ deleted the contains-subtree branch May 14, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants