You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is recursion currently because we bumped into Rust borrowing issues with the following efficient logic
which may require changing Expr data structure with RefCells.
Logic that we need:
Fill up a queue with the parent node being first [select_field(select_field(a, b), c), select_field(a, b), identifier(a)]
Pop from back and push to the front of a stack of the current expression's inferred type, and keep assigning it.
Example:
Pop back to get identifier(a)
Try to pop_front inferred_type_stack, and if its None. Push front the identifier(a)'s inferred_type: Record(b -> Record(c -> u64))
Pop back from stack to get select_field(a, b)
Try to pop_front inferred_type_stack, and its Record(b -> Record(c -> u64)). Get the type of b and assign itself and push_front to stack.
Pop back from stack to get select_field(select_field(a, b), c)
Try to pop_front inferred_type_stack, and its Record(c -> u64). Get the type of c and assign itself and push to stack.
@jdegoes I would like a pair up to implement this or similar in Rust without changing Expr data structure. With changing Expr to RefCell (may Rc-RefCell I can see it working though. May be there is a better way that you may have an idea.
afsalthaj
changed the title
Avoid Recursive algorithm of type-pull-up and use queue & stack
Rib Robustness: Avoid Recursive algorithm of type-pull-up and use queue & stack
Sep 18, 2024
No description provided.
The text was updated successfully, but these errors were encountered: