Skip to content
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

Expanding Transitive Closure Involving Constraints on Sets and Relations #169

Open
tpops opened this issue Jan 14, 2022 · 1 comment
Open
Assignees

Comments

@tpops
Copy link
Member

tpops commented Jan 14, 2022

Transitive Closure

Currently we have transitive closure inplemented in IEGEnLib, can be found in SparseConstraints::TransitiveClosure. It builds terms as nodes in the graph and edges are relationships between each node- otherwise known as constraints. The algorithm uses floyd marshal algorithm as its core to perform a closure on the graph to discover new relationships. This also introduced a new theorem that will be available in a paper coming up. This theorem infers a new relationship by induction that seemed useful in Synthesis research

Current Limitation

A unique situation in synthesis exposed a limitation on current transitive closure. In summary transitive closure does not currently considers parameters to UFs especially equality constraints involving such parameters. A good example can be seen below

R:= { [n] -> [i, k] : i - row1(n) = 0 && k - P1(row1(n), col1(n)) = 0 && col1(n) - col2(k) = 0
 && n >= 0 && i >= 0 && col1(n) >= 0 && row1(n) >= 0 && k - rowptr(i) >= 0 && 
-n + NNZ - 1 >= 0 && -i + NR - 1 >= 0 && -k + rowptr(i + 1) - 1
     >= 0 && NC - col1(n) - 1 >= 0 && NR - row1(n) - 1 >= 0 }

Applying Closure on R will currently result to

TR:= { [n] -> [i, k] : i - P0(row1(n), col1(n)) = 0 && i - row1(n) = 0 && 
k - P1(row1(n), col1(n)) = 0 && P0(row1(n), col1(n)) - row1(n) = 0 && 
col1(n) - col2(k) = 0 && n >= 0 && i >= 0 && P0(row1(n), col1(n)) >= 0 &&
 col1(n)     >= 0 && col2(k) >= 0 && row1(n) >= 0 && -1 >= 0 && k - rowptr(i) >= 0 &&
 NC - 1 >= 0 && NNZ - 1 >= 0 && NR - 1 >= 0 && P1(row1(n), col1(n)) - rowptr(i) >= 0 &&
 -n + NNZ - 1 >= 0 && -i + NR - 1 >= 0 && -k + rowptr(i + 1) - 1 >= 0 &&
 NC - col1(n) - 1 >= 0 && NC - col2(k) - 1 >= 0 && NR - P0(row1(n), col1(n)) - 1 >= 0 &&
 NR - row1(n) - 1 >= 0 && -P1(row1(n), col1(n)) + rowptr(i + 1) - 1 >= 0 &&
 -rowptr(i) + rowptr(i + 1) - 1 >= 0 }

In the above example a constraint shows the relationship between i and row1(n). This relationship should lead to new nodes in the transitive closure graph that produce new relationships such as -k + rowptr(i + 1) - 1 >= 0 also becoming -k + rowptr(row1(n) + 1) - 1 >= 0 or -rowptr(row1(n)) + rowptr(row1(n) + 1) - 1 >= 0 both pairs of relationships are true and should both be in the closure. This is a step further in Transitive closure in presense of UFs.

This Issue tracks changes to expanding Transitive Closure on these cases

@tpops tpops self-assigned this Jan 14, 2022
tpops added a commit that referenced this issue Jan 14, 2022
tpops added a commit that referenced this issue Jan 16, 2022
@tpops
Copy link
Member Author

tpops commented Jun 23, 2022

This was solved in a different repository: CodeSynthesis which should be moved here by @tpops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant