Skip to content

Update transformations to check for None value#830

Draft
IgnaceBleukx wants to merge 3 commits intomasterfrom
cumulative_subexpr
Draft

Update transformations to check for None value#830
IgnaceBleukx wants to merge 3 commits intomasterfrom
cumulative_subexpr

Conversation

@IgnaceBleukx
Copy link
Collaborator

Fixes #828; not sure if this is the best way to do it, but seems like the most obvious for now.

@IgnaceBleukx IgnaceBleukx marked this pull request as ready for review January 21, 2026 02:10
@IgnaceBleukx IgnaceBleukx requested a review from ThomSerg January 26, 2026 08:24
@tias tias marked this pull request as draft February 4, 2026 21:05
@tias
Copy link
Collaborator

tias commented Feb 4, 2026

It doesn't feel the right way, but haven't further looked into it.

@IgnaceBleukx
Copy link
Collaborator Author

Now that I think about it, probably the right way of doing this, is to let the expressions decide which arguments should recusively be transformed.
E.g., each expression would get a get_expr_args and update_expr_args function, which returns the arguments that could be an expression. This will have a few advantages: for e.g., Table, we won't ever recurse into the table, even if the array contains subexpression (and thus has_subexpr will be True).
For Cumulative, we could just return [start,dur,height,capacity] if the end variable is None.

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.

None argument in Cumulative (demand) not allowed by safening

2 participants