-
Notifications
You must be signed in to change notification settings - Fork 166
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
Implementing get argument through design 1 #2399
Conversation
There are 4 statements in total we need to consider as pointed out in the pr
Once we do these we should be good to go. |
I think it's fine, let's get this PR to fully work. That gets something going. We can later iterate on it and do another design and compare if it is simpler, but the most important thing is to get something working, to unblock us. So this PR seems fine. |
I have a doubt. I was adding a test for the same but this is what I discover. Consdier we have
Through
But I think through
This gives back Rest binary operators like |
Yes, this is another issue: the order of arguments for addition. This is determined by the hash table inside SymEngine. We could sort them lexicographically, but this will make it even more slower. Let's investigate Mathematica, if it keeps a stable order of arguments. The way I would write the tests for now is to check that it returns TODO for this PR:
|
|
||
// Define necessary variables | ||
ASR::ttype_t* CPtr_type = ASRUtils::TYPE(ASR::make_CPtr_t(al, loc)); | ||
std::string args_str = current_scope->get_unique_name("_lcompilers_symbolic_argument_container"); |
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.
I went over the code again and everything looks fine to me. If you have any other name for our argument container other than what I've used, you could let me know.
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.
I think this looks good, thanks!
This pr is essentially trying to achieve the same thing as #2396 through a different design (Design 1 from #2393 which is #2393 (comment))
So essentially we can do something like the following