BoiseState-AdaptLab / IEGenLib

Inspector/Executor Generation Library for manipulating sets and relations with uninterpreted function symbols.
BSD 2-Clause "Simplified" License
2 stars 4 forks source link

Function that creates a relation object to permute tuple variables ahead of codegen #161

Open cathieO opened 2 years ago

cathieO commented 2 years ago

Create a new function that is part of Set. It should return a Relation * R. when we do R->Apply(originalSet); We should get a valid ordering of the tuple variables for codegen.

So, what is a valid ordering? Say we have a set {[i,j,k,l]} If we start from l and projectOut the tuple variables one at a time, there should be no errors. If, at any point, there is an error, we need to move the tuple variables around. Specifically, the one that caused an error should be shifted closer to the front.