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

Expanded commutativity of operators #130

Open
lukesg08 opened this issue Aug 15, 2024 · 0 comments
Open

Expanded commutativity of operators #130

lukesg08 opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lukesg08
Copy link
Collaborator

At some point, we might want a reckless commutativity flag for AST matching. Currently, CAIT only supports adjacent commutativity on the same ast level because in theory, even things like addition are not technically commutative in python in cases where a function foo might mutate a reference where order would in such case matter
foo(reference_a) + foo(reference_a).

a more reckless commutativity would allow for vertical stretching of the tree instead of simply horizontal stretching of the tree. However, this really only makes sense in terms of arithmetic operators. But having a flag to enable such vertical stretching on BinOps could be useful, but a bit large of an undertaking.

@lukesg08 lukesg08 added the enhancement New feature or request label Aug 15, 2024
@lukesg08 lukesg08 self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant