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

Stronger inference for Contains #50

Open
Whebon opened this issue May 6, 2024 · 0 comments
Open

Stronger inference for Contains #50

Whebon opened this issue May 6, 2024 · 0 comments

Comments

@Whebon
Copy link
Contributor

Whebon commented May 6, 2024

The Contains(rule) constraint does a dfs in the program tree and stores all holes that can contain can contain the target rule.

Additionally, each non-uniform hole is also stored in that list, even if that hole does not contain the target rule. This is because the children of a non-uniform hole are not instantiated yet and could potentially hold a 2. Depending on the grammar, this is either possible or not. The constraint could check this property and ignore holes that can, by grammar definition, never expand to the target rule.

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

No branches or pull requests

1 participant