-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix issue #645 #675
fix issue #645 #675
Conversation
Given my current understanding of the
and insert separators on each concatenation when we change bitvectors:
and finally take the union of all positions that have a separator anywhere in the concatenation:
Up to this point I am fairly certain of my understanding. Now for the shaky part. I am not what happens with the equations afterwards, but this leads me to the first question: the name Another think I do not understand about these functions is that they seem to be able to construct unrelated sub-components of the same vector, when dealing with Looking at the functions that create variables, we never duplicate |
OK, I dug a little deeper in the code, and I can confirm that this fix is not correct, for a reason related to what I said above but I can't quite articulate yet. With the fix, I get
I have some heavily commented version of the code that explains how I got to that example and I will share, although I have some more digging to do. At least I can answer my own question regarding A/B/C variable classification above: the code generates a system of equations where the left-hand-side is pre-existing variables and the right-hand-side is a concatenation of fresh A/B/C variables. The A/B/C classification works as follow: on the right-hand-side, A variables appear at most once in the whole system. B variables appear in at most one equation, but can appear multiple times in that same equation. C variables appear at most once in each equation, but can appear in multiple equations. And this also gives a hint as to the proper fix for the issue: we must take into consideration the "link" between multiple occurences of the B variables (and only the B variables) when computing the pattern. |
After reading your review and the documentation you wrote in #683, I agree that the suggested fix is totally incorrect. From what I understand, a correct fix would be to rewrite The idea would be then, when creating the pattern, instead of taking lists of lists of sizes of variables, we would have more info, for example if the variable is a B variable or not and maybe its Id for substitution (?). Then when we encounter a B variable that was substituted and that fits into a pattern, we split that pattern. The annoying thing is that with this one, we will need to also be able identify the two new variables that are produced when splitting the original B variable, in case they get split in another iteration, and we end up having to substitute them too. So in a certain sens, it's as if we actually do the splittings here that we expect to have to do in the future, which seems like doing them twice but not necessarily. Anyway, I'm not sure, I'll write this one, the code will probably be clearer than the explication, then we'll see if there's a smarter way to do it. (funny how it seems that there is an implicit similarity or link to what was discussed in #680) |
I have a different implementation for this, I will send it out shortly (it was one of the fixes mentioned in #683 ) |
Alright, closing this one then. |
What it does is to re-slice everything if the pattern changed, similar to what is done for the c-substitutions (see |
Yes that was my issue with it as well. |
No description provided.