-
Notifications
You must be signed in to change notification settings - Fork 183
rework recursive solver for better integration into an expanded version of salsa #708
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
rework recursive solver for better integration into an expanded version of salsa #708
Conversation
This reverts commit d05412f.
It turns out we only use this when we are comparing multiple program clauses.
r? @jackh726 -- probably worth merging this in pieces. I think my next step is probably to create a distinct crate and mix/match the traits a bit but I'm not sure. |
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.
Sorry it took me so long to look at this.
A couple thoughts but overall LGTM and r=me
max_size: usize, | ||
} | ||
|
||
pub(super) trait SolverStuff<K, V>: Copy |
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.
"Stuff" 🤣 maybe a more meaning for name might be better? I can't think of one atm.
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.
lol, yes, I plan to rename this eventually =) I wasn't 100% sure what this interface was going to look like though so I left it for now.
|
||
/// The maximum size for goals. | ||
max_size: usize, | ||
} |
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.
Where is this used? This doesn't seem like the right place for this logically...
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.
The field is used to truncate goals and things.
Hmm, you're not wrong. We should eventually factor RecursiveContext
into "local state" and "global state" -- the cache and max-size are both "global state". The "stack" and "search graph" are "local state" (there could be multiple copies of them).
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.
Well, truncation doesn't feel like logic that the "fixed state" portion of the solver should be doing. More so, where we get answers and such.
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.
Truncation is part of the fixed state -- it is a "deep property". i.e., if you are solving goal A, and it has a bunch of sub-goals, and some of them get truncated, the results you get for A are affected.
Going to merge this. Better to not let this bitrot. @bors r+ |
📌 Commit 8ce0360 has been approved by |
☀️ Test successful - checks-actions |
The overall plan is described here. I should probably move that into a tracking issue or project board or something. =)
This branch so far contains: