I discussed the following debuggers for C++:UBSan and Valgrind. And if I can get my Linux machine working, gdb. I started using LLDB on VSCode C++ and it was wonderful.
I was able to solve with the help of my mentors the compiler-time refactoring of the code. Each functionality within the coiterator now fully unwraps into a level check:
-
Computing the min_ik: we now ignore the unordered levels when we do this.
-
Advance_iter: we now ignore the unordered levels when we do this.
-
Compare: we now only compare the ordered levels and default to ‘true’ for unordered level comparisons.
The coiterator has the implicit assumption that only ordered levels are supported if there is a disjunctive merge. If there is a conjunctive merge, it must contain at least one ordered level and for all other unordered levels, they must have the `locate` function defined.
In order to make sure this is valid during compile-time, we want to implement a compile-time check during the instantiation of the coiterator. This was the initial goal of the PR, but since we uncovered a bunch of problems, we had to table it. Now that we have refactored the code into a more generalized state, we can revisit this compile-time check.
The way this is done is via fold expression most likely:
If:
* 1. the levels are all ordered (i.e. has the `is_ordered == True` property)
* 2. if any of the level are do not have the is_ordered property, it must have the locate
* function, else return False. Then do a check that `m_comparisonHelper` defines
* a conjunctive merge (i.e. AND operation).
* Otherwise, coiteration is not allowed.
The check with respect to `m_comparisonHelper` must be done for all unordered levels.