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

Wrong wrapper for isl_ast_op_type_print_macro #70

Open
thisiscam opened this issue Oct 19, 2021 · 2 comments
Open

Wrong wrapper for isl_ast_op_type_print_macro #70

thisiscam opened this issue Oct 19, 2021 · 2 comments

Comments

@thisiscam
Copy link
Contributor

I noticed that the ISL function isl_ast_op_type_print_macro got parsed into the wrong class:
https://documen.tician.de/islpy/ref_ast.html?highlight=op_type_print_macro#islpy.AstExpr.op_type_print_macro.

I'm leaving an issue here since I'm not sure what's the best approach to fix it.

@inducer
Copy link
Owner

inducer commented Oct 20, 2021

Hack this logic:

islpy/gen_wrap.py

Lines 636 to 648 in a5c7df5

if class_name is not None:
name = name[len(class_name)+1:]
else:
if name.startswith("bool_"):
return
if name.startswith("options_"):
class_name = "ctx"
name = name[len("options_"):]
elif name.startswith("equality_") or name.startswith("inequality_"):
class_name = "constraint"
elif name == "ast_op_type_set_print_name":
class_name = "printer"
name = "ast_op_type_set_print_name"

@thisiscam
Copy link
Contributor Author

thisiscam commented Oct 22, 2021

Hmm, hacking this naively (similar to line 646) doesn't seem to work because ast_op_type is an enum, and the argument order is reversed compared to ast_op_type_set_print_name .

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

2 participants